igniteui-angular 18.0.0 → 18.0.2
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/esm2022/lib/calendar/month-picker/month-picker.component.mjs +9 -1
- package/esm2022/lib/directives/for-of/for_of.directive.mjs +13 -2
- package/esm2022/lib/directives/for-of/for_of.sync.service.mjs +6 -1
- package/esm2022/lib/directives/tooltip/tooltip-target.directive.mjs +3 -2
- package/esm2022/lib/grids/common/events.mjs +1 -1
- package/esm2022/lib/grids/common/grid.interface.mjs +1 -1
- package/esm2022/lib/grids/common/strategy.mjs +2 -2
- package/esm2022/lib/grids/common/types.mjs +1 -1
- package/esm2022/lib/grids/grid-base.directive.mjs +45 -45
- package/esm2022/lib/grids/hierarchical-grid/hierarchical-grid.component.mjs +2 -2
- package/esm2022/lib/grids/selection/selection.service.mjs +12 -16
- package/esm2022/lib/simple-combo/simple-combo.component.mjs +7 -5
- package/fesm2022/igniteui-angular.mjs +89 -66
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/lib/directives/for-of/for_of.directive.d.ts +5 -0
- package/lib/grids/common/events.d.ts +30 -30
- package/lib/grids/common/grid.interface.d.ts +49 -49
- package/lib/grids/common/strategy.d.ts +1 -1
- package/lib/grids/common/types.d.ts +2 -2
- package/lib/grids/grid-base.directive.d.ts +2 -1
- package/migrations/update-18_0_0/index.js +13 -5
- package/package.json +1 -1
|
@@ -1067,7 +1067,7 @@ class NoopSortingStrategy {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
/**
|
|
1069
1069
|
* Represents a class extending the IgxSorting class
|
|
1070
|
-
*
|
|
1070
|
+
* Provides custom data record sorting.
|
|
1071
1071
|
*/
|
|
1072
1072
|
class IgxDataRecordSorting extends IgxSorting {
|
|
1073
1073
|
/**
|
|
@@ -12650,6 +12650,11 @@ class IgxForOfSyncService {
|
|
|
12650
12650
|
*/
|
|
12651
12651
|
setMaster(directive, forced = false) {
|
|
12652
12652
|
const orientation = directive.igxForScrollOrientation;
|
|
12653
|
+
// in case master is not in dom, set a new master
|
|
12654
|
+
const isMasterInDom = this._master.get(orientation)?.dc?.instance?._viewContainer.element.nativeElement.isConnected;
|
|
12655
|
+
if (!isMasterInDom) {
|
|
12656
|
+
forced = true;
|
|
12657
|
+
}
|
|
12653
12658
|
if (orientation && (forced || !this._master.has(orientation))) {
|
|
12654
12659
|
this._master.set(orientation, directive);
|
|
12655
12660
|
}
|
|
@@ -13408,6 +13413,17 @@ class IgxForOfDirective extends IgxForOfToken {
|
|
|
13408
13413
|
this.chunkLoad.emit(this.state);
|
|
13409
13414
|
}
|
|
13410
13415
|
}
|
|
13416
|
+
/**
|
|
13417
|
+
* @hidden
|
|
13418
|
+
* @internal
|
|
13419
|
+
*/
|
|
13420
|
+
updateScroll() {
|
|
13421
|
+
if (this.igxForScrollOrientation === "horizontal") {
|
|
13422
|
+
const scrollAmount = this.scrollComponent.nativeElement["scrollLeft"];
|
|
13423
|
+
this.scrollComponent.scrollAmount = scrollAmount;
|
|
13424
|
+
this._updateScrollOffset();
|
|
13425
|
+
}
|
|
13426
|
+
}
|
|
13411
13427
|
updateSizes() {
|
|
13412
13428
|
if (!this.scrollComponent.nativeElement.isConnected)
|
|
13413
13429
|
return;
|
|
@@ -14064,7 +14080,7 @@ class IgxGridForOfDirective extends IgxForOfDirective {
|
|
|
14064
14080
|
}
|
|
14065
14081
|
if (this.igxForScrollOrientation === 'horizontal') {
|
|
14066
14082
|
// in case collection has changes, reset sync service
|
|
14067
|
-
this.syncService.setMaster(this,
|
|
14083
|
+
this.syncService.setMaster(this, this.igxGridForOfUniqueSizeCache);
|
|
14068
14084
|
}
|
|
14069
14085
|
}
|
|
14070
14086
|
const defaultItemSize = 'igxForItemSize';
|
|
@@ -17987,7 +18003,7 @@ class IgxTooltipTargetDirective extends IgxToggleActionDirective {
|
|
|
17987
18003
|
* @hidden
|
|
17988
18004
|
*/
|
|
17989
18005
|
set target(target) {
|
|
17990
|
-
if (target
|
|
18006
|
+
if (target instanceof IgxTooltipDirective) {
|
|
17991
18007
|
this._target = target;
|
|
17992
18008
|
}
|
|
17993
18009
|
}
|
|
@@ -25081,20 +25097,17 @@ class IgxGridSelectionService {
|
|
|
25081
25097
|
return keys.some(k => this.isPivotRowSelected(k));
|
|
25082
25098
|
});
|
|
25083
25099
|
}
|
|
25084
|
-
if (this.
|
|
25085
|
-
|
|
25086
|
-
|
|
25087
|
-
|
|
25088
|
-
|
|
25089
|
-
this.
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
|
|
25093
|
-
|
|
25094
|
-
|
|
25095
|
-
return selection;
|
|
25096
|
-
}
|
|
25097
|
-
return this.rowSelection.size ? this.grid.gridAPI.get_all_data(true).filter(row => this.rowSelection.has(this.getRecordKey(row))) : [];
|
|
25100
|
+
if (!this.grid.primaryKey) {
|
|
25101
|
+
return Array.from(this.rowSelection);
|
|
25102
|
+
}
|
|
25103
|
+
const selection = [];
|
|
25104
|
+
this.rowSelection.forEach(rID => {
|
|
25105
|
+
const rData = this.grid.gridAPI.get_all_data(true).find(row => this.getRecordKey(row) === rID);
|
|
25106
|
+
const partialRowData = {};
|
|
25107
|
+
partialRowData[this.grid.primaryKey] = rID;
|
|
25108
|
+
selection.push(rData ? rData : partialRowData);
|
|
25109
|
+
});
|
|
25110
|
+
return selection;
|
|
25098
25111
|
}
|
|
25099
25112
|
/** Returns array of the selected row id's. */
|
|
25100
25113
|
getSelectedRows() {
|
|
@@ -31609,6 +31622,10 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
|
|
|
31609
31622
|
if (this.isDecadeView) {
|
|
31610
31623
|
this.viewDate = CalendarDay.from(this.viewDate).add('year', -15).native;
|
|
31611
31624
|
}
|
|
31625
|
+
this.viewDateChanged.emit({
|
|
31626
|
+
previousValue: this.previousViewDate,
|
|
31627
|
+
currentValue: this.viewDate,
|
|
31628
|
+
});
|
|
31612
31629
|
}
|
|
31613
31630
|
/**
|
|
31614
31631
|
* @hidden
|
|
@@ -31622,6 +31639,10 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
|
|
|
31622
31639
|
if (this.isDecadeView) {
|
|
31623
31640
|
this.viewDate = CalendarDay.from(this.viewDate).add('year', 15).native;
|
|
31624
31641
|
}
|
|
31642
|
+
this.viewDateChanged.emit({
|
|
31643
|
+
previousValue: this.previousViewDate,
|
|
31644
|
+
currentValue: this.viewDate,
|
|
31645
|
+
});
|
|
31625
31646
|
}
|
|
31626
31647
|
/**
|
|
31627
31648
|
* @hidden
|
|
@@ -37645,10 +37666,12 @@ class IgxSimpleComboComponent extends IgxComboBaseDirective {
|
|
|
37645
37666
|
if (filtered === null || filtered === undefined) {
|
|
37646
37667
|
return;
|
|
37647
37668
|
}
|
|
37648
|
-
|
|
37649
|
-
|
|
37650
|
-
|
|
37651
|
-
|
|
37669
|
+
if (!this.dropdown.collapsed) {
|
|
37670
|
+
this.select(this.dropdown.focusedItem.itemID);
|
|
37671
|
+
event.preventDefault();
|
|
37672
|
+
event.stopPropagation();
|
|
37673
|
+
this.close();
|
|
37674
|
+
}
|
|
37652
37675
|
// manually trigger text selection as it will not be triggered during editing
|
|
37653
37676
|
this.textSelection.trigger();
|
|
37654
37677
|
return;
|
|
@@ -61128,6 +61151,12 @@ class IgxGridBaseDirective {
|
|
|
61128
61151
|
get pagingState() {
|
|
61129
61152
|
return this._pagingState;
|
|
61130
61153
|
}
|
|
61154
|
+
/**
|
|
61155
|
+
* Represents the last search information.
|
|
61156
|
+
*/
|
|
61157
|
+
get lastSearchInfo() {
|
|
61158
|
+
return this._lastSearchInfo;
|
|
61159
|
+
}
|
|
61131
61160
|
/** @hidden @internal */
|
|
61132
61161
|
get paginator() {
|
|
61133
61162
|
return this.paginationComponents?.first;
|
|
@@ -61990,18 +62019,6 @@ class IgxGridBaseDirective {
|
|
|
61990
62019
|
* @hidden @internal
|
|
61991
62020
|
*/
|
|
61992
62021
|
this.disableTransitions = false;
|
|
61993
|
-
/**
|
|
61994
|
-
* Represents the last search information.
|
|
61995
|
-
*/
|
|
61996
|
-
this.lastSearchInfo = {
|
|
61997
|
-
searchText: '',
|
|
61998
|
-
caseSensitive: false,
|
|
61999
|
-
exactMatch: false,
|
|
62000
|
-
activeMatchIndex: 0,
|
|
62001
|
-
matchInfoCache: [],
|
|
62002
|
-
matchCount: 0,
|
|
62003
|
-
content: ''
|
|
62004
|
-
};
|
|
62005
62022
|
/**
|
|
62006
62023
|
* @hidden @internal
|
|
62007
62024
|
*/
|
|
@@ -62115,6 +62132,15 @@ class IgxGridBaseDirective {
|
|
|
62115
62132
|
this._filterStrategy = new FilteringStrategy();
|
|
62116
62133
|
this._autoGeneratedCols = [];
|
|
62117
62134
|
this._dataView = [];
|
|
62135
|
+
this._lastSearchInfo = {
|
|
62136
|
+
searchText: '',
|
|
62137
|
+
caseSensitive: false,
|
|
62138
|
+
exactMatch: false,
|
|
62139
|
+
activeMatchIndex: 0,
|
|
62140
|
+
matchInfoCache: [],
|
|
62141
|
+
matchCount: 0,
|
|
62142
|
+
content: ''
|
|
62143
|
+
};
|
|
62118
62144
|
this._rowEditable = false;
|
|
62119
62145
|
this._filteredSortedData = null;
|
|
62120
62146
|
this._filteredData = null;
|
|
@@ -62459,6 +62485,7 @@ class IgxGridBaseDirective {
|
|
|
62459
62485
|
// the vert. scrollbar showing/hiding
|
|
62460
62486
|
this.notifyChanges(true);
|
|
62461
62487
|
this.cdr.detectChanges();
|
|
62488
|
+
Promise.resolve().then(() => this.headerContainer.updateScroll());
|
|
62462
62489
|
});
|
|
62463
62490
|
this.headerContainer?.scrollbarVisibilityChanged.pipe(filter(() => !this._init), destructor).subscribe(() => {
|
|
62464
62491
|
// the horizontal scrollbar showing/hiding
|
|
@@ -63786,20 +63813,20 @@ class IgxGridBaseDirective {
|
|
|
63786
63813
|
* @param updateActiveInfo
|
|
63787
63814
|
*/
|
|
63788
63815
|
refreshSearch(updateActiveInfo, endEdit = true) {
|
|
63789
|
-
if (this.
|
|
63816
|
+
if (this._lastSearchInfo.searchText) {
|
|
63790
63817
|
this.rebuildMatchCache();
|
|
63791
63818
|
if (updateActiveInfo) {
|
|
63792
63819
|
const activeInfo = this.textHighlightService.highlightGroupsMap.get(this.id);
|
|
63793
|
-
this.
|
|
63820
|
+
this._lastSearchInfo.matchInfoCache.forEach((match, i) => {
|
|
63794
63821
|
if (match.column === activeInfo.column &&
|
|
63795
63822
|
match.row === activeInfo.row &&
|
|
63796
63823
|
match.index === activeInfo.index &&
|
|
63797
63824
|
compareMaps(match.metadata, activeInfo.metadata)) {
|
|
63798
|
-
this.
|
|
63825
|
+
this._lastSearchInfo.activeMatchIndex = i;
|
|
63799
63826
|
}
|
|
63800
63827
|
});
|
|
63801
63828
|
}
|
|
63802
|
-
return this.find(this.
|
|
63829
|
+
return this.find(this._lastSearchInfo.searchText, 0, this._lastSearchInfo.caseSensitive, this._lastSearchInfo.exactMatch, false, endEdit);
|
|
63803
63830
|
}
|
|
63804
63831
|
else {
|
|
63805
63832
|
return 0;
|
|
@@ -63814,7 +63841,7 @@ class IgxGridBaseDirective {
|
|
|
63814
63841
|
* ```
|
|
63815
63842
|
*/
|
|
63816
63843
|
clearSearch() {
|
|
63817
|
-
this.
|
|
63844
|
+
this._lastSearchInfo = {
|
|
63818
63845
|
searchText: '',
|
|
63819
63846
|
caseSensitive: false,
|
|
63820
63847
|
exactMatch: false,
|
|
@@ -64883,12 +64910,8 @@ class IgxGridBaseDirective {
|
|
|
64883
64910
|
// in case state is no longer valid - update it.
|
|
64884
64911
|
const rowForOf = row.virtDirRow;
|
|
64885
64912
|
const gridScrLeft = rowForOf.getScroll().scrollLeft;
|
|
64886
|
-
|
|
64887
|
-
|
|
64888
|
-
if (gridScrLeft !== actualScrollLeft) {
|
|
64889
|
-
rowForOf.onHScroll(gridScrLeft);
|
|
64890
|
-
rowForOf.cdr.detectChanges();
|
|
64891
|
-
}
|
|
64913
|
+
rowForOf.onHScroll(gridScrLeft);
|
|
64914
|
+
rowForOf.cdr.detectChanges();
|
|
64892
64915
|
}
|
|
64893
64916
|
changeRowEditingOverlayStateOnScroll(row) {
|
|
64894
64917
|
if (!this.rowEditable || !this.rowEditingOverlay || this.rowEditingOverlay.collapsed) {
|
|
@@ -65387,7 +65410,7 @@ class IgxGridBaseDirective {
|
|
|
65387
65410
|
let res = !parentElement ||
|
|
65388
65411
|
parentElement.clientHeight === 0 ||
|
|
65389
65412
|
parentElement.clientHeight === renderedHeight;
|
|
65390
|
-
if (
|
|
65413
|
+
if (parentElement && (res || this._autoSize)) {
|
|
65391
65414
|
// If grid causes the parent container to extend (for example when container is flex)
|
|
65392
65415
|
// we should always auto-size since the actual size of the container will continuously change as the grid renders elements.
|
|
65393
65416
|
this._autoSize = false;
|
|
@@ -66001,10 +66024,10 @@ class IgxGridBaseDirective {
|
|
|
66001
66024
|
const caseSensitiveResolved = caseSensitive ? true : false;
|
|
66002
66025
|
const exactMatchResolved = exactMatch ? true : false;
|
|
66003
66026
|
let rebuildCache = false;
|
|
66004
|
-
if (this.
|
|
66005
|
-
this.
|
|
66006
|
-
this.
|
|
66007
|
-
this.
|
|
66027
|
+
if (this._lastSearchInfo.searchText !== text ||
|
|
66028
|
+
this._lastSearchInfo.caseSensitive !== caseSensitiveResolved ||
|
|
66029
|
+
this._lastSearchInfo.exactMatch !== exactMatchResolved) {
|
|
66030
|
+
this._lastSearchInfo = {
|
|
66008
66031
|
searchText: text,
|
|
66009
66032
|
activeMatchIndex: 0,
|
|
66010
66033
|
caseSensitive: caseSensitiveResolved,
|
|
@@ -66016,7 +66039,7 @@ class IgxGridBaseDirective {
|
|
|
66016
66039
|
rebuildCache = true;
|
|
66017
66040
|
}
|
|
66018
66041
|
else {
|
|
66019
|
-
this.
|
|
66042
|
+
this._lastSearchInfo.activeMatchIndex += increment;
|
|
66020
66043
|
}
|
|
66021
66044
|
if (rebuildCache) {
|
|
66022
66045
|
this.rowList.forEach((row) => {
|
|
@@ -66028,15 +66051,15 @@ class IgxGridBaseDirective {
|
|
|
66028
66051
|
});
|
|
66029
66052
|
this.rebuildMatchCache();
|
|
66030
66053
|
}
|
|
66031
|
-
if (this.
|
|
66032
|
-
this.
|
|
66054
|
+
if (this._lastSearchInfo.activeMatchIndex >= this._lastSearchInfo.matchCount) {
|
|
66055
|
+
this._lastSearchInfo.activeMatchIndex = 0;
|
|
66033
66056
|
}
|
|
66034
|
-
else if (this.
|
|
66035
|
-
this.
|
|
66057
|
+
else if (this._lastSearchInfo.activeMatchIndex < 0) {
|
|
66058
|
+
this._lastSearchInfo.activeMatchIndex = this._lastSearchInfo.matchCount - 1;
|
|
66036
66059
|
}
|
|
66037
|
-
if (this.
|
|
66038
|
-
const matchInfo = this.
|
|
66039
|
-
this.
|
|
66060
|
+
if (this._lastSearchInfo.matchCount > 0) {
|
|
66061
|
+
const matchInfo = this._lastSearchInfo.matchInfoCache[this._lastSearchInfo.activeMatchIndex];
|
|
66062
|
+
this._lastSearchInfo = { ...this._lastSearchInfo };
|
|
66040
66063
|
if (scroll !== false) {
|
|
66041
66064
|
this.scrollTo(matchInfo.row, matchInfo.column);
|
|
66042
66065
|
}
|
|
@@ -66050,13 +66073,13 @@ class IgxGridBaseDirective {
|
|
|
66050
66073
|
else {
|
|
66051
66074
|
this.textHighlightService.clearActiveHighlight(this.id);
|
|
66052
66075
|
}
|
|
66053
|
-
return this.
|
|
66076
|
+
return this._lastSearchInfo.matchCount;
|
|
66054
66077
|
}
|
|
66055
66078
|
rebuildMatchCache() {
|
|
66056
|
-
this.
|
|
66057
|
-
const caseSensitive = this.
|
|
66058
|
-
const exactMatch = this.
|
|
66059
|
-
const searchText = caseSensitive ? this.
|
|
66079
|
+
this._lastSearchInfo.matchInfoCache = [];
|
|
66080
|
+
const caseSensitive = this._lastSearchInfo.caseSensitive;
|
|
66081
|
+
const exactMatch = this._lastSearchInfo.exactMatch;
|
|
66082
|
+
const searchText = caseSensitive ? this._lastSearchInfo.searchText : this._lastSearchInfo.searchText.toLowerCase();
|
|
66060
66083
|
const data = this.filteredSortedData;
|
|
66061
66084
|
const columnItems = this.visibleColumns.filter((c) => !c.columnGroup).sort((c1, c2) => c1.visibleIndex - c2.visibleIndex);
|
|
66062
66085
|
data.forEach((dataRow, rowIndex) => {
|
|
@@ -66077,7 +66100,7 @@ class IgxGridBaseDirective {
|
|
|
66077
66100
|
index: 0,
|
|
66078
66101
|
metadata: new Map([['pinned', this.isRecordPinnedByIndex(rowIndex)]])
|
|
66079
66102
|
};
|
|
66080
|
-
this.
|
|
66103
|
+
this._lastSearchInfo.matchInfoCache.push(mic);
|
|
66081
66104
|
}
|
|
66082
66105
|
}
|
|
66083
66106
|
else {
|
|
@@ -66090,7 +66113,7 @@ class IgxGridBaseDirective {
|
|
|
66090
66113
|
index: occurrenceIndex++,
|
|
66091
66114
|
metadata: new Map([['pinned', this.isRecordPinnedByIndex(rowIndex)]])
|
|
66092
66115
|
};
|
|
66093
|
-
this.
|
|
66116
|
+
this._lastSearchInfo.matchInfoCache.push(mic);
|
|
66094
66117
|
searchValue = searchValue.substring(searchIndex + searchText.length);
|
|
66095
66118
|
searchIndex = searchValue.indexOf(searchText);
|
|
66096
66119
|
}
|
|
@@ -66098,7 +66121,7 @@ class IgxGridBaseDirective {
|
|
|
66098
66121
|
}
|
|
66099
66122
|
});
|
|
66100
66123
|
});
|
|
66101
|
-
this.
|
|
66124
|
+
this._lastSearchInfo.matchCount = this._lastSearchInfo.matchInfoCache.length;
|
|
66102
66125
|
}
|
|
66103
66126
|
updateDefaultRowHeight() {
|
|
66104
66127
|
if (this.dataRowList.length > 0 && this.dataRowList.first.cells && this.dataRowList.first.cells.length > 0) {
|
|
@@ -81884,7 +81907,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
81884
81907
|
const colLength = this.columns.length;
|
|
81885
81908
|
const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
|
|
81886
81909
|
if (topCols.length > 0) {
|
|
81887
|
-
this.
|
|
81910
|
+
this.initColumns(topCols, (col) => this.columnInit.emit(col));
|
|
81888
81911
|
if (recalcColSizes && this.columns.length !== colLength) {
|
|
81889
81912
|
this.calculateGridSizes(false);
|
|
81890
81913
|
}
|