@syncfusion/ej2-treegrid 25.1.37 → 25.1.39

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 : 25.1.37
3
+ * version : 25.1.39
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@25.1.35",
3
+ "_id": "@syncfusion/ej2-treegrid@25.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-hhcRD9SU6lXTYJhfJp5PEI+vPnWVd8rpjtlNsZcKdcX70KbYVo/PqNGSHe50I4BMgdn6m0jGvxiZPDj79Q31Iw==",
5
+ "_integrity": "sha512-ePeCjuDmiMas23g+HjJ/K6k3Sv5j33AqOcHT+9tMeaX3Ef6d4+5LbdX+UaRmZORO2DVP1CsneN9jzffNDIAawA==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-25.1.35.tgz",
28
- "_shasum": "f218497fefd6ed222ac0d900f2a95b052e73e05e",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-25.1.37.tgz",
28
+ "_shasum": "eb6276ece49cd424c95c59f3ef62a011033271c6",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
31
31
  "author": {
@@ -38,8 +38,8 @@
38
38
  "dependencies": {
39
39
  "@syncfusion/ej2-base": "~25.1.35",
40
40
  "@syncfusion/ej2-data": "~25.1.35",
41
- "@syncfusion/ej2-grids": "~25.1.37",
42
- "@syncfusion/ej2-popups": "~25.1.35"
41
+ "@syncfusion/ej2-grids": "~25.1.39",
42
+ "@syncfusion/ej2-popups": "~25.1.39"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -66,6 +66,6 @@
66
66
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
67
67
  },
68
68
  "typings": "index.d.ts",
69
- "version": "25.1.37",
69
+ "version": "25.1.39",
70
70
  "sideEffects": false
71
71
  }
@@ -521,9 +521,9 @@ export interface TreeGridModel extends ComponentModel{
521
521
 
522
522
  /**
523
523
  * Specifies whether to display or remove the untrusted HTML values in the TreeGrid component.
524
- * By default `enableHtmlSanitizer` is set to true, and it sanitizes any suspected untrusted strings and scripts before rendering them.
524
+ * If `enableHtmlSanitizer` is set to true, then it will sanitize any suspected untrusted strings and scripts before rendering them.
525
525
  *
526
- * @default true
526
+ * @default false
527
527
  */
528
528
  enableHtmlSanitizer?: boolean;
529
529
 
@@ -646,9 +646,9 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
646
646
  enableColumnVirtualization: boolean;
647
647
  /**
648
648
  * Specifies whether to display or remove the untrusted HTML values in the TreeGrid component.
649
- * By default `enableHtmlSanitizer` is set to true, and it sanitizes any suspected untrusted strings and scripts before rendering them.
649
+ * If `enableHtmlSanitizer` is set to true, then it will sanitize any suspected untrusted strings and scripts before rendering them.
650
650
  *
651
- * @default true
651
+ * @default false
652
652
  */
653
653
  enableHtmlSanitizer: boolean;
654
654
  /**
@@ -3561,7 +3561,7 @@ var TreeGrid = /** @class */ (function (_super) {
3561
3561
  }
3562
3562
  };
3563
3563
  TreeGrid.prototype.collapseRemoteChild = function (rowDetails, isChild) {
3564
- if (!isChild) {
3564
+ if (!isNullOrUndefined(isChild) && !isChild && !this.loadChildOnDemand) {
3565
3565
  rowDetails.record.expanded = false;
3566
3566
  }
3567
3567
  var rows = rowDetails.rows;
@@ -4228,7 +4228,7 @@ var TreeGrid = /** @class */ (function (_super) {
4228
4228
  Property(false)
4229
4229
  ], TreeGrid.prototype, "enableColumnVirtualization", void 0);
4230
4230
  __decorate([
4231
- Property(true)
4231
+ Property(false)
4232
4232
  ], TreeGrid.prototype, "enableHtmlSanitizer", void 0);
4233
4233
  __decorate([
4234
4234
  Property(false)
@@ -348,17 +348,21 @@ var Render = /** @class */ (function () {
348
348
  var cells = 'cells';
349
349
  var rowIdx = 'index';
350
350
  var rowsObj = _this.parent.grid.getRowsObject();
351
+ var rows = _this.parent.getDataRows();
351
352
  var indent = _this.parent.grid.getIndentCount();
352
353
  var cellIndex = _this.parent.grid.getNormalizedColumnIndex(columnUid);
353
- for (var j = 0; j < rowsObj.length; j++) {
354
- if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
355
- var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
356
- var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
357
- var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
358
- cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
359
- var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
360
- .cells[parseInt(cellIndex.toString(), 10)];
361
- _this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
354
+ if (rows.length !== 0) {
355
+ for (var j = 0; j < rowsObj.length; j++) {
356
+ if (rowsObj[parseInt(j.toString(), 10)].isDataRow
357
+ && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
358
+ var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
359
+ var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
360
+ var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
361
+ cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
362
+ var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
363
+ .cells[parseInt(cellIndex.toString(), 10)];
364
+ _this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
365
+ }
362
366
  }
363
367
  }
364
368
  });
@@ -70,7 +70,8 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
70
70
  var rows = _super.prototype.generateRows.call(this, data, notifyArgs);
71
71
  if (!isNullOrUndefined((this.visualData))) {
72
72
  for (var r = 0; r < rows.length; r++) {
73
- rows[parseInt(r.toString(), 10)].index = (this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
73
+ rows[parseInt(r.toString(), 10)].index =
74
+ (this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
74
75
  }
75
76
  }
76
77
  return rows;
@@ -426,13 +426,8 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
426
426
  firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
427
427
  }
428
428
  if (firsttdinx === 0) {
429
- scrollArgs.offset.top = content.scrollTop;
430
- if (this.parent.allowRowDragAndDrop) {
431
- this.translateY = scrollArgs.offset.top - rowHeight * 2;
432
- }
433
- else {
434
- this.translateY = scrollArgs.offset.top;
435
- }
429
+ this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
430
+ scrollArgs.offset.top - (outBuffer * this.parent.getRowHeight()) + 10 : 0;
436
431
  }
437
432
  else {
438
433
  this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?