igniteui-angular 19.2.28 → 19.2.29
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.
|
@@ -63392,6 +63392,11 @@ class IgxGridNavigationService {
|
|
|
63392
63392
|
this._activeNode = {};
|
|
63393
63393
|
this.lastActiveNode = {};
|
|
63394
63394
|
this.pendingNavigation = false;
|
|
63395
|
+
this.keydownNotify = new Subject();
|
|
63396
|
+
this.keydownNotify.pipe(throttleTime(30, animationFrameScheduler))
|
|
63397
|
+
.subscribe((event) => {
|
|
63398
|
+
this.dispatchEvent(event);
|
|
63399
|
+
});
|
|
63395
63400
|
}
|
|
63396
63401
|
handleNavigation(event) {
|
|
63397
63402
|
const key = event.key.toLowerCase();
|
|
@@ -63405,7 +63410,7 @@ class IgxGridNavigationService {
|
|
|
63405
63410
|
event.preventDefault();
|
|
63406
63411
|
}
|
|
63407
63412
|
if (event.repeat) {
|
|
63408
|
-
|
|
63413
|
+
this.keydownNotify.next(event);
|
|
63409
63414
|
}
|
|
63410
63415
|
else {
|
|
63411
63416
|
this.dispatchEvent(event);
|
|
@@ -63440,10 +63445,8 @@ class IgxGridNavigationService {
|
|
|
63440
63445
|
event.preventDefault();
|
|
63441
63446
|
this.navigateInBody(position.rowIndex, position.colIndex, (obj) => {
|
|
63442
63447
|
obj.target.activate(event);
|
|
63443
|
-
this.grid.cdr.detectChanges();
|
|
63444
63448
|
});
|
|
63445
63449
|
}
|
|
63446
|
-
this.grid.cdr.detectChanges();
|
|
63447
63450
|
}
|
|
63448
63451
|
summaryNav(event) {
|
|
63449
63452
|
if (this.grid.hasSummarizedColumns) {
|
|
@@ -63485,7 +63488,6 @@ class IgxGridNavigationService {
|
|
|
63485
63488
|
this.grid.clearCellSelection();
|
|
63486
63489
|
this.grid.navigateTo(this.activeNode.row, this.activeNode.column, (obj) => {
|
|
63487
63490
|
obj.target?.activate(event);
|
|
63488
|
-
this.grid.cdr.detectChanges();
|
|
63489
63491
|
});
|
|
63490
63492
|
}
|
|
63491
63493
|
else {
|
|
@@ -63913,7 +63915,6 @@ class IgxGridNavigationService {
|
|
|
63913
63915
|
}
|
|
63914
63916
|
this.navigateInBody(next.rowIndex, next.visibleColumnIndex, (obj) => {
|
|
63915
63917
|
obj.target.activate(event);
|
|
63916
|
-
this.grid.cdr.detectChanges();
|
|
63917
63918
|
});
|
|
63918
63919
|
}
|
|
63919
63920
|
navigateInBody(rowIndex, visibleColIndex, cb = null) {
|
|
@@ -83847,27 +83848,36 @@ class IgxTreeGridHierarchizingPipe {
|
|
|
83847
83848
|
getRowID(primaryKey, rowData) {
|
|
83848
83849
|
return primaryKey ? rowData[primaryKey] : rowData;
|
|
83849
83850
|
}
|
|
83851
|
+
/**
|
|
83852
|
+
* Converts a flat array of data into a hierarchical (tree) structure,
|
|
83853
|
+
* preserving the original order of the records among siblings.
|
|
83854
|
+
*
|
|
83855
|
+
* It uses a two-pass approach:
|
|
83856
|
+
* 1. Creates all ITreeGridRecord objects and populates the Map for quick lookup.
|
|
83857
|
+
* 2. Links the records by iterating again, ensuring children are added to
|
|
83858
|
+
* their parent's children array in the order they appeared in the
|
|
83859
|
+
* original collection.
|
|
83860
|
+
*
|
|
83861
|
+
* @param collection The flat array of data to be hierarchized. This is the array whose order should be preserved.
|
|
83862
|
+
* @param primaryKey The name of the property in the data objects that serves as the unique identifier (e.g., 'id').
|
|
83863
|
+
* @param foreignKey The name of the property in the data objects that links to the parent's primary key (e.g., 'parentId').
|
|
83864
|
+
* @param map A pre-existing Map object (key: primaryKey value, value: ITreeGridRecord) used to store and quickly look up all created records.
|
|
83865
|
+
* @param flatData The original flat data array. Used for passing to the setIndentationLevels method (not directly used for hierarchy building).
|
|
83866
|
+
* @returns An array of ITreeGridRecord objects representing the root nodes of the hierarchy, ordered as they appeared in the original collection.
|
|
83867
|
+
*/
|
|
83850
83868
|
hierarchizeFlatData(collection, primaryKey, foreignKey, map, flatData) {
|
|
83851
|
-
const result = [];
|
|
83852
|
-
const missingParentRecords = [];
|
|
83853
83869
|
collection.forEach(row => {
|
|
83854
83870
|
const record = {
|
|
83855
83871
|
key: this.getRowID(primaryKey, row),
|
|
83856
83872
|
data: row,
|
|
83857
83873
|
children: []
|
|
83858
83874
|
};
|
|
83859
|
-
const parent = map.get(row[foreignKey]);
|
|
83860
|
-
if (parent) {
|
|
83861
|
-
record.parent = parent;
|
|
83862
|
-
parent.children.push(record);
|
|
83863
|
-
}
|
|
83864
|
-
else {
|
|
83865
|
-
missingParentRecords.push(record);
|
|
83866
|
-
}
|
|
83867
83875
|
map.set(row[primaryKey], record);
|
|
83868
83876
|
});
|
|
83869
|
-
|
|
83870
|
-
|
|
83877
|
+
const result = [];
|
|
83878
|
+
collection.forEach(row => {
|
|
83879
|
+
const record = map.get(row[primaryKey]);
|
|
83880
|
+
const parent = map.get(row[foreignKey]);
|
|
83871
83881
|
if (parent) {
|
|
83872
83882
|
record.parent = parent;
|
|
83873
83883
|
parent.children.push(record);
|