igniteui-angular 19.2.28 → 19.2.30
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.
|
@@ -1120,7 +1120,12 @@ class IgxSorting {
|
|
|
1120
1120
|
const isDate = column?.dataType === DATE_TYPE || column?.dataType === DATE_TIME_TYPE;
|
|
1121
1121
|
const isTime = column?.dataType === TIME_TYPE || column?.dataType === DATE_TIME_TYPE;
|
|
1122
1122
|
const isString = column?.dataType === STRING_TYPE;
|
|
1123
|
-
|
|
1123
|
+
if (expr.dir === SortingDirection.None) {
|
|
1124
|
+
data = this.sortDataRecursive(data, expressions, expressionIndex + 1, grid);
|
|
1125
|
+
}
|
|
1126
|
+
else {
|
|
1127
|
+
data = expr.strategy.sort(data, expr.fieldName, expr.dir, expr.ignoreCase, this.getFieldValue, isDate, isTime, grid);
|
|
1128
|
+
}
|
|
1124
1129
|
if (expressionIndex === exprsLen - 1) {
|
|
1125
1130
|
return data;
|
|
1126
1131
|
}
|
|
@@ -63392,6 +63397,11 @@ class IgxGridNavigationService {
|
|
|
63392
63397
|
this._activeNode = {};
|
|
63393
63398
|
this.lastActiveNode = {};
|
|
63394
63399
|
this.pendingNavigation = false;
|
|
63400
|
+
this.keydownNotify = new Subject();
|
|
63401
|
+
this.keydownNotify.pipe(throttleTime(30, animationFrameScheduler))
|
|
63402
|
+
.subscribe((event) => {
|
|
63403
|
+
this.dispatchEvent(event);
|
|
63404
|
+
});
|
|
63395
63405
|
}
|
|
63396
63406
|
handleNavigation(event) {
|
|
63397
63407
|
const key = event.key.toLowerCase();
|
|
@@ -63405,7 +63415,7 @@ class IgxGridNavigationService {
|
|
|
63405
63415
|
event.preventDefault();
|
|
63406
63416
|
}
|
|
63407
63417
|
if (event.repeat) {
|
|
63408
|
-
|
|
63418
|
+
this.keydownNotify.next(event);
|
|
63409
63419
|
}
|
|
63410
63420
|
else {
|
|
63411
63421
|
this.dispatchEvent(event);
|
|
@@ -63440,10 +63450,8 @@ class IgxGridNavigationService {
|
|
|
63440
63450
|
event.preventDefault();
|
|
63441
63451
|
this.navigateInBody(position.rowIndex, position.colIndex, (obj) => {
|
|
63442
63452
|
obj.target.activate(event);
|
|
63443
|
-
this.grid.cdr.detectChanges();
|
|
63444
63453
|
});
|
|
63445
63454
|
}
|
|
63446
|
-
this.grid.cdr.detectChanges();
|
|
63447
63455
|
}
|
|
63448
63456
|
summaryNav(event) {
|
|
63449
63457
|
if (this.grid.hasSummarizedColumns) {
|
|
@@ -63485,7 +63493,6 @@ class IgxGridNavigationService {
|
|
|
63485
63493
|
this.grid.clearCellSelection();
|
|
63486
63494
|
this.grid.navigateTo(this.activeNode.row, this.activeNode.column, (obj) => {
|
|
63487
63495
|
obj.target?.activate(event);
|
|
63488
|
-
this.grid.cdr.detectChanges();
|
|
63489
63496
|
});
|
|
63490
63497
|
}
|
|
63491
63498
|
else {
|
|
@@ -63913,7 +63920,6 @@ class IgxGridNavigationService {
|
|
|
63913
63920
|
}
|
|
63914
63921
|
this.navigateInBody(next.rowIndex, next.visibleColumnIndex, (obj) => {
|
|
63915
63922
|
obj.target.activate(event);
|
|
63916
|
-
this.grid.cdr.detectChanges();
|
|
63917
63923
|
});
|
|
63918
63924
|
}
|
|
63919
63925
|
navigateInBody(rowIndex, visibleColIndex, cb = null) {
|
|
@@ -83847,27 +83853,36 @@ class IgxTreeGridHierarchizingPipe {
|
|
|
83847
83853
|
getRowID(primaryKey, rowData) {
|
|
83848
83854
|
return primaryKey ? rowData[primaryKey] : rowData;
|
|
83849
83855
|
}
|
|
83856
|
+
/**
|
|
83857
|
+
* Converts a flat array of data into a hierarchical (tree) structure,
|
|
83858
|
+
* preserving the original order of the records among siblings.
|
|
83859
|
+
*
|
|
83860
|
+
* It uses a two-pass approach:
|
|
83861
|
+
* 1. Creates all ITreeGridRecord objects and populates the Map for quick lookup.
|
|
83862
|
+
* 2. Links the records by iterating again, ensuring children are added to
|
|
83863
|
+
* their parent's children array in the order they appeared in the
|
|
83864
|
+
* original collection.
|
|
83865
|
+
*
|
|
83866
|
+
* @param collection The flat array of data to be hierarchized. This is the array whose order should be preserved.
|
|
83867
|
+
* @param primaryKey The name of the property in the data objects that serves as the unique identifier (e.g., 'id').
|
|
83868
|
+
* @param foreignKey The name of the property in the data objects that links to the parent's primary key (e.g., 'parentId').
|
|
83869
|
+
* @param map A pre-existing Map object (key: primaryKey value, value: ITreeGridRecord) used to store and quickly look up all created records.
|
|
83870
|
+
* @param flatData The original flat data array. Used for passing to the setIndentationLevels method (not directly used for hierarchy building).
|
|
83871
|
+
* @returns An array of ITreeGridRecord objects representing the root nodes of the hierarchy, ordered as they appeared in the original collection.
|
|
83872
|
+
*/
|
|
83850
83873
|
hierarchizeFlatData(collection, primaryKey, foreignKey, map, flatData) {
|
|
83851
|
-
const result = [];
|
|
83852
|
-
const missingParentRecords = [];
|
|
83853
83874
|
collection.forEach(row => {
|
|
83854
83875
|
const record = {
|
|
83855
83876
|
key: this.getRowID(primaryKey, row),
|
|
83856
83877
|
data: row,
|
|
83857
83878
|
children: []
|
|
83858
83879
|
};
|
|
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
83880
|
map.set(row[primaryKey], record);
|
|
83868
83881
|
});
|
|
83869
|
-
|
|
83870
|
-
|
|
83882
|
+
const result = [];
|
|
83883
|
+
collection.forEach(row => {
|
|
83884
|
+
const record = map.get(row[primaryKey]);
|
|
83885
|
+
const parent = map.get(row[foreignKey]);
|
|
83871
83886
|
if (parent) {
|
|
83872
83887
|
record.parent = parent;
|
|
83873
83888
|
parent.children.push(record);
|
|
@@ -93026,12 +93041,10 @@ class IgxSplitterComponent {
|
|
|
93026
93041
|
onMoveEnd(delta) {
|
|
93027
93042
|
let [paneSize, siblingSize] = this.calcNewSizes(delta);
|
|
93028
93043
|
if (paneSize + siblingSize > this.getTotalSize() && delta < 0) {
|
|
93029
|
-
|
|
93030
|
-
siblingSize = 0;
|
|
93044
|
+
siblingSize = this.getTotalSize() - paneSize;
|
|
93031
93045
|
}
|
|
93032
93046
|
else if (paneSize + siblingSize > this.getTotalSize() && delta > 0) {
|
|
93033
|
-
paneSize =
|
|
93034
|
-
siblingSize = this.getTotalSize();
|
|
93047
|
+
paneSize = this.getTotalSize() - siblingSize;
|
|
93035
93048
|
}
|
|
93036
93049
|
if (this.pane.isPercentageSize) {
|
|
93037
93050
|
// handle % resizes
|