igniteui-angular 18.0.1 → 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.
@@ -1067,7 +1067,7 @@ class NoopSortingStrategy {
1067
1067
  }
1068
1068
  /**
1069
1069
  * Represents a class extending the IgxSorting class
1070
- * Provids custom data record sorting.
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
  }
@@ -14075,7 +14080,7 @@ class IgxGridForOfDirective extends IgxForOfDirective {
14075
14080
  }
14076
14081
  if (this.igxForScrollOrientation === 'horizontal') {
14077
14082
  // in case collection has changes, reset sync service
14078
- this.syncService.setMaster(this, true);
14083
+ this.syncService.setMaster(this, this.igxGridForOfUniqueSizeCache);
14079
14084
  }
14080
14085
  }
14081
14086
  const defaultItemSize = 'igxForItemSize';
@@ -31617,6 +31622,10 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
31617
31622
  if (this.isDecadeView) {
31618
31623
  this.viewDate = CalendarDay.from(this.viewDate).add('year', -15).native;
31619
31624
  }
31625
+ this.viewDateChanged.emit({
31626
+ previousValue: this.previousViewDate,
31627
+ currentValue: this.viewDate,
31628
+ });
31620
31629
  }
31621
31630
  /**
31622
31631
  * @hidden
@@ -31630,6 +31639,10 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
31630
31639
  if (this.isDecadeView) {
31631
31640
  this.viewDate = CalendarDay.from(this.viewDate).add('year', 15).native;
31632
31641
  }
31642
+ this.viewDateChanged.emit({
31643
+ previousValue: this.previousViewDate,
31644
+ currentValue: this.viewDate,
31645
+ });
31633
31646
  }
31634
31647
  /**
31635
31648
  * @hidden
@@ -61138,6 +61151,12 @@ class IgxGridBaseDirective {
61138
61151
  get pagingState() {
61139
61152
  return this._pagingState;
61140
61153
  }
61154
+ /**
61155
+ * Represents the last search information.
61156
+ */
61157
+ get lastSearchInfo() {
61158
+ return this._lastSearchInfo;
61159
+ }
61141
61160
  /** @hidden @internal */
