@syncfusion/ej2-treemap 23.2.4 → 24.1.41
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 +23 -25
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +23 -25
- 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 +12 -12
- package/src/treemap/layout/legend.js +5 -3
- package/src/treemap/layout/render-panel.js +1 -1
- package/src/treemap/model/base.js +3 -3
- package/src/treemap/treemap-model.d.ts +1 -1
- package/src/treemap/treemap.d.ts +1 -1
- package/src/treemap/treemap.js +7 -10
- package/src/treemap/user-interaction/tooltip.js +8 -7
- package/src/treemap/utils/helper.js +0 -2
|
@@ -321,7 +321,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
321
321
|
Property('')
|
|
322
322
|
], LegendSettings.prototype, "height", void 0);
|
|
323
323
|
__decorate$1([
|
|
324
|
-
Complex({ size:
|
|
324
|
+
Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
|
|
325
325
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
326
326
|
__decorate$1([
|
|
327
327
|
Property(null)
|
|
@@ -351,7 +351,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
351
351
|
Complex({}, CommonTitleSettings)
|
|
352
352
|
], LegendSettings.prototype, "title", void 0);
|
|
353
353
|
__decorate$1([
|
|
354
|
-
Complex({ size:
|
|
354
|
+
Complex({ size: null, fontFamily: null, fontWeight: null }, Font)
|
|
355
355
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
356
356
|
__decorate$1([
|
|
357
357
|
Property('Bottom')
|
|
@@ -486,7 +486,7 @@ var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
486
486
|
Complex({}, Border)
|
|
487
487
|
], TooltipSettings.prototype, "border", void 0);
|
|
488
488
|
__decorate$1([
|
|
489
|
-
Complex({ fontFamily:
|
|
489
|
+
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
490
490
|
], TooltipSettings.prototype, "textStyle", void 0);
|
|
491
491
|
return TooltipSettings;
|
|
492
492
|
}(ChildProperty));
|
|
@@ -1650,8 +1650,6 @@ function drawSymbol(location, shape, size, url, options, label) {
|
|
|
1650
1650
|
var svgRenderer = new SvgRenderer('');
|
|
1651
1651
|
var temp = renderLegendShape(location, size, shape, options, url);
|
|
1652
1652
|
var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
|
|
1653
|
-
htmlElement.setAttribute('aria-label', label);
|
|
1654
|
-
htmlElement.setAttribute('role', 'region');
|
|
1655
1653
|
return htmlElement;
|
|
1656
1654
|
}
|
|
1657
1655
|
/**
|
|
@@ -2465,7 +2463,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2465
2463
|
itemGroup.setAttribute('aria-label', item['name']);
|
|
2466
2464
|
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable || _this.treemap.highlightSettings.enable)) {
|
|
2467
2465
|
itemGroup.setAttribute('role', 'button');
|
|
2468
|
-
itemGroup.setAttribute('tabindex',
|
|
2466
|
+
itemGroup.setAttribute('tabindex', _this.treemap.tabIndex.toString());
|
|
2469
2467
|
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] == (_this.treemap.levels.length - 1)) ? 'default' :
|
|
2470
2468
|
_this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
|
|
2471
2469
|
}
|
|
@@ -3461,7 +3459,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3461
3459
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
3462
3460
|
element.setAttribute('aria-label', title.description || title.text);
|
|
3463
3461
|
element.setAttribute('role', '');
|
|
3464
|
-
element.setAttribute('tabindex',
|
|
3462
|
+
element.setAttribute('tabindex', this.tabIndex.toString());
|
|
3465
3463
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
3466
3464
|
height = (this.availableSize.height - titleBounds.y - titlePadding - this.margin.bottom);
|
|
3467
3465
|
this.areaRect = new Rect(this.margin.left, titleBounds.y + titlePadding, width, height);
|
|
@@ -3838,14 +3836,8 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3838
3836
|
*/
|
|
3839
3837
|
TreeMap.prototype.addTabIndex = function () {
|
|
3840
3838
|
this.element.setAttribute('aria-label', this.description || 'TreeMap Element');
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
this.element.setAttribute('tabindex', this.tabIndex.toString());
|
|
3844
|
-
this.element.style.cursor = this.highlightSettings.enable && !this.selectionSettings.enable && !this.enableDrillDown ? 'default' : 'pointer';
|
|
3845
|
-
}
|
|
3846
|
-
else {
|
|
3847
|
-
this.element.setAttribute('role', 'region');
|
|
3848
|
-
}
|
|
3839
|
+
this.element.setAttribute('role', 'region');
|
|
3840
|
+
this.element.setAttribute('tabindex', this.tabIndex.toString());
|
|
3849
3841
|
};
|
|
3850
3842
|
/**
|
|
3851
3843
|
* This method handles the window resize event on treemap.
|
|
@@ -3991,6 +3983,9 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3991
3983
|
eventArgs = { cancel: false, name: itemMove, treemap: this, item: item, mouseEvent: e };
|
|
3992
3984
|
this.trigger(itemMove, eventArgs);
|
|
3993
3985
|
}
|
|
3986
|
+
else {
|
|
3987
|
+
this.element.style.cursor = 'default';
|
|
3988
|
+
}
|
|
3994
3989
|
this.notify(Browser.touchMoveEvent, e);
|
|
3995
3990
|
};
|
|
3996
3991
|
/**
|
|
@@ -4505,7 +4500,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
4505
4500
|
Property(null)
|
|
4506
4501
|
], TreeMap.prototype, "description", void 0);
|
|
4507
4502
|
__decorate([
|
|
4508
|
-
Property(
|
|
4503
|
+
Property(0)
|
|
4509
4504
|
], TreeMap.prototype, "tabIndex", void 0);
|
|
4510
4505
|
__decorate([
|
|
4511
4506
|
Property(null)
|
|
@@ -4673,9 +4668,9 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4673
4668
|
* parseFloat(legend.width) : parseFloat(legend.width) : null;
|
|
4674
4669
|
var legendHeight = (legend.height.length > 1) ? (legend.height.indexOf('%') > -1) ?
|
|
4675
4670
|
(treemap.availableSize.height / 100) * parseFloat(legend.height) : parseFloat(legend.height) : null;
|
|
4676
|
-
titleTextStyle.fontFamily =
|
|
4671
|
+
titleTextStyle.fontFamily = titleTextStyle.fontFamily || treemap.themeStyle.fontFamily;
|
|
4677
4672
|
titleTextStyle.fontWeight = titleTextStyle.fontWeight || treemap.themeStyle.titleFontWeight;
|
|
4678
|
-
titleTextStyle.size = treemap.themeStyle.legendFontSize
|
|
4673
|
+
titleTextStyle.size = titleTextStyle.size || treemap.themeStyle.legendFontSize;
|
|
4679
4674
|
var legendTitleSize = measureText(legendTitle, titleTextStyle);
|
|
4680
4675
|
var startX_1 = 0;
|
|
4681
4676
|
var startY_1 = 0;
|
|
@@ -5218,8 +5213,10 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5218
5213
|
var _loop_1 = function (i) {
|
|
5219
5214
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5220
5215
|
var collection = this_1.totalPages[page]['Collection'][i];
|
|
5221
|
-
var legendElement = render.createGroup({ id: treemap.element.id + '_Legend_Index_' + i });
|
|
5222
5216
|
var legendText = collection['DisplayText'];
|
|
5217
|
+
var legendElement = render.createGroup({ id: treemap.element.id + '_Legend_Index_' + i });
|
|
5218
|
+
legendElement.setAttribute('aria-label', legendText + ' Legend');
|
|
5219
|
+
legendElement.setAttribute('role', 'region');
|
|
5223
5220
|
var shapeId = treemap.element.id + '_Legend_Shape_Index_' + i;
|
|
5224
5221
|
var textId = treemap.element.id + '_Legend_Text_Index_' + i;
|
|
5225
5222
|
var shapeLocation = collection['Shape'];
|
|
@@ -6188,12 +6185,12 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6188
6185
|
markerFill = item['options']['fill'];
|
|
6189
6186
|
}
|
|
6190
6187
|
if (this.treemap.enableRtl) {
|
|
6191
|
-
tooltipContent = [
|
|
6192
|
-
|
|
6188
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
6189
|
+
|| formatValue(value, this.treemap) + ' : ' + this.treemap.weightValuePath.toString()];
|
|
6193
6190
|
}
|
|
6194
6191
|
else {
|
|
6195
|
-
tooltipContent = [
|
|
6196
|
-
|
|
6192
|
+
tooltipContent = [(!isNullOrUndefined(this.tooltipSettings.format) ? textFormatter(this.tooltipSettings.format, toolTipData, this.treemap) : null)
|
|
6193
|
+
|| this.treemap.weightValuePath.toString() + ' : ' + formatValue(value, this.treemap)];
|
|
6197
6194
|
}
|
|
6198
6195
|
if (document.getElementById(this.tooltipId)) {
|
|
6199
6196
|
tooltipEle = document.getElementById(this.tooltipId);
|
|
@@ -6209,7 +6206,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6209
6206
|
location = getMousePosition(pageX, pageY, this.treemap.svgObject);
|
|
6210
6207
|
location.y = (this.tooltipSettings.template) ? location.y + 10 : location.y;
|
|
6211
6208
|
this.tooltipSettings.textStyle.size = this.tooltipSettings.textStyle.size || this.treemap.themeStyle.tooltipFontSize;
|
|
6212
|
-
this.tooltipSettings.textStyle.fontFamily = this.treemap.themeStyle.fontFamily;
|
|
6209
|
+
this.tooltipSettings.textStyle.fontFamily = this.tooltipSettings.textStyle.fontFamily || this.treemap.themeStyle.fontFamily;
|
|
6213
6210
|
this.tooltipSettings.textStyle.fontStyle = !isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle) ? this.tooltipSettings.textStyle.fontStyle : 'Normal';
|
|
6214
6211
|
this.tooltipSettings.textStyle.fontWeight = this.tooltipSettings.textStyle.fontWeight || this.treemap.themeStyle.fontWeight;
|
|
6215
6212
|
this.tooltipSettings.textStyle.color = this.treemap.themeStyle.tooltipFontColor
|
|
@@ -6264,7 +6261,8 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6264
6261
|
palette: [markerFill],
|
|
6265
6262
|
areaBounds: this.treemap.areaRect,
|
|
6266
6263
|
textStyle: args['textStyle'],
|
|
6267
|
-
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor
|
|
6264
|
+
fill: this.treemap.tooltipSettings.fill ? this.treemap.tooltipSettings.fill : this.treemap.themeStyle.tooltipFillColor,
|
|
6265
|
+
enableShadow: true
|
|
6268
6266
|
});
|
|
6269
6267
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6270
6268
|
if (this.treemap.isVue || this.treemap.isVue3) {
|