@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.1.36
3
+ * version : 23.1.36
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@21.1.36",
3
+ "_id": "@syncfusion/ej2-treemap@16.31.23",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-6KjL9YzzTdmxRe0uGIuD0VM8FU7l8zeNxWtnJhJw1qI6SphWxy4t0vGw1+I5M0LPfzJzV43BaRixFrMNNVj1bg==",
5
+ "_integrity": "sha512-4h8mmP2jr8EzRp9Bk/9bahCR0/1npRJvZLMYv9ZV8fhFMG+/EsXlGoqm2tH6t9sfayBZ0bjB39Yj8oOYECqacQ==",
6
6
  "_location": "/@syncfusion/ej2-treemap",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,10 +23,10 @@
23
23
  "/@syncfusion/ej2-react-treemap",
24
24
  "/@syncfusion/ej2-vue-treemap"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treemap/-/ej2-treemap-21.1.36.tgz",
27
- "_shasum": "c63742e24410f33b8ec78e618922509c08f51130",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-treemap/-/ej2-treemap-16.31.23.tgz",
27
+ "_shasum": "f3f946680ab6ba77f449234d87dc960fd6fc4ffd",
28
28
  "_spec": "@syncfusion/ej2-treemap@*",
29
- "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
29
+ "_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
30
30
  "author": {
31
31
  "name": "Syncfusion Inc."
32
32
  },
@@ -35,12 +35,12 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~22.1.34",
39
- "@syncfusion/ej2-compression": "~22.1.34",
40
- "@syncfusion/ej2-data": "~22.1.36",
41
- "@syncfusion/ej2-file-utils": "~22.1.34",
42
- "@syncfusion/ej2-pdf-export": "~22.1.34",
43
- "@syncfusion/ej2-svg-base": "~22.1.34"
38
+ "@syncfusion/ej2-base": "~23.1.36",
39
+ "@syncfusion/ej2-compression": "~23.1.36",
40
+ "@syncfusion/ej2-data": "~23.1.36",
41
+ "@syncfusion/ej2-file-utils": "~23.1.36",
42
+ "@syncfusion/ej2-pdf-export": "~23.1.36",
43
+ "@syncfusion/ej2-svg-base": "~23.1.36"
44
44
  },
45
45
  "deprecated": false,
46
46
  "description": "Essential JS 2 TreeMap Components",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "22.1.36",
84
+ "version": "23.1.36",
85
85
  "sideEffects": false
86
86
  }
@@ -52,6 +52,7 @@ var TreeMapLegend = /** @class */ (function () {
52
52
  }
53
53
  });
54
54
  };
55
+ // eslint-disable-next-line valid-jsdoc
55
56
  /** @private */
