@syncfusion/ej2-treemap 34.2.2 → 34.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.
- 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 +44 -7
- package/dist/es6/ej2-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-treemap.es5.js +44 -7
- 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 +1 -1
- package/src/treemap/layout/render-panel.js +11 -1
- package/src/treemap/treemap.js +15 -5
- package/src/treemap/utils/helper.js +18 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 34.2.
|
|
3
|
+
* version : 34.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. 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
|
@@ -511,7 +511,17 @@ var LayoutPanel = /** @class */ (function () {
|
|
|
511
511
|
}
|
|
512
512
|
levelName = item['name'];
|
|
513
513
|
}
|
|
514
|
-
|
|
514
|
+
// Use nullish coalescing (??) to preserve empty string '' (blank tile for null labelPath)
|
|
515
|
+
var formatterOutput = textFormatter(format, item['data'], this_1.treemap);
|
|
516
|
+
if (!isNullOrUndefined(formatterOutput)) {
|
|
517
|
+
renderText = formatterOutput;
|
|
518
|
+
}
|
|
519
|
+
else if (!isNullOrUndefined(levelName)) {
|
|
520
|
+
renderText = levelName;
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
renderText = 'undefined';
|
|
524
|
+
}
|
|
515
525
|
childItems = findChildren(item)['values'];
|
|
516
526
|
renderText = !isLeafItem && childItems && childItems.length > 0 && this_1.treemap.enableDrillDown ?
|
|
517
527
|
!item['isDrilled'] ? treeMap.enableRtl ? renderText + ' [+]' : '[+] ' + renderText :
|
package/src/treemap/treemap.js
CHANGED
|
@@ -305,21 +305,31 @@ var TreeMap = /** @class */ (function (_super) {
|
|
|
305
305
|
if (this.isHierarchicalData && child && child.length > 0) {
|
|
306
306
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
307
307
|
child.forEach(function (currentData) {
|
|
308
|
-
if (currentData[
|
|
308
|
+
if (!isNullOrUndefined(currentData[_this.weightValuePath])) {
|
|
309
309
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
310
|
+
var labelValue = currentData[path];
|
|
311
|
+
var isBlank = isNullOrUndefined(labelValue) || labelValue === '';
|
|
312
|
+
var itemName = isBlank ? '' : labelValue;
|
|
313
|
+
var orderName = isBlank ?
|
|
314
|
+
'undefined_' + currentData[_this.weightValuePath] : labelValue.toString();
|
|
310
315
|
data_1[path].push({
|
|
311
|
-
groupIndex: 0, name:
|
|
312
|
-
levelOrderName:
|
|
316
|
+
groupIndex: 0, name: itemName,
|
|
317
|
+
levelOrderName: orderName,
|
|
313
318
|
data: currentData, weight: currentData[_this.weightValuePath]
|
|
314
319
|
});
|
|
315
320
|
}
|
|
316
321
|
});
|
|
317
322
|
}
|
|
318
323
|
else {
|
|
319
|
-
if (this.dataSource[i][
|
|
324
|
+
if (!isNullOrUndefined(this.dataSource[i][this.weightValuePath])) {
|
|
320
325
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
326
|
+
var labelValue = this.dataSource[i][path];
|
|
327
|
+
var isBlank = isNullOrUndefined(labelValue) || labelValue === '';
|
|
328
|
+
var itemName = isBlank ? '' : labelValue;
|
|
329
|
+
var orderName = isBlank ?
|
|
330
|
+
'undefined_' + this.dataSource[i][this.weightValuePath] : labelValue.toString();
|
|
321
331
|
data_1[path].push({
|
|
322
|
-
groupIndex: 0, name:
|
|
332
|
+
groupIndex: 0, name: itemName, levelOrderName: orderName, data: this.dataSource[i],
|
|
323
333
|
weight: this.dataSource[i][this.weightValuePath]
|
|
324
334
|
});
|
|
325
335
|
}
|
|
@@ -330,7 +330,24 @@ export function isContainsData(source, pathName, processData, treemap) {
|
|
|
330
330
|
for (var i = 0; i < source.length; i++) {
|
|
331
331
|
path = treemap.levels[i] ? treemap.levels[i].groupPath : leaf.labelPath ? leaf.labelPath :
|
|
332
332
|
treemap.weightValuePath;
|
|
333
|
-
|
|
333
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
334
|
+
var rawValue = processData[path];
|
|
335
|
+
var isBlank = isNullOrUndefined(rawValue) || rawValue === '';
|
|
336
|
+
var data = void 0;
|
|
337
|
+
if (isBlank) {
|
|
338
|
+
if (treemap.levels && treemap.levels.length > 0) {
|
|
339
|
+
// Multi-level: match the '+ ""' coercion result (null -> 'null', undefined -> 'undefined')
|
|
340
|
+
data = isNullOrUndefined(rawValue) ? String(rawValue) : '';
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
// Flat data: use the unique 'undefined_<weight>' suffix
|
|
344
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
345
|
+
data = 'undefined_' + processData[treemap.weightValuePath];
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
data = rawValue.toString();
|
|
350
|
+
}
|
|
334
351
|
if (source[i] === data) {
|
|
335
352
|
name += data + (i === source.length - 1 ? '' : '#');
|
|
336
353
|
if (name === pathName) {
|