@syncfusion/ej2-treegrid 20.3.57 → 20.3.60
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 +17 -0
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +36 -11
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +38 -11
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/treegrid/actions/selection.js +5 -2
- package/src/treegrid/base/treegrid.js +31 -8
- package/src/treegrid/renderer/render.js +1 -0
- package/src/treegrid/renderer/virtual-tree-content-render.js +1 -1
|
@@ -1033,7 +1033,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
|
1035
1035
|
Selection.prototype.renderColumnCheckbox = function (args) {
|
|
1036
|
-
var rowChkBox = this.parent.createElement('input', { className: 'e-treecheckselect', attrs: { 'type': 'checkbox' } });
|
|
1036
|
+
var rowChkBox = this.parent.createElement('input', { className: 'e-treecheckselect', attrs: { 'type': 'checkbox', 'aria-label': 'checkbox' } });
|
|
1037
1037
|
var data = args.data;
|
|
1038
1038
|
args.cell.classList.add('e-treegridcheckbox');
|
|
1039
1039
|
args.cell.setAttribute('aria-label', 'checkbox');
|
|
@@ -1265,9 +1265,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1265
1265
|
var checkedRecord;
|
|
1266
1266
|
var recordIndex = this.parent.getCurrentViewRecords().indexOf(record[0]);
|
|
1267
1267
|
var checkboxRecord = getParentData(this.parent, currentRecord.uniqueID);
|
|
1268
|
+
var tr = this.parent.getRows()[recordIndex];
|
|
1268
1269
|
var checkbox;
|
|
1269
1270
|
if (recordIndex > -1) {
|
|
1270
|
-
var tr = this.parent.getRows()[recordIndex];
|
|
1271
1271
|
var movableTr = void 0;
|
|
1272
1272
|
if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
|
|
1273
1273
|
movableTr = this.parent.getMovableDataRows()[recordIndex];
|
|
@@ -1316,6 +1316,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1316
1316
|
if (recordIndex > -1) {
|
|
1317
1317
|
if (!isNullOrUndefined(checkbox)) {
|
|
1318
1318
|
checkbox.classList.add(checkBoxclass);
|
|
1319
|
+
var chkstate = checkState === 'check' ? 'checked' : checkState === 'uncheck' ? 'unchecked' : 'mixed';
|
|
1320
|
+
tr.querySelector('.e-treecheckselect').setAttribute('aria-checked', checkState === 'check' ? 'true' : checkState === 'uncheck' ? 'false' : 'mixed');
|
|
1321
|
+
tr.querySelector('.e-frame').setAttribute('title', 'checkbox' + chkstate);
|
|
1319
1322
|
}
|
|
1320
1323
|
}
|
|
1321
1324
|
};
|
|
@@ -1681,6 +1684,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1681
1684
|
}
|
|
1682
1685
|
if (iconRequired) {
|
|
1683
1686
|
addClass([args.cell], 'e-treerowcell');
|
|
1687
|
+
args.cell.setAttribute('aria-expanded', data.expanded ? 'true' : 'false');
|
|
1684
1688
|
var expandIcon = createElement('span', { className: 'e-icons' });
|
|
1685
1689
|
var expand = void 0;
|
|
1686
1690
|
if (this.parent.initialRender) {
|
|
@@ -3991,13 +3995,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3991
3995
|
this.trigger(getObject('name', args), args);
|
|
3992
3996
|
};
|
|
3993
3997
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
3994
|
-
if (
|
|
3995
|
-
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
|
|
3996
|
-
args.
|
|
3997
|
-
return;
|
|
3998
|
-
}
|
|
3999
|
-
else if (args['name'] === 'rowDeselecting' && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
|
|
4000
|
-
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
|
|
3998
|
+
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
3999
|
+
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
|
|
4000
|
+
&& (!isNullOrUndefined(args.data) && args.data['hasChildRecords'])) {
|
|
4001
4001
|
args.cancel = true;
|
|
4002
4002
|
return;
|
|
4003
4003
|
}
|
|
@@ -4664,7 +4664,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4664
4664
|
}
|
|
4665
4665
|
var treeGridColumn;
|
|
4666
4666
|
var gridColumn;
|
|
4667
|
-
|
|
4667
|
+
if (this.columnModel.length == 0) {
|
|
4668
|
+
index = index === 0 ? -1 : index;
|
|
4669
|
+
}
|
|
4668
4670
|
var gridColumnCollection = [];
|
|
4669
4671
|
for (var i = 0; i < column.length; i++) {
|
|
4670
4672
|
index = index + 1;
|
|
@@ -6154,6 +6156,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6154
6156
|
}
|
|
6155
6157
|
removeClass([targetEle], 'e-treegridexpand');
|
|
6156
6158
|
}
|
|
6159
|
+
row.querySelectorAll('.e-treerowcell')[0].setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
|
|
6157
6160
|
var detailrows = gridRows.filter(function (r) {
|
|
6158
6161
|
return r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1));
|
|
6159
6162
|
});
|
|
@@ -6346,10 +6349,25 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6346
6349
|
return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
|
|
6347
6350
|
});
|
|
6348
6351
|
}
|
|
6352
|
+
var gridRowsObject = this.grid.getRowsObject();
|
|
6353
|
+
if (gridRowsObject[record.index].visible !== false) {
|
|
6354
|
+
gridRowsObject[record.index].visible = true;
|
|
6355
|
+
}
|
|
6356
|
+
var detailrows = gridRows.filter(function (r) {
|
|
6357
|
+
return r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1));
|
|
6358
|
+
});
|
|
6349
6359
|
for (var i = 0; i < rows.length; i++) {
|
|
6350
6360
|
if (!isNullOrUndefined(rows[i])) {
|
|
6351
6361
|
rows[i].style.display = displayAction;
|
|
6352
6362
|
}
|
|
6363
|
+
if (!isNullOrUndefined(rows[i]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6364
|
+
gridRowsObject[rows[i].rowIndex].visible = displayAction != 'none' ? true : false;
|
|
6365
|
+
if ("parentItem" in record) {
|
|
6366
|
+
if (gridRows[record.parentItem.index].getElementsByClassName('e-treegridcollapse').length) {
|
|
6367
|
+
gridRowsObject[record.index].visible = false;
|
|
6368
|
+
}
|
|
6369
|
+
}
|
|
6370
|
+
}
|
|
6353
6371
|
if (!isNullOrUndefined(movableRows)) {
|
|
6354
6372
|
movableRows[i].style.display = displayAction;
|
|
6355
6373
|
}
|
|
@@ -6365,6 +6383,15 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6365
6383
|
}
|
|
6366
6384
|
}
|
|
6367
6385
|
}
|
|
6386
|
+
for (var i = 0; i < detailrows.length; i++) {
|
|
6387
|
+
if (!isNullOrUndefined(detailrows[i]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6388
|
+
gridRowsObject[detailrows[i].rowIndex].visible = displayAction != 'none' ? true : false;
|
|
6389
|
+
detailrows[i].style.display = displayAction;
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6392
|
+
if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
6393
|
+
this.grid.notify('refresh-Expand-and-Collapse', { rows: this.grid.getRowsObject() });
|
|
6394
|
+
}
|
|
6368
6395
|
};
|
|
6369
6396
|
TreeGrid.prototype.updateAltRow = function (rows) {
|
|
6370
6397
|
if (this.enableAltRow && !this.rowTemplate) {
|
|
@@ -12788,7 +12815,7 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
12788
12815
|
};
|
|
12789
12816
|
TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback, instance) {
|
|
12790
12817
|
var _this = this;
|
|
12791
|
-
|
|
12818
|
+
//const delay: number = Browser.info.name === 'chrome' ? 200 : 100;
|
|
12792
12819
|
var options = 'options';
|
|
12793
12820
|
var movableEle = 'movableEle';
|
|
12794
12821
|
var element = 'element';
|