61142
61161
  get paginator() {
61143
61162
  return this.paginationComponents?.first;
@@ -62000,18 +62019,6 @@ class IgxGridBaseDirective {
62000
62019
  * @hidden @internal
62001
62020
  */
62002
62021
  this.disableTransitions = false;
62003
- /**
62004
- * Represents the last search information.
62005
- */
62006
- this.lastSearchInfo = {
62007
- searchText: '',
62008
- caseSensitive: false,
62009
- exactMatch: false,
62010
- activeMatchIndex: 0,
62011
- matchInfoCache: [],
62012
- matchCount: 0,
62013
- content: ''
62014
- };
62015
62022
  /**
62016
62023
  * @hidden @internal
62017
62024
  */
@@ -62125,6 +62132,15 @@ class IgxGridBaseDirective {
62125
62132
  this._filterStrategy = new FilteringStrategy();
62126
62133
  this._autoGeneratedCols = [];
62127
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
+ };
62128
62144
  this._rowEditable = false;
62129
62145
  this._filteredSortedData = null;
62130
62146
  this._filteredData = null;
@@ -63797,20 +63813,20 @@ class IgxGridBaseDirective {
63797
63813
  * @param updateActiveInfo
63798
63814
  */
63799
63815
  refreshSearch(updateActiveInfo, endEdit = true) {
63800
- if (this.lastSearchInfo.searchText) {
63816
+ if (this._lastSearchInfo.searchText) {
63801
63817
  this.rebuildMatchCache();
63802
63818
  if (updateActiveInfo) {
63803
63819
  const activeInfo = this.textHighlightService.highlightGroupsMap.get(this.id);
63804
- this.lastSearchInfo.matchInfoCache.forEach((match, i) => {
63820
+ this._lastSearchInfo.matchInfoCache.forEach((match, i) => {
63805
63821
  if (match.column === activeInfo.column &&
63806
63822
  match.row === activeInfo.row &&
63807
63823
  match.index === activeInfo.index &&
63808
63824
  compareMaps(match.metadata, activeInfo.metadata)) {
63809
- this.lastSearchInfo.activeMatchIndex = i;
63825
+ this._lastSearchInfo.activeMatchIndex = i;
63810
63826
  }
63811
63827
  });
63812
63828
  }
63813
- return this.find(this.lastSearchInfo.searchText, 0, this.lastSearchInfo.caseSensitive, this.lastSearchInfo.exactMatch, false, endEdit);
63829
+ return this.find(this._lastSearchInfo.searchText, 0, this._lastSearchInfo.caseSensitive, this._lastSearchInfo.exactMatch, false, endEdit);
63814
63830
  }
63815
63831
  else {
63816
63832
  return 0;
@@ -63825,7 +63841,7 @@ class IgxGridBaseDirective {
63825
63841
  * ```
63826
63842
  */
63827
63843
  clearSearch() {
63828
- this.lastSearchInfo = {
63844
+ this._lastSearchInfo = {
63829
63845
  searchText: '',
63830
63846
  caseSensitive: false,
63831
63847
  exactMatch: false,
@@ -66008,10 +66024,10 @@ class IgxGridBaseDirective {
66008
66024
  const caseSensitiveResolved = caseSensitive ? true : false;
66009
66025
  const exactMatchResolved = exactMatch ? true : false;
66010
66026
  let rebuildCache = false;
66011
- if (this.lastSearchInfo.searchText !== text ||
66012
- this.lastSearchInfo.caseSensitive !== caseSensitiveResolved ||
66013
- this.lastSearchInfo.exactMatch !== exactMatchResolved) {
66014
- this.lastSearchInfo = {
66027
+ if (this._lastSearchInfo.searchText !== text ||
66028
+ this._lastSearchInfo.caseSensitive !== caseSensitiveResolved ||
66029
+ this._lastSearchInfo.exactMatch !== exactMatchResolved) {
66030
+ this._lastSearchInfo = {
66015
66031
  searchText: text,
66016
66032
  activeMatchIndex: 0,
66017
66033
  caseSensitive: caseSensitiveResolved,
@@ -66023,7 +66039,7 @@ class IgxGridBaseDirective {
66023
66039
  rebuildCache = true;
66024
66040
  }
66025
66041
  else {
66026
- this.lastSearchInfo.activeMatchIndex += increment;
66042
+ this._lastSearchInfo.activeMatchIndex += increment;
66027
66043
  }
66028
66044
  if (rebuildCache) {
66029
66045
  this.rowList.forEach((row) => {
@@ -66035,15 +66051,15 @@ class IgxGridBaseDirective {
66035
66051
  });
66036
66052
  this.rebuildMatchCache();
66037
66053
  }
66038
- if (this.lastSearchInfo.activeMatchIndex >= this.lastSearchInfo.matchCount) {
66039
- this.lastSearchInfo.activeMatchIndex = 0;
66054
+ if (this._lastSearchInfo.activeMatchIndex >= this._lastSearchInfo.matchCount) {
66055
+ this._lastSearchInfo.activeMatchIndex = 0;
66040
66056
  }
66041
- else if (this.lastSearchInfo.activeMatchIndex < 0) {
66042
- this.lastSearchInfo.activeMatchIndex = this.lastSearchInfo.matchCount - 1;
66057
+ else if (this._lastSearchInfo.activeMatchIndex < 0) {
66058
+ this._lastSearchInfo.activeMatchIndex = this._lastSearchInfo.matchCount - 1;
66043
66059
  }
66044
- if (this.lastSearchInfo.matchCount > 0) {
66045
- const matchInfo = this.lastSearchInfo.matchInfoCache[this.lastSearchInfo.activeMatchIndex];
66046
- this.lastSearchInfo = { ...this.lastSearchInfo };
66060
+ if (this._lastSearchInfo.matchCount > 0) {
66061
+ const matchInfo = this._lastSearchInfo.matchInfoCache[this._lastSearchInfo.activeMatchIndex];
66062
+ this._lastSearchInfo = { ...this._lastSearchInfo };
66047
66063
  if (scroll !== false) {
66048
66064
  this.scrollTo(matchInfo.row, matchInfo.column);
66049
66065
  }
@@ -66057,13 +66073,13 @@ class IgxGridBaseDirective {
66057
66073
  else {
66058
66074
  this.textHighlightService.clearActiveHighlight(this.id);
66059
66075
  }
66060
- return this.lastSearchInfo.matchCount;
66076
+ return this._lastSearchInfo.matchCount;
66061
66077
  }
66062
66078
  rebuildMatchCache() {
66063
- this.lastSearchInfo.matchInfoCache = [];
66064
- const caseSensitive = this.lastSearchInfo.caseSensitive;
66065
- const exactMatch = this.lastSearchInfo.exactMatch;
66066
- const searchText = caseSensitive ? this.lastSearchInfo.searchText : this.lastSearchInfo.searchText.toLowerCase();
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();
66067
66083
  const data = this.filteredSortedData;
66068
66084
  const columnItems = this.visibleColumns.filter((c) => !c.columnGroup).sort((c1, c2) => c1.visibleIndex - c2.visibleIndex);
66069
66085
  data.forEach((dataRow, rowIndex) => {
@@ -66084,7 +66100,7 @@ class IgxGridBaseDirective {
66084
66100
  index: 0,
66085
66101
  metadata: new Map([['pinned', this.isRecordPinnedByIndex(rowIndex)]])
66086
66102
  };
66087
- this.lastSearchInfo.matchInfoCache.push(mic);
66103
+ this._lastSearchInfo.matchInfoCache.push(mic);
66088
66104
  }
66089
66105
  }
66090
66106
  else {
@@ -66097,7 +66113,7 @@ class IgxGridBaseDirective {
66097
66113
  index: occurrenceIndex++,
66098
66114
  metadata: new Map([['pinned', this.isRecordPinnedByIndex(rowIndex)]])
66099
66115
  };
66100
- this.lastSearchInfo.matchInfoCache.push(mic);
66116
+ this._lastSearchInfo.matchInfoCache.push(mic);
66101
66117
  searchValue = searchValue.substring(searchIndex + searchText.length);
66102
66118
  searchIndex = searchValue.indexOf(searchText);
66103
66119
  }
@@ -66105,7 +66121,7 @@ class IgxGridBaseDirective {
66105
66121
  }
66106
66122
  });
66107
66123
  });
66108
- this.lastSearchInfo.matchCount = this.lastSearchInfo.matchInfoCache.length;
66124
+ this._lastSearchInfo.matchCount = this._lastSearchInfo.matchInfoCache.length;
66109
66125
  }
66110
66126
  updateDefaultRowHeight() {
66111
66127
  if (this.dataRowList.length > 0 && this.dataRowList.first.cells && this.dataRowList.first.cells.length > 0) {
@@ -81891,7 +81907,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
81891
81907
  const colLength = this.columns.length;
81892
81908
  const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
81893
81909
  if (topCols.length > 0) {
81894
- this.updateColumns(topCols);
81910
+ this.initColumns(topCols, (col) => this.columnInit.emit(col));
81895
81911
  if (recalcColSizes && this.columns.length !== colLength) {
81896
81912
  this.calculateGridSizes(false);
81897
81913
  }