igniteui-angular 20.1.3 → 20.1.4
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/fesm2022/igniteui-angular.mjs +27 -17
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -64630,6 +64630,11 @@ class IgxGridNavigationService {
|
|
|
64630
64630
|
this._activeNode = {};
|
|
64631
64631
|
this.lastActiveNode = {};
|
|
64632
64632
|
this.pendingNavigation = false;
|
|
64633
|
+
this.keydownNotify = new Subject();
|
|
64634
|
+
this.keydownNotify.pipe(throttleTime(30, animationFrameScheduler))
|
|
64635
|
+
.subscribe((event) => {
|
|
64636
|
+
this.dispatchEvent(event);
|
|
64637
|
+
});
|
|
64633
64638
|
}
|
|
64634
64639
|
handleNavigation(event) {
|
|
64635
64640
|
const key = event.key.toLowerCase();
|
|
@@ -64643,7 +64648,7 @@ class IgxGridNavigationService {
|
|
|
64643
64648
|
event.preventDefault();
|
|
64644
64649
|
}
|
|
64645
64650
|
if (event.repeat) {
|
|
64646
|
-
|
|
64651
|
+
this.keydownNotify.next(event);
|
|
64647
64652
|
}
|
|
64648
64653
|
else {
|
|
64649
64654
|
this.dispatchEvent(event);
|
|
@@ -64678,10 +64683,8 @@ class IgxGridNavigationService {
|
|
|
64678
64683
|
event.preventDefault();
|
|
64679
64684
|
this.navigateInBody(position.rowIndex, position.colIndex, (obj) => {
|
|
64680
64685
|
obj.target.activate(event);
|
|
64681
|
-
this.grid.cdr.detectChanges();
|
|
64682
64686
|
});
|
|
64683
64687
|
}
|
|
64684
|
-
this.grid.cdr.detectChanges();
|
|
64685
64688
|
}
|
|
64686
64689
|
summaryNav(event) {
|
|
64687
64690
|
if (this.grid.hasSummarizedColumns) {
|
|
@@ -64723,7 +64726,6 @@ class IgxGridNavigationService {
|
|
|
64723
64726
|
this.grid.clearCellSelection();
|
|
64724
64727
|
this.grid.navigateTo(this.activeNode.row, this.activeNode.column, (obj) => {
|
|
64725
64728
|
obj.target?.activate(event);
|
|
64726
|
-
this.grid.cdr.detectChanges();
|
|
64727
64729
|
});
|
|
64728
64730
|
}
|
|
64729
64731
|
else {
|
|
@@ -65151,7 +65153,6 @@ class IgxGridNavigationService {
|
|
|
65151
65153
|
}
|
|
65152
65154
|
this.navigateInBody(next.rowIndex, next.visibleColumnIndex, (obj) => {
|
|
65153
65155
|
obj.target.activate(event);
|
|
65154
|
-
this.grid.cdr.detectChanges();
|
|
65155
65156
|
});
|
|
65156
65157
|
}
|
|
65157
65158
|
navigateInBody(rowIndex, visibleColIndex, cb = null) {
|
|
@@ -85468,27 +85469,36 @@ class IgxTreeGridHierarchizingPipe {
|
|
|
85468
85469
|
getRowID(primaryKey, rowData) {
|
|
85469
85470
|
return primaryKey ? rowData[primaryKey] : rowData;
|
|
85470
85471
|
}
|
|
85472
|
+
/**
|
|
85473
|
+
* Converts a flat array of data into a hierarchical (tree) structure,
|
|
85474
|
+
* preserving the original order of the records among siblings.
|
|
85475
|
+
*
|
|
85476
|
+
* It uses a two-pass approach:
|
|
85477
|
+
* 1. Creates all ITreeGridRecord objects and populates the Map for quick lookup.
|
|
85478
|
+
* 2. Links the records by iterating again, ensuring children are added to
|
|
85479
|
+
* their parent's children array in the order they appeared in the
|
|
85480
|
+
* original collection.
|
|
85481
|
+
*
|
|
85482
|
+
* @param collection The flat array of data to be hierarchized. This is the array whose order should be preserved.
|
|
85483
|
+
* @param primaryKey The name of the property in the data objects that serves as the unique identifier (e.g., 'id').
|
|
85484
|
+
* @param foreignKey The name of the property in the data objects that links to the parent's primary key (e.g., 'parentId').
|
|
85485
|
+
* @param map A pre-existing Map object (key: primaryKey value, value: ITreeGridRecord) used to store and quickly look up all created records.
|
|
85486
|
+
* @param flatData The original flat data array. Used for passing to the setIndentationLevels method (not directly used for hierarchy building).
|
|
85487
|
+
* @returns An array of ITreeGridRecord objects representing the root nodes of the hierarchy, ordered as they appeared in the original collection.
|
|
85488
|
+
*/
|
|
85471
85489
|
hierarchizeFlatData(collection, primaryKey, foreignKey, map, flatData) {
|
|
85472
|
-
const result = [];
|
|
85473
|
-
const missingParentRecords = [];
|
|
85474
85490
|
collection.forEach(row => {
|
|
85475
85491
|
const record = {
|
|
85476
85492
|
key: this.getRowID(primaryKey, row),
|
|
85477
85493
|
data: row,
|
|
85478
85494
|
children: []
|
|
85479
85495
|
};
|
|
85480
|
-
const parent = map.get(row[foreignKey]);
|
|
85481
|
-
if (parent) {
|
|
85482
|
-
record.parent = parent;
|
|
85483
|
-
parent.children.push(record);
|
|
85484
|
-
}
|
|
85485
|
-
else {
|
|
85486
|
-
missingParentRecords.push(record);
|
|
85487
|
-
}
|
|
85488
85496
|
map.set(row[primaryKey], record);
|
|
85489
85497
|
});
|
|
85490
|
-
|
|
85491
|
-
|
|
85498
|
+
const result = [];
|
|
85499
|
+
collection.forEach(row => {
|
|
85500
|
+
const record = map.get(row[primaryKey]);
|
|
85501
|
+
const parent = map.get(row[foreignKey]);
|
|
85492
85502
|
if (parent) {
|
|
85493
85503
|
record.parent = parent;
|
|
85494
85504
|
parent.children.push(record);
|