igniteui-angular 11.1.34 → 11.1.38
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/bundles/igniteui-angular.umd.js +30 -26
- package/bundles/igniteui-angular.umd.js.map +1 -1
- package/bundles/igniteui-angular.umd.min.js +1 -1
- package/bundles/igniteui-angular.umd.min.js.map +1 -1
- package/esm2015/lib/grids/summaries/grid-summary.service.js +3 -1
- package/esm2015/lib/grids/tree-grid/tree-grid-selection.service.js +28 -27
- package/fesm2015/igniteui-angular.js +29 -26
- package/fesm2015/igniteui-angular.js.map +1 -1
- package/igniteui-angular.metadata.json +1 -1
- package/lib/grids/tree-grid/tree-grid-selection.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -48494,10 +48494,13 @@
|
|
|
48494
48494
|
return rowSummaries;
|
|
48495
48495
|
};
|
|
48496
48496
|
IgxGridSummaryService.prototype.resetSummaryHeight = function () {
|
|
48497
|
+
var _this = this;
|
|
48497
48498
|
this.summaryHeight = 0;
|
|
48498
48499
|
this.grid._summaryPipeTrigger++;
|
|
48499
48500
|
if (this.grid.rootSummariesEnabled) {
|
|
48501
|
+
this.grid.summariesHeight = 0;
|
|
48500
48502
|
this.retriggerRootPipe++;
|
|
48503
|
+
Promise.resolve().then(function () { return _this.grid.notifyChanges(true); });
|
|
48501
48504
|
}
|
|
48502
48505
|
};
|
|
48503
48506
|
IgxGridSummaryService.prototype.updateSummaryCache = function (groupingArgs) {
|
|
@@ -66306,7 +66309,7 @@
|
|
|
66306
66309
|
if (!parents.size) {
|
|
66307
66310
|
return;
|
|
66308
66311
|
}
|
|
66309
|
-
visibleRowIDs = this.getRowIDs(this.allData);
|
|
66312
|
+
visibleRowIDs = new Set(this.getRowIDs(this.allData));
|
|
66310
66313
|
this.rowsToBeSelected = new Set(this.rowSelection);
|
|
66311
66314
|
this.rowsToBeIndeterminate = new Set(this.indeterminateRows);
|
|
66312
66315
|
if (crudRowID) {
|
|
@@ -66399,8 +66402,10 @@
|
|
|
66399
66402
|
* retrieve the rows which should be added/removed to/from the old selection
|
|
66400
66403
|
*/
|
|
66401
66404
|
IgxTreeGridSelectionService.prototype.handleAddedAndRemovedArgs = function (args) {
|
|
66402
|
-
|
|
66403
|
-
|
|
66405
|
+
var newSelectionSet = new Set(args.newSelection);
|
|
66406
|
+
var oldSelectionSet = new Set(args.oldSelection);
|
|
66407
|
+
args.removed = args.oldSelection.filter(function (x) { return !newSelectionSet.has(x); });
|
|
66408
|
+
args.added = args.newSelection.filter(function (x) { return !oldSelectionSet.has(x); });
|
|
66404
66409
|
};
|
|
66405
66410
|
/**
|
|
66406
66411
|
* adds to rowsToBeProcessed set all visible children of the rows which was initially within the rowsToBeProcessed set
|
|
@@ -66409,15 +66414,16 @@
|
|
|
66409
66414
|
* @param visibleRowIDs list of all visible rowIds
|
|
66410
66415
|
* @returns a new set with all direct parents of the rows within rowsToBeProcessed set
|
|
66411
66416
|
*/
|
|
66412
|
-
IgxTreeGridSelectionService.prototype.collectRowsChildrenAndDirectParents = function (rowsToBeProcessed, visibleRowIDs) {
|
|
66417
|
+
IgxTreeGridSelectionService.prototype.collectRowsChildrenAndDirectParents = function (rowsToBeProcessed, visibleRowIDs, adding) {
|
|
66413
66418
|
var _this = this;
|
|
66414
66419
|
var processedRowsParents = new Set();
|
|
66415
66420
|
Array.from(rowsToBeProcessed).forEach(function (rowID) {
|
|
66421
|
+
_this.selectDeselectRow(rowID, adding);
|
|
66416
66422
|
var rowTreeRecord = _this.grid.gridAPI.get_rec_by_id(rowID);
|
|
66417
66423
|
var rowAndAllChildren = _this.get_all_children(rowTreeRecord);
|
|
66418
66424
|
rowAndAllChildren.forEach(function (row) {
|
|
66419
|
-
if (visibleRowIDs.
|
|
66420
|
-
|
|
66425
|
+
if (visibleRowIDs.has(row.rowID)) {
|
|
66426
|
+
_this.selectDeselectRow(row.rowID, adding);
|
|
66421
66427
|
}
|
|
66422
66428
|
});
|
|
66423
66429
|
if (rowTreeRecord && rowTreeRecord.parent) {
|
|
@@ -66434,27 +66440,19 @@
|
|
|
66434
66440
|
var _this = this;
|
|
66435
66441
|
this.rowsToBeSelected = new Set(args.oldSelection ? args.oldSelection : this.getSelectedRows());
|
|
66436
66442
|
this.rowsToBeIndeterminate = new Set(this.getIndeterminateRows());
|
|
66437
|
-
var visibleRowIDs = this.getRowIDs(this.allData);
|
|
66443
|
+
var visibleRowIDs = new Set(this.getRowIDs(this.allData));
|
|
66438
66444
|
var removed = new Set(args.removed);
|
|
66439
66445
|
var added = new Set(args.added);
|
|
66440
66446
|
if (removed && removed.size) {
|
|
66441
66447
|
var removedRowsParents = new Set();
|
|
66442
|
-
removedRowsParents = this.collectRowsChildrenAndDirectParents(removed, visibleRowIDs);
|
|
66443
|
-
removed.forEach(function (removedRow) {
|
|
66444
|
-
_this.rowsToBeSelected.delete(removedRow);
|
|
66445
|
-
_this.rowsToBeIndeterminate.delete(removedRow);
|
|
66446
|
-
});
|
|
66448
|
+
removedRowsParents = this.collectRowsChildrenAndDirectParents(removed, visibleRowIDs, false);
|
|
66447
66449
|
Array.from(removedRowsParents).forEach(function (parent) {
|
|
66448
66450
|
_this.handleParentSelectionState(parent, visibleRowIDs);
|
|
66449
66451
|
});
|
|
66450
66452
|
}
|
|
66451
66453
|
if (added && added.size) {
|
|
66452
66454
|
var addedRowsParents = new Set();
|
|
66453
|
-
addedRowsParents = this.collectRowsChildrenAndDirectParents(added, visibleRowIDs);
|
|
66454
|
-
added.forEach(function (addedRow) {
|
|
66455
|
-
_this.rowsToBeSelected.add(addedRow);
|
|
66456
|
-
_this.rowsToBeIndeterminate.delete(addedRow);
|
|
66457
|
-
});
|
|
66455
|
+
addedRowsParents = this.collectRowsChildrenAndDirectParents(added, visibleRowIDs, true);
|
|
66458
66456
|
Array.from(addedRowsParents).forEach(function (parent) {
|
|
66459
66457
|
_this.handleParentSelectionState(parent, visibleRowIDs);
|
|
66460
66458
|
});
|
|
@@ -66479,31 +66477,27 @@
|
|
|
66479
66477
|
var _this = this;
|
|
66480
66478
|
var visibleChildren = [];
|
|
66481
66479
|
if (treeRow && treeRow.children) {
|
|
66482
|
-
visibleChildren = treeRow.children.filter(function (child) { return visibleRowIDs.
|
|
66480
|
+
visibleChildren = treeRow.children.filter(function (child) { return visibleRowIDs.has(child.rowID); });
|
|
66483
66481
|
}
|
|
66484
66482
|
if (visibleChildren.length) {
|
|
66485
66483
|
if (visibleChildren.every(function (row) { return _this.rowsToBeSelected.has(row.rowID); })) {
|
|
66486
|
-
this.
|
|
66487
|
-
this.rowsToBeIndeterminate.delete(treeRow.rowID);
|
|
66484
|
+
this.selectDeselectRow(treeRow.rowID, true);
|
|
66488
66485
|
}
|
|
66489
66486
|
else if (visibleChildren.some(function (row) { return _this.rowsToBeSelected.has(row.rowID) || _this.rowsToBeIndeterminate.has(row.rowID); })) {
|
|
66490
66487
|
this.rowsToBeIndeterminate.add(treeRow.rowID);
|
|
66491
66488
|
this.rowsToBeSelected.delete(treeRow.rowID);
|
|
66492
66489
|
}
|
|
66493
66490
|
else {
|
|
66494
|
-
this.
|
|
66495
|
-
this.rowsToBeSelected.delete(treeRow.rowID);
|
|
66491
|
+
this.selectDeselectRow(treeRow.rowID, false);
|
|
66496
66492
|
}
|
|
66497
66493
|
}
|
|
66498
66494
|
else {
|
|
66499
66495
|
// if the children of the row has been deleted and the row was selected do not change its state
|
|
66500
66496
|
if (this.isRowSelected(treeRow.rowID)) {
|
|
66501
|
-
this.
|
|
66502
|
-
this.rowsToBeIndeterminate.delete(treeRow.rowID);
|
|
66497
|
+
this.selectDeselectRow(treeRow.rowID, true);
|
|
66503
66498
|
}
|
|
66504
66499
|
else {
|
|
66505
|
-
this.
|
|
66506
|
-
this.rowsToBeIndeterminate.delete(treeRow.rowID);
|
|
66500
|
+
this.selectDeselectRow(treeRow.rowID, false);
|
|
66507
66501
|
}
|
|
66508
66502
|
}
|
|
66509
66503
|
};
|
|
@@ -66528,6 +66522,16 @@
|
|
|
66528
66522
|
}
|
|
66529
66523
|
return children;
|
|
66530
66524
|
};
|
|
66525
|
+
IgxTreeGridSelectionService.prototype.selectDeselectRow = function (rowID, select) {
|
|
66526
|
+
if (select) {
|
|
66527
|
+
this.rowsToBeSelected.add(rowID);
|
|
66528
|
+
this.rowsToBeIndeterminate.delete(rowID);
|
|
66529
|
+
}
|
|
66530
|
+
else {
|
|
66531
|
+
this.rowsToBeSelected.delete(rowID);
|
|
66532
|
+
this.rowsToBeIndeterminate.delete(rowID);
|
|
66533
|
+
}
|
|
66534
|
+
};
|
|
66531
66535
|
return IgxTreeGridSelectionService;
|
|
66532
66536
|
}(IgxGridSelectionService));
|
|
66533
66537
|
IgxTreeGridSelectionService.decorators = [
|