igniteui-angular 17.2.6 → 17.2.7

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.
@@ -1052,7 +1052,7 @@ class NoopSortingStrategy {
1052
1052
  }
1053
1053
  /**
1054
1054
  * Represents a class extending the IgxSorting class
1055
- * Provids custom data record sorting.
1055
+ * Provides custom data record sorting.
1056
1056
  */
1057
1057
  class IgxDataRecordSorting extends IgxSorting {
1058
1058
  /**
@@ -7260,6 +7260,7 @@ class DisplayDensityBase {
7260
7260
  }
7261
7261
  /**
7262
7262
  * Sets the `--component-size` CSS variable based on the value of Display Density
7263
+ * @hidden @internal
7263
7264
  */
7264
7265
  getComponentSizeStyles() {
7265
7266
  switch (this._displayDensity || this.oldDisplayDensityOptions.displayDensity) {
@@ -12780,6 +12781,11 @@ class IgxForOfSyncService {
12780
12781
  */
12781
12782
  setMaster(directive, forced = false) {
12782
12783
  const orientation = directive.igxForScrollOrientation;
12784
+ // in case master is not in dom, set a new master
12785
+ const isMasterInDom = this._master.get(orientation)?.dc?.instance?._viewContainer.element.nativeElement.isConnected;
12786
+ if (!isMasterInDom) {
12787
+ forced = true;
12788
+ }
12783
12789
  if (orientation && (forced || !this._master.has(orientation))) {
12784
12790
  this._master.set(orientation, directive);
12785
12791
  }
@@ -14201,7 +14207,7 @@ class IgxGridForOfDirective extends IgxForOfDirective {
14201
14207
  }
14202
14208
  if (this.igxForScrollOrientation === 'horizontal') {
14203
14209
  // in case collection has changes, reset sync service
14204
- this.syncService.setMaster(this, true);
14210
+ this.syncService.setMaster(this, this.igxGridForOfUniqueSizeCache);
14205
14211
  }
14206
14212
  }
14207
14213
  const defaultItemSize = 'igxForItemSize';
@@ -31699,6 +31705,10 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
31699
31705
  if (this.isDecadeView) {
31700
31706
  this.viewDate = CalendarDay.from(this.viewDate).add('year', -15).native;
31701
31707
  }
31708
+ this.viewDateChanged.emit({
31709
+ previousValue: this.previousViewDate,
31710
+ currentValue: this.viewDate,
31711
+ });
31702
31712
  }
31703
31713
  /**
31704
31714
  * @hidden
@@ -31712,6 +31722,10 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
31712
31722
  if (this.isDecadeView) {
31713
31723
  this.viewDate = CalendarDay.from(this.viewDate).add('year', 15).native;
31714
31724
  }
31725
+ this.viewDateChanged.emit({
31726
+ previousValue: this.previousViewDate,
31727
+ currentValue: this.viewDate,
31728
+ });
31715
31729
  }
31716
31730
  /**
31717
31731
  * @hidden
@@ -61457,6 +61471,12 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61457
61471
  get pagingState() {
61458
61472
  return this._pagingState;
61459
61473
  }
61474
+ /**
61475
+ * Represents the last search information.
61476
+ */
61477
+ get lastSearchInfo() {
61478
+ return this._lastSearchInfo;
61479
+ }
61460
61480
  /** @hidden @internal */
61461
61481
  get paginator() {
61462
61482
  return this.paginationComponents?.first;
@@ -62321,18 +62341,6 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62321
62341
  * @hidden @internal
62322
62342
  */
62323
62343
  this.disableTransitions = false;
62324
- /**
62325
- * Represents the last search information.
62326
- */
62327
- this.lastSearchInfo = {
62328
- searchText: '',
62329
- caseSensitive: false,
62330
- exactMatch: false,
62331
- activeMatchIndex: 0,
62332
- matchInfoCache: [],
62333
- matchCount: 0,
62334
- content: ''
62335
- };
62336
62344
  /**
62337
62345
  * @hidden @internal
62338
62346
  */
@@ -62446,6 +62454,15 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62446
62454
  this._filterStrategy = new FilteringStrategy();
62447
62455
  this._autoGeneratedCols = [];
62448
62456
  this._dataView = [];
62457
+ this._lastSearchInfo = {
62458
+ searchText: '',
62459
+ caseSensitive: false,
62460
+ exactMatch: false,
62461
+ activeMatchIndex: 0,
62462
+ matchInfoCache: [],
62463
+ matchCount: 0,
62464
+ content: ''
62465
+ };
62449
62466
  this._rowEditable = false;
62450
62467
  this._filteredSortedData = null;
62451
62468
  this._filteredData = null;
@@ -64112,20 +64129,20 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64112
64129
  * @param updateActiveInfo
64113
64130
  */
64114
64131
  refreshSearch(updateActiveInfo, endEdit = true) {
64115
- if (this.lastSearchInfo.searchText) {
64132
+ if (this._lastSearchInfo.searchText) {
64116
64133
  this.rebuildMatchCache();
64117
64134
  if (updateActiveInfo) {
64118
64135
  const activeInfo = this.textHighlightService.highlightGroupsMap.get(this.id);
64119
- this.lastSearchInfo.matchInfoCache.forEach((match, i) => {
64136
+ this._lastSearchInfo.matchInfoCache.forEach((match, i) => {
64120
64137
  if (match.column === activeInfo.column &&
64121
64138
  match.row === activeInfo.row &&
64122
64139
  match.index === activeInfo.index &&
64123
64140
  compareMaps(match.metadata, activeInfo.metadata)) {
64124
- this.lastSearchInfo.activeMatchIndex = i;
64141
+ this._lastSearchInfo.activeMatchIndex = i;
64125
64142
  }
64126
64143
  });
64127
64144
  }
64128
- return this.find(this.lastSearchInfo.searchText, 0, this.lastSearchInfo.caseSensitive, this.lastSearchInfo.exactMatch, false, endEdit);
64145
+ return this.find(this._lastSearchInfo.searchText, 0, this._lastSearchInfo.caseSensitive, this._lastSearchInfo.exactMatch, false, endEdit);
64129
64146
  }
64130
64147
  else {
64131
64148
  return 0;
@@ -64140,7 +64157,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64140
64157
  * ```
64141
64158
  */
64142
64159
  clearSearch() {
64143
- this.lastSearchInfo = {
64160
+ this._lastSearchInfo = {
64144
64161
  searchText: '',
64145
64162
  caseSensitive: false,
64146
64163
  exactMatch: false,
@@ -66316,10 +66333,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66316
66333
  const caseSensitiveResolved = caseSensitive ? true : false;
66317
66334
  const exactMatchResolved = exactMatch ? true : false;
66318
66335
  let rebuildCache = false;
66319
- if (this.lastSearchInfo.searchText !== text ||
66320
- this.lastSearchInfo.caseSensitive !== caseSensitiveResolved ||
66321
- this.lastSearchInfo.exactMatch !== exactMatchResolved) {
66322
- this.lastSearchInfo = {
66336
+ if (this._lastSearchInfo.searchText !== text ||
66337
+ this._lastSearchInfo.caseSensitive !== caseSensitiveResolved ||
66338
+ this._lastSearchInfo.exactMatch !== exactMatchResolved) {
66339
+ this._lastSearchInfo = {
66323
66340
  searchText: text,
66324
66341
  activeMatchIndex: 0,
66325
66342
  caseSensitive: caseSensitiveResolved,
@@ -66331,7 +66348,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66331
66348
  rebuildCache = true;
66332
66349
  }
66333
66350
  else {
66334
- this.lastSearchInfo.activeMatchIndex += increment;
66351
+ this._lastSearchInfo.activeMatchIndex += increment;
66335
66352
  }
66336
66353
  if (rebuildCache) {
66337
66354
  this.rowList.forEach((row) => {
@@ -66343,15 +66360,15 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66343
66360
  });
66344
66361
  this.rebuildMatchCache();
66345
66362
  }
66346
- if (this.lastSearchInfo.activeMatchIndex >= this.lastSearchInfo.matchCount) {
66347
- this.lastSearchInfo.activeMatchIndex = 0;
66363
+ if (this._lastSearchInfo.activeMatchIndex >= this._lastSearchInfo.matchCount) {
66364
+ this._lastSearchInfo.activeMatchIndex = 0;
66348
66365
  }
66349
- else if (this.lastSearchInfo.activeMatchIndex < 0) {
66350
- this.lastSearchInfo.activeMatchIndex = this.lastSearchInfo.matchCount - 1;
66366
+ else if (this._lastSearchInfo.activeMatchIndex < 0) {
66367
+ this._lastSearchInfo.activeMatchIndex = this._lastSearchInfo.matchCount - 1;
66351
66368
  }
66352
- if (this.lastSearchInfo.matchCount > 0) {
66353
- const matchInfo = this.lastSearchInfo.matchInfoCache[this.lastSearchInfo.activeMatchIndex];
66354
- this.lastSearchInfo = { ...this.lastSearchInfo };
66369
+ if (this._lastSearchInfo.matchCount > 0) {
66370
+ const matchInfo = this._lastSearchInfo.matchInfoCache[this._lastSearchInfo.activeMatchIndex];
66371
+ this._lastSearchInfo = { ...this._lastSearchInfo };
66355
66372
  if (scroll !== false) {
66356
66373
  this.scrollTo(matchInfo.row, matchInfo.column);
66357
66374
  }
@@ -66365,13 +66382,13 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66365
66382
  else {
66366
66383
  this.textHighlightService.clearActiveHighlight(this.id);
66367
66384
  }
66368
- return this.lastSearchInfo.matchCount;
66385
+ return this._lastSearchInfo.matchCount;
66369
66386
  }
66370
66387
  rebuildMatchCache() {
66371
- this.lastSearchInfo.matchInfoCache = [];
66372
- const caseSensitive = this.lastSearchInfo.caseSensitive;
66373
- const exactMatch = this.lastSearchInfo.exactMatch;
66374
- const searchText = caseSensitive ? this.lastSearchInfo.searchText : this.lastSearchInfo.searchText.toLowerCase();
66388
+ this._lastSearchInfo.matchInfoCache = [];
66389
+ const caseSensitive = this._lastSearchInfo.caseSensitive;
66390
+ const exactMatch = this._lastSearchInfo.exactMatch;
66391
+ const searchText = caseSensitive ? this._lastSearchInfo.searchText : this._lastSearchInfo.searchText.toLowerCase();
66375
66392
  const data = this.filteredSortedData;
66376
66393
  const columnItems = this.visibleColumns.filter((c) => !c.columnGroup).sort((c1, c2) => c1.visibleIndex - c2.visibleIndex);
66377
66394
  data.forEach((dataRow, rowIndex) => {
@@ -66392,7 +66409,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66392
66409
  index: 0,
66393
66410
  metadata: new Map([['pinned', this.isRecordPinnedByIndex(rowIndex)]])
66394
66411
  };
66395
- this.lastSearchInfo.matchInfoCache.push(mic);
66412
+ this._lastSearchInfo.matchInfoCache.push(mic);
66396
66413
  }
66397
66414
  }
66398
66415
  else {
@@ -66405,7 +66422,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66405
66422
  index: occurrenceIndex++,
66406
66423
  metadata: new Map([['pinned', this.isRecordPinnedByIndex(rowIndex)]])
66407
66424
  };
66408
- this.lastSearchInfo.matchInfoCache.push(mic);
66425
+ this._lastSearchInfo.matchInfoCache.push(mic);
66409
66426
  searchValue = searchValue.substring(searchIndex + searchText.length);
66410
66427
  searchIndex = searchValue.indexOf(searchText);
66411
66428
  }
@@ -66413,7 +66430,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
66413
66430
  }
66414
66431
  });
66415
66432
  });
66416
- this.lastSearchInfo.matchCount = this.lastSearchInfo.matchInfoCache.length;
66433
+ this._lastSearchInfo.matchCount = this._lastSearchInfo.matchInfoCache.length;
66417
66434
  }
66418
66435
  // TODO: About to Move to CRUD
66419
66436
  configureRowEditingOverlay(rowID, useOuter = false) {
@@ -81980,7 +81997,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
81980
81997
  const colLength = this.columns.length;
81981
81998
  const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
81982
81999
  if (topCols.length > 0) {
81983
- this.updateColumns(topCols);
82000
+ this.initColumns(topCols, (col) => this.columnInit.emit(col));
81984
82001
  if (recalcColSizes && this.columns.length !== colLength) {
81985
82002
  this.calculateGridSizes(false);
81986
82003
  }