igniteui-angular 11.1.33 → 11.1.37
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/LICENSE +16 -0
- package/bundles/igniteui-angular.umd.js +28 -27
- 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/filtering/excel-style/grid.excel-style-filtering.component.js +2 -2
- package/esm2015/lib/grids/tree-grid/tree-grid-selection.service.js +28 -27
- package/fesm2015/igniteui-angular.js +28 -27
- 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
|
@@ -34291,7 +34291,7 @@ IgxGridExcelStyleFilteringComponent.decorators = [
|
|
|
34291
34291
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34292
34292
|
preserveWhitespaces: false,
|
|
34293
34293
|
selector: 'igx-grid-excel-style-filtering',
|
|
34294
|
-
template: "<ng-template #defaultExcelColumnOperations>\n <igx-excel-style-header\n [showHiding]=\"displayDensity !== 'comfortable' && !column?.disableHiding\"\n [showPinning]=\"displayDensity !== 'comfortable' && !column?.disablePinning\"\n [showSelecting]=\"displayDensity !== 'comfortable' && columnSelectable()\"\n >\n </igx-excel-style-header>\n\n <igx-excel-style-sorting *ngIf=\"column?.sortable\">\n </igx-excel-style-sorting>\n\n <igx-excel-style-moving *ngIf=\"column?.movable\">\n </igx-excel-style-moving>\n\n <igx-excel-style-pinning *ngIf=\"!column?.disablePinning && displayDensity==='comfortable'\">\n </igx-excel-style-pinning>\n\n <igx-excel-style-hiding *ngIf=\"!column?.disableHiding && displayDensity==='comfortable'\">\n </igx-excel-style-hiding>\n\n <igx-excel-style-selecting *ngIf=\"columnSelectable() && displayDensity==='comfortable'\">\n </igx-excel-style-selecting>\n</ng-template>\n\n<ng-template #defaultExcelFilterOperations>\n <igx-excel-style-clear-filters>\n </igx-excel-style-clear-filters>\n\n <igx-excel-style-conditional-filter>\n </igx-excel-style-conditional-filter>\n\n <igx-excel-style-search>\n </igx-excel-style-search>\n</ng-template>\n\n<article #mainDropdown\n class=\"igx-excel-filter__menu\"\n [ngClass]=\"{\n 'igx-excel-filter__menu--cosy': displayDensity === 'cosy',\n 'igx-excel-filter__menu--compact': displayDensity === 'compact'\n }\"\n [id]=\"overlayComponentId\"\n (keydown)=\"onKeyDown($event)\"\n [style.min-height]=\"minHeight\"\n [style.max-height]=\"maxHeight\">\n\n <ng-container *ngIf=\"this.excelColumnOperationsDirective; else defaultExcelColumnOperations\">\n <ng-content select=\"igx-excel-style-column-operations,[igxExcelStyleColumnOperations]\">\n </ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"this.excelFilterOperationsDirective; else defaultExcelFilterOperations\">\n <ng-content select=\"igx-excel-style-filter-operations,[igxExcelStyleFilterOperations]\">\n </ng-content>\n </ng-container>\n</article>\n"
|
|
34294
|
+
template: "<ng-template #defaultExcelColumnOperations>\n <igx-excel-style-header\n [showHiding]=\"displayDensity !== 'comfortable' && !column?.disableHiding\"\n [showPinning]=\"displayDensity !== 'comfortable' && !column?.disablePinning\"\n [showSelecting]=\"displayDensity !== 'comfortable' && columnSelectable()\"\n >\n </igx-excel-style-header>\n\n <igx-excel-style-sorting *ngIf=\"column?.sortable\">\n </igx-excel-style-sorting>\n\n <igx-excel-style-moving *ngIf=\"column?.movable\">\n </igx-excel-style-moving>\n\n <igx-excel-style-pinning *ngIf=\"!column?.disablePinning && displayDensity==='comfortable'\">\n </igx-excel-style-pinning>\n\n <igx-excel-style-hiding *ngIf=\"!column?.disableHiding && displayDensity==='comfortable'\">\n </igx-excel-style-hiding>\n\n <igx-excel-style-selecting *ngIf=\"columnSelectable() && displayDensity==='comfortable'\">\n </igx-excel-style-selecting>\n</ng-template>\n\n<ng-template #defaultExcelFilterOperations>\n <igx-excel-style-clear-filters>\n </igx-excel-style-clear-filters>\n\n <igx-excel-style-conditional-filter>\n </igx-excel-style-conditional-filter>\n\n <igx-excel-style-search>\n </igx-excel-style-search>\n</ng-template>\n\n<article #mainDropdown\n class=\"igx-excel-filter__menu\"\n [ngClass]=\"{\n 'igx-excel-filter__menu--cosy': displayDensity === 'cosy',\n 'igx-excel-filter__menu--compact': displayDensity === 'compact'\n }\"\n [id]=\"overlayComponentId\"\n (keydown)=\"onKeyDown($event)\"\n [style.min-height]=\"minHeight\"\n [style.max-height]=\"maxHeight\"\n role=\"menu\">\n\n <ng-container *ngIf=\"this.excelColumnOperationsDirective; else defaultExcelColumnOperations\">\n <ng-content select=\"igx-excel-style-column-operations,[igxExcelStyleColumnOperations]\">\n </ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"this.excelFilterOperationsDirective; else defaultExcelFilterOperations\">\n <ng-content select=\"igx-excel-style-filter-operations,[igxExcelStyleFilterOperations]\">\n </ng-content>\n </ng-container>\n</article>\n"
|
|
34295
34295
|
},] }
|
|
34296
34296
|
];
|
|
34297
34297
|
IgxGridExcelStyleFilteringComponent.ctorParameters = () => [
|
|
@@ -59217,7 +59217,7 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
|
|
|
59217
59217
|
if (!parents.size) {
|
|
59218
59218
|
return;
|
|
59219
59219
|
}
|
|
59220
|
-
visibleRowIDs = this.getRowIDs(this.allData);
|
|
59220
|
+
visibleRowIDs = new Set(this.getRowIDs(this.allData));
|
|
59221
59221
|
this.rowsToBeSelected = new Set(this.rowSelection);
|
|
59222
59222
|
this.rowsToBeIndeterminate = new Set(this.indeterminateRows);
|
|
59223
59223
|
if (crudRowID) {
|
|
@@ -59304,8 +59304,10 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
|
|
|
59304
59304
|
* retrieve the rows which should be added/removed to/from the old selection
|
|
59305
59305
|
*/
|
|
59306
59306
|
handleAddedAndRemovedArgs(args) {
|
|
59307
|
-
|
|
59308
|
-
|
|
59307
|
+
const newSelectionSet = new Set(args.newSelection);
|
|
59308
|
+
const oldSelectionSet = new Set(args.oldSelection);
|
|
59309
|
+
args.removed = args.oldSelection.filter(x => !newSelectionSet.has(x));
|
|
59310
|
+
args.added = args.newSelection.filter(x => !oldSelectionSet.has(x));
|
|
59309
59311
|
}
|
|
59310
59312
|
/**
|
|
59311
59313
|
* adds to rowsToBeProcessed set all visible children of the rows which was initially within the rowsToBeProcessed set
|
|
@@ -59314,14 +59316,15 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
|
|
|
59314
59316
|
* @param visibleRowIDs list of all visible rowIds
|
|
59315
59317
|
* @returns a new set with all direct parents of the rows within rowsToBeProcessed set
|
|
59316
59318
|
*/
|
|
59317
|
-
collectRowsChildrenAndDirectParents(rowsToBeProcessed, visibleRowIDs) {
|
|
59319
|
+
collectRowsChildrenAndDirectParents(rowsToBeProcessed, visibleRowIDs, adding) {
|
|
59318
59320
|
const processedRowsParents = new Set();
|
|
59319
59321
|
Array.from(rowsToBeProcessed).forEach((rowID) => {
|
|
59322
|
+
this.selectDeselectRow(rowID, adding);
|
|
59320
59323
|
const rowTreeRecord = this.grid.gridAPI.get_rec_by_id(rowID);
|
|
59321
59324
|
const rowAndAllChildren = this.get_all_children(rowTreeRecord);
|
|
59322
59325
|
rowAndAllChildren.forEach(row => {
|
|
59323
|
-
if (visibleRowIDs.
|
|
59324
|
-
|
|
59326
|
+
if (visibleRowIDs.has(row.rowID)) {
|
|
59327
|
+
this.selectDeselectRow(row.rowID, adding);
|
|
59325
59328
|
}
|
|
59326
59329
|
});
|
|
59327
59330
|
if (rowTreeRecord && rowTreeRecord.parent) {
|
|
@@ -59337,27 +59340,19 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
|
|
|
59337
59340
|
calculateRowsNewSelectionState(args) {
|
|
59338
59341
|
this.rowsToBeSelected = new Set(args.oldSelection ? args.oldSelection : this.getSelectedRows());
|
|
59339
59342
|
this.rowsToBeIndeterminate = new Set(this.getIndeterminateRows());
|
|
59340
|
-
const visibleRowIDs = this.getRowIDs(this.allData);
|
|
59343
|
+
const visibleRowIDs = new Set(this.getRowIDs(this.allData));
|
|
59341
59344
|
const removed = new Set(args.removed);
|
|
59342
59345
|
const added = new Set(args.added);
|
|
59343
59346
|
if (removed && removed.size) {
|
|
59344
59347
|
let removedRowsParents = new Set();
|
|
59345
|
-
removedRowsParents = this.collectRowsChildrenAndDirectParents(removed, visibleRowIDs);
|
|
59346
|
-
removed.forEach(removedRow => {
|
|
59347
|
-
this.rowsToBeSelected.delete(removedRow);
|
|
59348
|
-
this.rowsToBeIndeterminate.delete(removedRow);
|
|
59349
|
-
});
|
|
59348
|
+
removedRowsParents = this.collectRowsChildrenAndDirectParents(removed, visibleRowIDs, false);
|
|
59350
59349
|
Array.from(removedRowsParents).forEach((parent) => {
|
|
59351
59350
|
this.handleParentSelectionState(parent, visibleRowIDs);
|
|
59352
59351
|
});
|
|
59353
59352
|
}
|
|
59354
59353
|
if (added && added.size) {
|
|
59355
59354
|
let addedRowsParents = new Set();
|
|
59356
|
-
addedRowsParents = this.collectRowsChildrenAndDirectParents(added, visibleRowIDs);
|
|
59357
|
-
added.forEach(addedRow => {
|
|
59358
|
-
this.rowsToBeSelected.add(addedRow);
|
|
59359
|
-
this.rowsToBeIndeterminate.delete(addedRow);
|
|
59360
|
-
});
|
|
59355
|
+
addedRowsParents = this.collectRowsChildrenAndDirectParents(added, visibleRowIDs, true);
|
|
59361
59356
|
Array.from(addedRowsParents).forEach((parent) => {
|
|
59362
59357
|
this.handleParentSelectionState(parent, visibleRowIDs);
|
|
59363
59358
|
});
|
|
@@ -59381,31 +59376,27 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
|
|
|
59381
59376
|
handleRowSelectionState(treeRow, visibleRowIDs) {
|
|
59382
59377
|
let visibleChildren = [];
|
|
59383
59378
|
if (treeRow && treeRow.children) {
|
|
59384
|
-
visibleChildren = treeRow.children.filter(child => visibleRowIDs.
|
|
59379
|
+
visibleChildren = treeRow.children.filter(child => visibleRowIDs.has(child.rowID));
|
|
59385
59380
|
}
|
|
59386
59381
|
if (visibleChildren.length) {
|
|
59387
59382
|
if (visibleChildren.every(row => this.rowsToBeSelected.has(row.rowID))) {
|
|
59388
|
-
this.
|
|
59389
|
-
this.rowsToBeIndeterminate.delete(treeRow.rowID);
|
|
59383
|
+
this.selectDeselectRow(treeRow.rowID, true);
|
|
59390
59384
|
}
|
|
59391
59385
|
else if (visibleChildren.some(row => this.rowsToBeSelected.has(row.rowID) || this.rowsToBeIndeterminate.has(row.rowID))) {
|
|
59392
59386
|
this.rowsToBeIndeterminate.add(treeRow.rowID);
|
|
59393
59387
|
this.rowsToBeSelected.delete(treeRow.rowID);
|
|
59394
59388
|
}
|
|
59395
59389
|
else {
|
|
59396
|
-
this.
|
|
59397
|
-
this.rowsToBeSelected.delete(treeRow.rowID);
|
|
59390
|
+
this.selectDeselectRow(treeRow.rowID, false);
|
|
59398
59391
|
}
|
|
59399
59392
|
}
|
|
59400
59393
|
else {
|
|
59401
59394
|
// if the children of the row has been deleted and the row was selected do not change its state
|
|
59402
59395
|
if (this.isRowSelected(treeRow.rowID)) {
|
|
59403
|
-
this.
|
|
59404
|
-
this.rowsToBeIndeterminate.delete(treeRow.rowID);
|
|
59396
|
+
this.selectDeselectRow(treeRow.rowID, true);
|
|
59405
59397
|
}
|
|
59406
59398
|
else {
|
|
59407
|
-
this.
|
|
59408
|
-
this.rowsToBeIndeterminate.delete(treeRow.rowID);
|
|
59399
|
+
this.selectDeselectRow(treeRow.rowID, false);
|
|
59409
59400
|
}
|
|
59410
59401
|
}
|
|
59411
59402
|
}
|
|
@@ -59419,6 +59410,16 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
|
|
|
59419
59410
|
}
|
|
59420
59411
|
return children;
|
|
59421
59412
|
}
|
|
59413
|
+
selectDeselectRow(rowID, select) {
|
|
59414
|
+
if (select) {
|
|
59415
|
+
this.rowsToBeSelected.add(rowID);
|
|
59416
|
+
this.rowsToBeIndeterminate.delete(rowID);
|
|
59417
|
+
}
|
|
59418
|
+
else {
|
|
59419
|
+
this.rowsToBeSelected.delete(rowID);
|
|
59420
|
+
this.rowsToBeIndeterminate.delete(rowID);
|
|
59421
|
+
}
|
|
59422
|
+
}
|
|
59422
59423
|
}
|
|
59423
59424
|
IgxTreeGridSelectionService.decorators = [
|
|
59424
59425
|
{ type: Injectable }
|