@syncfusion/ej2-treemap 22.1.36 → 23.1.36
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/CHANGELOG.md +0 -6
- 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 +39 -8
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +39 -8
- 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 +2 -0
- package/src/treemap/layout/render-panel.js +11 -3
- package/src/treemap/treemap-model.d.ts +12 -12
- package/src/treemap/treemap.js +24 -5
- package/src/treemap/user-interaction/tooltip.js +1 -0
- package/src/treemap/utils/helper.js +1 -0
|
@@ -1651,6 +1651,7 @@ function drawSymbol(location, shape, size, url, options, label) {
|
|
|
1651
1651
|
var temp = renderLegendShape(location, size, shape, options, url);
|
|
1652
1652
|
var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
|
|
1653
1653
|
htmlElement.setAttribute('aria-label', label);
|
|
1654
|
+
htmlElement.setAttribute('role', 'region');
|
|
1654
1655
|
return htmlElement;
|
|
1655
1656
|
}
|
|
1656
1657
|
/**
|
|
@@ -2322,6 +2323,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2322
2323
|
this.calculateLayoutItems(parentItemGroupname, totalRect);
|
|
2323
2324
|
this.renderLayoutItems();
|
|
2324
2325
|
};
|
|
2326
|
+
// eslint-disable-next-line valid-jsdoc
|
|
2325
2327
|
/** @private */
|
|
2326
2328
|
LayoutPanel.prototype.renderLayoutItems = function () {
|
|
2327
2329
|
var _this = this;
|
|
@@ -2461,8 +2463,15 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2461
2463
|
}
|
|
2462
2464
|
}
|
|
2463
2465
|
itemGroup.setAttribute('aria-label', item['name']);
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
+
if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable || _this.treemap.highlightSettings.enable)) {
|
|
2467
|
+
itemGroup.setAttribute('role', 'button');
|
|
2468
|
+
itemGroup.setAttribute('tabindex', (_this.treemap.tabIndex + i + 2).toString());
|
|
2469
|
+
itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] == (_this.treemap.levels.length - 1)) ? 'default' :
|
|
2470
|
+
_this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
|
|
2471
|
+
}
|
|
2472
|
+
else {
|
|
2473
|
+
itemGroup.setAttribute('role', 'region');
|
|
2474
|
+
}
|
|
2466
2475
|
maintainSelection(_this.treemap, itemGroup, 'treeMapSelection');
|
|
2467
2476
|
_this.layoutGroup.appendChild(itemGroup);
|
|
2468
2477
|
}
|
|
@@ -2584,7 +2593,7 @@ var LayoutPanel = /** @__PURE__ @class */ (function () {
|
|
|
2584
2593
|
return contrast >= 128 ? 'black' : 'white';
|
|
2585
2594
|
};
|
|
2586
2595
|
LayoutPanel.prototype.renderTemplate = function (
|
|
2587
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2596
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, max-len
|
|
2588
2597
|
secondaryEle, groupId, rect, position, template, item, isLeafItem) {
|
|
2589
2598
|
var templateId = isLeafItem ? groupId + '_LabelTemplate' : groupId + '_HeaderTemplate';
|
|
2590
2599
|
var baseTemplateId = isLeafItem ? '_LabelTemplate' : '_HeaderTemplate';
|
|
@@ -3318,9 +3327,22 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3318
3327
|
else if (this.dataSource instanceof TreeMapAjax) {
|
|
3319
3328
|
localAjax = this.dataSource;
|
|
3320
3329
|
fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
|
|
3330
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3321
3331
|
fetchApiModule.onSuccess = function (args) {
|
|
3322
|
-
|
|
3323
|
-
|
|
3332
|
+
if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
|
|
3333
|
+
var reader_1 = new FileReader();
|
|
3334
|
+
var treemap_1 = _this;
|
|
3335
|
+
reader_1.onload = function (data) {
|
|
3336
|
+
args = JSON.parse(reader_1.result.toString());
|
|
3337
|
+
treemap_1.dataSource = args;
|
|
3338
|
+
treemap_1.renderTreeMapElements();
|
|
3339
|
+
};
|
|
3340
|
+
reader_1.readAsText(args);
|
|
3341
|
+
}
|
|
3342
|
+
else {
|
|
3343
|
+
_this.dataSource = args;
|
|
3344
|
+
_this.renderTreeMapElements();
|
|
3345
|
+
}
|
|
3324
3346
|
};
|
|
3325
3347
|
fetchApiModule.send(localAjax.sendData);
|
|
3326
3348
|
}
|
|
@@ -3676,7 +3698,7 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3676
3698
|
currentData['isDrilled'] = false;
|
|
3677
3699
|
currentData['groupName'] = groupPath;
|
|
3678
3700
|
currentData['data'] = this.dataSource[j];
|
|
3679
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3701
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, max-len
|
|
3680
3702
|
this.treemapLevelData.levelsData[(this.treemapLevelData.levelsData.length - 1)][groupPath].push(currentData);
|
|
3681
3703
|
orderNames.push((childName) ? childName : name_1);
|
|
3682
3704
|
}
|
|
@@ -3816,8 +3838,14 @@ var TreeMap = /** @__PURE__ @class */ (function (_super) {
|
|
|
3816
3838
|
*/
|
|
3817
3839
|
TreeMap.prototype.addTabIndex = function () {
|
|
3818
3840
|
this.element.setAttribute('aria-label', this.description || 'TreeMap Element');
|
|
3819
|
-
this.
|
|
3820
|
-
|
|
3841
|
+
if (this.enableDrillDown || (this.selectionSettings.enable || this.highlightSettings.enable)) {
|
|
3842
|
+
this.element.setAttribute('role', 'button');
|
|
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
|
+
}
|
|
3821
3849
|
};
|
|
3822
3850
|
/**
|
|
3823
3851
|
* This method handles the window resize event on treemap.
|
|
@@ -4600,6 +4628,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
4600
4628
|
}
|
|
4601
4629
|
});
|
|
4602
4630
|
};
|
|
4631
|
+
// eslint-disable-next-line valid-jsdoc
|
|
4603
4632
|
/** @private */
|
|
4604
4633
|
TreeMapLegend.prototype.calculateLegendBounds = function () {
|
|
4605
4634
|
var _this = this;
|
|
@@ -5447,6 +5476,7 @@ var TreeMapLegend = /** @__PURE__ @class */ (function () {
|
|
|
5447
5476
|
this.translate = new Location(x, y);
|
|
5448
5477
|
}
|
|
5449
5478
|
};
|
|
5479
|
+
// eslint-disable-next-line valid-jsdoc
|
|
5450
5480
|
/** @private */
|
|
5451
5481
|
TreeMapLegend.prototype.mouseUpHandler = function (e) {
|
|
5452
5482
|
this.renderInteractivePointer(e);
|
|
@@ -6226,6 +6256,7 @@ var TreeMapTooltip = /** @__PURE__ @class */ (function () {
|
|
|
6226
6256
|
enable: true,
|
|
6227
6257
|
header: '',
|
|
6228
6258
|
data: args['data'],
|
|
6259
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6229
6260
|
template: args['template'],
|
|
6230
6261
|
content: args['text'],
|
|
6231
6262
|
shapes: [],
|