56
57
  TreeMapLegend.prototype.calculateLegendBounds = function () {
57
58
  var _this = this;
@@ -899,6 +900,7 @@ var TreeMapLegend = /** @class */ (function () {
899
900
  this.translate = new Location(x, y);
900
901
  }
901
902
  };
903
+ // eslint-disable-next-line valid-jsdoc
902
904
  /** @private */
903
905
  TreeMapLegend.prototype.mouseUpHandler = function (e) {
904
906
  this.renderInteractivePointer(e);
@@ -410,6 +410,7 @@ var LayoutPanel = /** @class */ (function () {
410
410
  this.calculateLayoutItems(parentItemGroupname, totalRect);
411
411
  this.renderLayoutItems();
412
412
  };
413
+ // eslint-disable-next-line valid-jsdoc
413
414
  /** @private */
414
415
  LayoutPanel.prototype.renderLayoutItems = function () {
415
416
  var _this = this;
@@ -549,8 +550,15 @@ var LayoutPanel = /** @class */ (function () {
549
550
  }
550
551
  }
551
552
  itemGroup.setAttribute('aria-label', item['name']);
552
- itemGroup.setAttribute('role', '');
553
- itemGroup.setAttribute('tabindex', (_this.treemap.tabIndex + i + 2).toString());
553
+ if ((_this.treemap.enableDrillDown && isLeafItem) || (_this.treemap.selectionSettings.enable || _this.treemap.highlightSettings.enable)) {
554
+ itemGroup.setAttribute('role', 'button');
555
+ itemGroup.setAttribute('tabindex', (_this.treemap.tabIndex + i + 2).toString());
556
+ itemGroup.style.cursor = _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && (_this.treemap.enableDrillDown && item['groupIndex'] == (_this.treemap.levels.length - 1)) ? 'default' :
557
+ _this.treemap.highlightSettings.enable && !_this.treemap.selectionSettings.enable && !_this.treemap.enableDrillDown ? 'default' : 'pointer';
558
+ }
559
+ else {
560
+ itemGroup.setAttribute('role', 'region');
561
+ }
554
562
  maintainSelection(_this.treemap, itemGroup, 'treeMapSelection');
555
563
  _this.layoutGroup.appendChild(itemGroup);
556
564
  }
@@ -672,7 +680,7 @@ var LayoutPanel = /** @class */ (function () {
672
680
  return contrast >= 128 ? 'black' : 'white';
673
681
  };
674
682
  LayoutPanel.prototype.renderTemplate = function (
675
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
683
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, max-len
676
684
  secondaryEle, groupId, rect, position, template, item, isLeafItem) {
677
685
  var templateId = isLeafItem ? groupId + '_LabelTemplate' : groupId + '_HeaderTemplate';
678
686
  var baseTemplateId = isLeafItem ? '_LabelTemplate' : '_HeaderTemplate';
@@ -53,14 +53,14 @@ export interface TreeMapModel extends ComponentModel{
53
53
 
54
54
  /**
55
55
  * Sets and gets the background color of the treemap.
56
- *
56
+ *
57
57
  * @default null
58
58
  */
59
59
  background?: string;
60
60
 
61
61
  /**
62
62
  * Sets and gets the theme styles supported for treemap. When the theme is set, the styles associated with the theme will be set in the treemap.
63
- *
63
+ *
64
64
  * @default Material
65
65
  */
66
66
  theme?: TreeMapTheme;
@@ -72,7 +72,7 @@ export interface TreeMapModel extends ComponentModel{
72
72
 
73
73
  /**
74
74
  * Specifies the rendering type for the layout of the treemap.
75
- *
75
+ *
76
76
  * @default 'Squarified'
77
77
  */
78
78
  layoutType?: LayoutMode;
@@ -96,7 +96,7 @@ export interface TreeMapModel extends ComponentModel{
96
96
 
97
97
  /**
98
98
  * Sets and gets the value path of the weight from the data source, based on which the treemap item is rendered.
99
- *
99
+ *
100
100
  * @default null
101
101
  */
102
102
  weightValuePath?: string;
@@ -104,7 +104,7 @@ export interface TreeMapModel extends ComponentModel{
104
104
  /**
105
105
  * Sets and gets the value path from the data source, based on it color is filled in treemap.
106
106
  * This property is used when range color mapping is set in the treemap.
107
- *
107
+ *
108
108
  * @default ''
109
109
  */
110
110
  rangeColorValuePath?: string;
@@ -112,21 +112,21 @@ export interface TreeMapModel extends ComponentModel{
112
112
  /**
113
113
  * Sets and gets the value path from the data source, based on it color is filled in treemap.
114
114
  * This property is used when equal color mapping is set in the treemap.
115
- *
115
+ *
116
116
  * @default ''
117
117
  */
118
118
  equalColorValuePath?: string;
119
119
 
120
120
  /**
121
121
  * Sets and gets the value path from the data source, based on it color is filled in treemap.
122
- *
122
+ *
123
123
  * @default null
124
124
  */
125
125
  colorValuePath?: string;
126
126
 
127
127
  /**
128
128
  * Sets and gets a set of colors to apply in the treemap items.
129
- *
129
+ *
130
130
  * @default []
131
131
  */
132
132
  palette?: string[];
@@ -140,28 +140,28 @@ export interface TreeMapModel extends ComponentModel{
140
140
 
141
141
  /**
142
142
  * Enables or disables the drill down functionality in treemap.
143
- *
143
+ *
144
144
  * @default false
145
145
  */
146
146
  enableDrillDown?: boolean;
147
147
 
148
148
  /**
149
149
  * Enables or disables the connection text in the header of the treemap when drill down is enabled.
150
- *
150
+ *
151
151
  * @default false
152
152
  */
153
153
  enableBreadcrumb?: boolean;
154
154
 
155
155
  /**
156
156
  * Specifies the symbol to show connection between the two words in the header of the treemap during drill down.
157
- *
157
+ *
158
158
  * @default ' - '
159
159
  */
160
160
  breadcrumbConnector?: string;
161
161
 
162
162
  /**
163
163
  * Enables or disables the initial drill in the treemap.
164
- *
164
+ *
165
165
  * @default false
166
166
  */
167
167
  drillDownView?: boolean;
@@ -123,9 +123,22 @@ var TreeMap = /** @class */ (function (_super) {
123
123
  else if (this.dataSource instanceof TreeMapAjax) {
124
124
  localAjax = this.dataSource;
125
125
  fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
126
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
127
  fetchApiModule.onSuccess = function (args) {
127
- _this.dataSource = args;
128
- _this.renderTreeMapElements();
128
+ if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
129
+ var reader_1 = new FileReader();
130
+ var treemap_1 = _this;
131
+ reader_1.onload = function (data) {
132
+ args = JSON.parse(reader_1.result.toString());
133
+ treemap_1.dataSource = args;
134
+ treemap_1.renderTreeMapElements();
135
+ };
136
+ reader_1.readAsText(args);
137
+ }
138
+ else {
139
+ _this.dataSource = args;
140
+ _this.renderTreeMapElements();
141
+ }
129
142
  };
130
143
  fetchApiModule.send(localAjax.sendData);
131
144
  }
@@ -481,7 +494,7 @@ var TreeMap = /** @class */ (function (_super) {
481
494
  currentData['isDrilled'] = false;
482
495
  currentData['groupName'] = groupPath;
483
496
  currentData['data'] = this.dataSource[j];
484
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
497
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, max-len
485
498
  this.treemapLevelData.levelsData[(this.treemapLevelData.levelsData.length - 1)][groupPath].push(currentData);
486
499
  orderNames.push((childName) ? childName : name_1);
487
500
  }
@@ -621,8 +634,14 @@ var TreeMap = /** @class */ (function (_super) {
621
634
  */
622
635
  TreeMap.prototype.addTabIndex = function () {
623
636
  this.element.setAttribute('aria-label', this.description || 'TreeMap Element');
624
- this.element.setAttribute('role', '');
625
- this.element.setAttribute('tabindex', this.tabIndex.toString());
637
+ if (this.enableDrillDown || (this.selectionSettings.enable || this.highlightSettings.enable)) {
638
+ this.element.setAttribute('role', 'button');
639
+ this.element.setAttribute('tabindex', this.tabIndex.toString());
640
+ this.element.style.cursor = this.highlightSettings.enable && !this.selectionSettings.enable && !this.enableDrillDown ? 'default' : 'pointer';
641
+ }
642
+ else {
643
+ this.element.setAttribute('role', 'region');
644
+ }
626
645
  };
627
646
  /**
628
647
  * This method handles the window resize event on treemap.
@@ -128,6 +128,7 @@ var TreeMapTooltip = /** @class */ (function () {
128
128
  enable: true,
129
129
  header: '',
130
130
  data: args['data'],
131
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
132
  template: args['template'],
132
133
  content: args['text'],
133
134
  shapes: [],
@@ -1061,6 +1061,7 @@ export function drawSymbol(location, shape, size, url, options, label) {
1061
1061
  var temp = renderLegendShape(location, size, shape, options, url);
1062
1062
  var htmlElement = svgRenderer['draw' + temp.functionName](temp.renderOption);
1063
1063
  htmlElement.setAttribute('aria-label', label);
1064
+ htmlElement.setAttribute('role', 'region');
1064
1065
  return htmlElement;
1065
1066
  }
1066
1067
  /**