igniteui-angular 13.2.2 → 13.2.3

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.
Files changed (31) hide show
  1. package/esm2020/lib/grids/api.service.mjs +2 -2
  2. package/esm2020/lib/grids/columns/column-layout.component.mjs +3 -3
  3. package/esm2020/lib/grids/columns/column.component.mjs +4 -4
  4. package/esm2020/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.mjs +2 -2
  5. package/esm2020/lib/grids/filtering/grid-filtering.service.mjs +7 -7
  6. package/esm2020/lib/grids/grid/grid.component.mjs +11 -11
  7. package/esm2020/lib/grids/grid-base.directive.mjs +61 -56
  8. package/esm2020/lib/grids/grid-mrl-navigation.service.mjs +2 -2
  9. package/esm2020/lib/grids/grid-public-row.mjs +3 -3
  10. package/esm2020/lib/grids/grouping/group-by-area.directive.mjs +2 -2
  11. package/esm2020/lib/grids/grouping/tree-grid-group-by-area.component.mjs +6 -6
  12. package/esm2020/lib/grids/hierarchical-grid/hierarchical-grid-base.directive.mjs +4 -5
  13. package/esm2020/lib/grids/hierarchical-grid/hierarchical-grid.component.mjs +23 -14
  14. package/esm2020/lib/grids/hierarchical-grid/row-island.component.mjs +7 -11
  15. package/esm2020/lib/grids/pivot-grid/pivot-grid.component.mjs +3 -3
  16. package/esm2020/lib/grids/state.directive.mjs +9 -9
  17. package/esm2020/lib/grids/summaries/grid-summary.service.mjs +5 -5
  18. package/esm2020/lib/grids/tree-grid/tree-grid.component.mjs +7 -7
  19. package/esm2020/lib/services/exporter-common/base-export-service.mjs +3 -3
  20. package/fesm2015/igniteui-angular.mjs +146 -136
  21. package/fesm2015/igniteui-angular.mjs.map +1 -1
  22. package/fesm2020/igniteui-angular.mjs +146 -136
  23. package/fesm2020/igniteui-angular.mjs.map +1 -1
  24. package/lib/core/styles/themes/schemas/dark/_stepper.scss +6 -1
  25. package/lib/grids/grid-base.directive.d.ts +2 -1
  26. package/lib/grids/hierarchical-grid/hierarchical-grid.component.d.ts +2 -1
  27. package/lib/grids/hierarchical-grid/row-island.component.d.ts +1 -0
  28. package/lib/grids/tree-grid/tree-grid.component.d.ts +2 -2
  29. package/package.json +1 -1
  30. package/styles/igniteui-indigo-dark.css +1 -1
  31. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
@@ -7,7 +7,7 @@ import { NgModel, FormControlName, NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxReq
7
7
  import * as i4 from '@angular/common';
8
8
  import { isPlatformBrowser, formatDate as formatDate$1, CurrencyPipe, formatPercent, formatNumber, getLocaleCurrencyCode, DatePipe, DOCUMENT, CommonModule, FormatWidth, getLocaleDateFormat, getLocaleNumberFormat, NumberFormatStyle, getCurrencySymbol } from '@angular/common';
9
9
  import { Observable, Subject, fromEvent, interval, animationFrameScheduler, noop, merge, Subscription, timer, pipe } from 'rxjs';
10
- import { takeUntil, filter, first as first$1, throttleTime, take, throttle, debounce, tap, switchMap, skipLast, map, debounceTime, shareReplay, takeWhile, delay, pluck } from 'rxjs/operators';
10
+ import { takeUntil, filter, first as first$1, throttleTime, take, throttle, debounce, tap, switchMap, skipLast, map, debounceTime, shareReplay, takeWhile, pluck } from 'rxjs/operators';
11
11
  import mergeWith from 'lodash.mergewith';
12
12
  import * as JSZip from 'jszip';
13
13
  import * as i1$1 from '@angular/platform-browser';
@@ -3094,7 +3094,7 @@ class IgxBaseExporter {
3094
3094
  throw Error('No options provided!');
3095
3095
  }
3096
3096
  this.options = options;
3097
- let columns = grid.columnList.toArray();
3097
+ let columns = grid.columns;
3098
3098
  if (this.options.ignoreMultiColumnHeaders) {
3099
3099
  columns = columns.filter(col => col.children === undefined);
3100
3100
  }
@@ -3725,7 +3725,7 @@ class IgxBaseExporter {
3725
3725
  columnList = this.getAutoGeneratedColumns(islandData);
3726
3726
  }
3727
3727
  else {
3728
- const islandColumnList = island.childColumns.toArray();
3728
+ const islandColumnList = island.columns;
3729
3729
  columnList = this.getColumns(islandColumnList);
3730
3730
  }
3731
3731
  this._ownersMap.set(island, columnList);
@@ -48131,7 +48131,7 @@ class GridBaseAPIService {
48131
48131
  this.destroyMap = new Map();
48132
48132
  }
48133
48133
  get_column_by_name(name) {
48134
- return this.grid.columnList.find((col) => col.field === name);
48134
+ return this.grid.columns.find((col) => col.field === name);
48135
48135
  }
48136
48136
  get_summary_data() {
48137
48137
  const grid = this.grid;
@@ -50565,7 +50565,7 @@ class IgxColumnComponent {
50565
50565
  grid.resetCaches();
50566
50566
  grid.notifyChanges();
50567
50567
  if (this.columnLayoutChild) {
50568
- this.grid.columnList.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
50568
+ this.grid.columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
50569
50569
  }
50570
50570
  this.grid.filteringService.refreshExpressions();
50571
50571
  const eventArgs = { column: this, insertAtIndex: index, isPinned: true };
@@ -50632,7 +50632,7 @@ class IgxColumnComponent {
50632
50632
  grid.resetCaches();
50633
50633
  grid.notifyChanges();
50634
50634
  if (this.columnLayoutChild) {
50635
- this.grid.columnList.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
50635
+ this.grid.columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
50636
50636
  }
50637
50637
  this.grid.filteringService.refreshExpressions();
50638
50638
  this.grid.columnPinned.emit({ column: this, insertAtIndex: index, isPinned: false });
@@ -50651,7 +50651,7 @@ class IgxColumnComponent {
50651
50651
  */
50652
50652
  move(index) {
50653
50653
  let target;
50654
- let columns = this.grid.columnList.filter(c => c.visibleIndex > -1);
50654
+ let columns = this.grid.columns.filter(c => c.visibleIndex > -1);
50655
50655
  // grid last visible index
50656
50656
  const li = columns.map(c => c.visibleIndex).reduce((a, b) => Math.max(a, b));
50657
50657
  const parent = this.parent;
@@ -52213,7 +52213,7 @@ class BaseRow {
52213
52213
  */
52214
52214
  get cells() {
52215
52215
  const res = [];
52216
- this.grid.columnList.forEach(col => {
52216
+ this.grid.columns.forEach(col => {
52217
52217
  const cell = new IgxGridCell(this.grid, this.index, col.field);
52218
52218
  res.push(cell);
52219
52219
  });
@@ -52520,7 +52520,7 @@ class IgxHierarchicalGridRow extends BaseRow {
52520
52520
  */
52521
52521
  get cells() {
52522
52522
  const res = [];
52523
- this.grid.columnList.forEach(col => {
52523
+ this.grid.columns.forEach(col => {
52524
52524
  const cell = new IgxGridCell(this.grid, this.index, col.field);
52525
52525
  res.push(cell);
52526
52526
  });
@@ -53821,7 +53821,7 @@ class IgxGroupByAreaDirective {
53821
53821
  const drag = event.detail.owner;
53822
53822
  if (drag instanceof IgxColumnMovingDragDirective) {
53823
53823
  const column = drag.column;
53824
- if (!this.grid.columnList.find(c => c === column)) {
53824
+ if (!this.grid.columns.find(c => c === column)) {
53825
53825
  return;
53826
53826
  }
53827
53827
  const isGrouped = this.expressions.findIndex((item) => item.fieldName === column.field) !== -1;
@@ -54322,7 +54322,7 @@ class IgxAdvancedFilteringDialogComponent {
54322
54322
  * @hidden @internal
54323
54323
  */
54324
54324
  get filterableColumns() {
54325
- return this.grid.columnList.filter((col) => !col.columnGroup && col.filterable);
54325
+ return this.grid.columns.filter((col) => !col.columnGroup && col.filterable);
54326
54326
  }
54327
54327
  /**
54328
54328
  * @hidden @internal
@@ -56157,7 +56157,7 @@ class IgxFilteringService {
56157
56157
  grid.paginator.page = 0;
56158
56158
  }
56159
56159
  filteringTree.filteringOperands = [];
56160
- for (const column of grid.columnList) {
56160
+ for (const column of grid.columns) {
56161
56161
  this.prepare_filtering_expression(filteringTree, column.field, term, condition, ignoreCase || column.filteringIgnoreCase);
56162
56162
  }
56163
56163
  grid.filteringExpressionsTree = filteringTree;
@@ -56191,7 +56191,7 @@ class IgxFilteringService {
56191
56191
  expressions.length = 0;
56192
56192
  }
56193
56193
  else {
56194
- this.grid.columnList.forEach(c => {
56194
+ this.grid.columns.forEach(c => {
56195
56195
  const expressions = this.getExpressions(c.field);
56196
56196
  expressions.length = 0;
56197
56197
  });
@@ -56221,7 +56221,7 @@ class IgxFilteringService {
56221
56221
  const grid = this.grid;
56222
56222
  const filteringTree = grid.filteringExpressionsTree;
56223
56223
  const newFilteringTree = new FilteringExpressionsTree(filteringTree.operator, filteringTree.fieldName);
56224
- for (const column of grid.columnList) {
56224
+ for (const column of grid.columns) {
56225
56225
  this.prepare_filtering_expression(newFilteringTree, column.field, value, condition, ignoreCase || column.filteringIgnoreCase);
56226
56226
  }
56227
56227
  const eventArgs = { owner: grid, filteringExpressions: newFilteringTree, cancel: false };
@@ -56251,7 +56251,7 @@ class IgxFilteringService {
56251
56251
  */
56252
56252
  getExpressions(columnId) {
56253
56253
  if (!this.columnToExpressionsMap.has(columnId)) {
56254
- const column = this.grid.columnList.find((col) => col.field === columnId);
56254
+ const column = this.grid.columns.find((col) => col.field === columnId);
56255
56255
  const expressionUIs = new Array();
56256
56256
  if (column) {
56257
56257
  this.generateExpressionsList(column.filteringExpressionsTree, this.grid.filteringExpressionsTree.operator, expressionUIs);
@@ -56268,7 +56268,7 @@ class IgxFilteringService {
56268
56268
  if (!this.isFiltering) {
56269
56269
  this.columnsWithComplexFilter.clear();
56270
56270
  this.columnToExpressionsMap.forEach((value, key) => {
56271
- const column = this.grid.columnList.find((col) => col.field === key);
56271
+ const column = this.grid.columns.find((col) => col.field === key);
56272
56272
  if (column) {
56273
56273
  value.length = 0;
56274
56274
  this.generateExpressionsList(column.filteringExpressionsTree, this.grid.filteringExpressionsTree.operator, value);
@@ -56341,7 +56341,7 @@ class IgxFilteringService {
56341
56341
  if (this.columnsWithComplexFilter.has(columnId)) {
56342
56342
  return true;
56343
56343
  }
56344
- const column = this.grid.columnList.find((col) => col.field === columnId);
56344
+ const column = this.grid.columns.find((col) => col.field === columnId);
56345
56345
  const isComplex = column && this.isFilteringTreeComplex(column.filteringExpressionsTree);
56346
56346
  if (isComplex) {
56347
56347
  this.columnsWithComplexFilter.add(columnId);
@@ -59241,7 +59241,7 @@ class IgxGridSummaryService {
59241
59241
  this.removeSummaries(rowID);
59242
59242
  }
59243
59243
  if (args.rowID !== undefined && args.rowID !== null) {
59244
- let columnName = args.cellID ? this.grid.columnList.find(col => col.index === args.cellID.columnID).field : undefined;
59244
+ let columnName = args.cellID ? this.grid.columns.find(col => col.index === args.cellID.columnID).field : undefined;
59245
59245
  if (columnName && this.grid.rowEditable) {
59246
59246
  return;
59247
59247
  }
@@ -59298,7 +59298,7 @@ class IgxGridSummaryService {
59298
59298
  return this.summaryHeight = 0;
59299
59299
  }
59300
59300
  let maxSummaryLength = 0;
59301
- this.grid.columnList.filter((col) => col.hasSummary && !col.hidden).forEach((column) => {
59301
+ this.grid.columns.filter((col) => col.hasSummary && !col.hidden).forEach((column) => {
59302
59302
  const getCurrentSummaryColumn = column.summaries.operate([], [], column.field).length;
59303
59303
  if (getCurrentSummaryColumn) {
59304
59304
  if (maxSummaryLength < getCurrentSummaryColumn) {
@@ -59319,7 +59319,7 @@ class IgxGridSummaryService {
59319
59319
  if (!this.hasSummarizedColumns || !data) {
59320
59320
  return rowSummaries;
59321
59321
  }
59322
- this.grid.columnList.filter(col => col.hasSummary).forEach((column) => {
59322
+ this.grid.columns.filter(col => col.hasSummary).forEach((column) => {
59323
59323
  if (!rowSummaries.get(column.field)) {
59324
59324
  const summaryResult = column.summaries.operate(data.map(r => resolveNestedPath(r, column.field)), data, column.field, this.grid.locale, column.pipeArgs);
59325
59325
  rowSummaries.set(column.field, summaryResult);
@@ -59352,7 +59352,7 @@ class IgxGridSummaryService {
59352
59352
  this.groupingExpressions = groupingArgs.expressions.map(record => record.fieldName);
59353
59353
  }
59354
59354
  get hasSummarizedColumns() {
59355
- const summarizedColumns = this.grid.columnList.filter(col => col.hasSummary && !col.hidden);
59355
+ const summarizedColumns = this.grid.columns.filter(col => col.hasSummary && !col.hidden);
59356
59356
  return summarizedColumns.length > 0;
59357
59357
  }
59358
59358
  deleteSummaryCache(id, columnName) {
@@ -61286,8 +61286,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61286
61286
  get maxLevelHeaderDepth() {
61287
61287
  if (this._maxLevelHeaderDepth === null) {
61288
61288
  this._maxLevelHeaderDepth = this.hasColumnLayouts ?
61289
- this.columnList.reduce((acc, col) => Math.max(acc, col.rowStart), 0) :
61290
- this.columnList.reduce((acc, col) => Math.max(acc, col.level), 0);
61289
+ this._columns.reduce((acc, col) => Math.max(acc, col.rowStart), 0) :
61290
+ this._columns.reduce((acc, col) => Math.max(acc, col.level), 0);
61291
61291
  }
61292
61292
  return this._maxLevelHeaderDepth;
61293
61293
  }
@@ -61300,7 +61300,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61300
61300
  * ``
61301
61301
  */
61302
61302
  get hiddenColumnsCount() {
61303
- return this.columnList.filter((col) => col.columnGroup === false && col.hidden === true).length;
61303
+ return this._columns.filter((col) => col.columnGroup === false && col.hidden === true).length;
61304
61304
  }
61305
61305
  /**
61306
61306
  * Gets the number of pinned columns.
@@ -61815,13 +61815,13 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61815
61815
  * @internal
61816
61816
  */
61817
61817
  resetColumnsCaches() {
61818
- this.columnList.forEach(column => column.resetCaches());
61818
+ this._columns.forEach(column => column.resetCaches());
61819
61819
  }
61820
61820
  /**
61821
61821
  * @hidden @internal
61822
61822
  */
61823
61823
  generateRowID() {
61824
- const primaryColumn = this.columnList.find(col => col.field === this.primaryKey);
61824
+ const primaryColumn = this._columns.find(col => col.field === this.primaryKey);
61825
61825
  const idType = this.data.length ?
61826
61826
  this.resolveDataTypes(this.data[0][this.primaryKey]) : primaryColumn ? primaryColumn.dataType : 'string';
61827
61827
  return idType === 'string' ? v4() : FAKE_ROW_ID--;
@@ -61888,7 +61888,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61888
61888
  this.resetColumnCollections();
61889
61889
  this.resetCachedWidths();
61890
61890
  this.hasVisibleColumns = undefined;
61891
- this._columnGroups = this.columnList.some(col => col.columnGroup);
61891
+ this._columnGroups = this._columns.some(col => col.columnGroup);
61892
61892
  }
61893
61893
  /**
61894
61894
  * @hidden
@@ -62151,7 +62151,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62151
62151
  * ```
62152
62152
  */
62153
62153
  toggleColumnVisibility(args) {
62154
- const col = args.column ? this.columnList.find((c) => c === args.column) : undefined;
62154
+ const col = args.column ? this._columns.find((c) => c === args.column) : undefined;
62155
62155
  if (!col) {
62156
62156
  return;
62157
62157
  }
@@ -62411,7 +62411,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62411
62411
  * ```
62412
62412
  */
62413
62413
  get columns() {
62414
- return this._rendered ? this._columns : [];
62414
+ return this._columns || [];
62415
62415
  }
62416
62416
  /**
62417
62417
  * Gets an array of the pinned `IgxColumnComponent`s.
@@ -62472,7 +62472,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62472
62472
  * @param name
62473
62473
  */
62474
62474
  getColumnByName(name) {
62475
- return this.columnList.find((col) => col.field === name);
62475
+ return this._columns.find((col) => col.field === name);
62476
62476
  }
62477
62477
  getColumnByVisibleIndex(index) {
62478
62478
  return this.visibleColumns.find((col) => !col.columnGroup && !col.columnLayout &&
@@ -62490,7 +62490,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62490
62490
  if (this._visibleColumns.length) {
62491
62491
  return this._visibleColumns;
62492
62492
  }
62493
- this._visibleColumns = this.columnList.filter(c => !c.hidden);
62493
+ this._visibleColumns = this._columns.filter(c => !c.hidden);
62494
62494
  return this._visibleColumns;
62495
62495
  }
62496
62496
  /**
@@ -62619,14 +62619,14 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62619
62619
  * @internal
62620
62620
  */
62621
62621
  get showAddButton() {
62622
- return this.rowEditable && this.dataView.length === 0 && this.columnList.length > 0;
62622
+ return this.rowEditable && this.dataView.length === 0 && this._columns.length > 0;
62623
62623
  }
62624
62624
  /**
62625
62625
  * @hidden
62626
62626
  * @internal
62627
62627
  */
62628
62628
  get showDragIcons() {
62629
- return this.rowDraggable && this.columnList.length > this.hiddenColumnsCount;
62629
+ return this.rowDraggable && this._columns.length > this.hiddenColumnsCount;
62630
62630
  }
62631
62631
  /**
62632
62632
  * @hidden
@@ -62688,12 +62688,12 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62688
62688
  const index = pos === DropPosition.AfterDropTarget ? unpinnedIndex + 1 : unpinnedIndex;
62689
62689
  columnPinStateChanged = column.unpin(index);
62690
62690
  }
62691
- if (target.pinned && column.pinned && !columnPinStateChanged) {
62692
- this._reorderColumns(column, target, pos, this._pinnedColumns);
62693
- }
62694
- if (!target.pinned && !column.pinned && !columnPinStateChanged) {
62695
- this._reorderColumns(column, target, pos, this._unpinnedColumns);
62696
- }
62691
+ // if (target.pinned && column.pinned && !columnPinStateChanged) {
62692
+ // this._reorderColumns(column, target, pos, this._pinnedColumns);
62693
+ // }
62694
+ // if (!target.pinned && !column.pinned && !columnPinStateChanged) {
62695
+ // this._reorderColumns(column, target, pos, this._unpinnedColumns);
62696
+ // }
62697
62697
  this._moveColumns(column, target, pos);
62698
62698
  this._columnsReordered(column);
62699
62699
  }
@@ -62811,7 +62811,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62811
62811
  */
62812
62812
  updateCell(value, rowSelector, column) {
62813
62813
  if (this.isDefined(this.primaryKey)) {
62814
- const col = this.columnList.toArray().find(c => c.field === column);
62814
+ const col = this._columns.find(c => c.field === column);
62815
62815
  if (col) {
62816
62816
  // Simplify
62817
62817
  const rowData = this.gridAPI.getRowData(rowSelector);
@@ -62902,7 +62902,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62902
62902
  }
62903
62903
  else {
62904
62904
  if (this._sortingOptions.mode === 'single') {
62905
- this.columns.forEach((col) => {
62905
+ this._columns.forEach((col) => {
62906
62906
  if (!(col.field === expression.fieldName)) {
62907
62907
  this.clearSort(col.field);
62908
62908
  }
@@ -63264,7 +63264,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63264
63264
  * ```
63265
63265
  */
63266
63266
  get hasSortableColumns() {
63267
- return this.columnList.some((col) => col.sortable);
63267
+ return this._columns.some((col) => col.sortable);
63268
63268
  }
63269
63269
  /**
63270
63270
  * Returns if the `IgxGridComponent` has editable columns.
@@ -63275,7 +63275,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63275
63275
  * ```
63276
63276
  */
63277
63277
  get hasEditableColumns() {
63278
- return this.columnList.some((col) => col.editable);
63278
+ return this._columns.some((col) => col.editable);
63279
63279
  }
63280
63280
  /**
63281
63281
  * Returns if the `IgxGridComponent` has filterable columns.
@@ -63286,7 +63286,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63286
63286
  * ```
63287
63287
  */
63288
63288
  get hasFilterableColumns() {
63289
- return this.columnList.some((col) => col.filterable);
63289
+ return this._columns.some((col) => col.filterable);
63290
63290
  }
63291
63291
  /**
63292
63292
  * Returns if the `IgxGridComponent` has summarized columns.
@@ -63297,7 +63297,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63297
63297
  * ```
63298
63298
  */
63299
63299
  get hasSummarizedColumns() {
63300
- const summarizedColumns = this.columnList.filter(col => col.hasSummary && !col.hidden);
63300
+ const summarizedColumns = this._columns.filter(col => col.hasSummary && !col.hidden);
63301
63301
  return summarizedColumns.length > 0;
63302
63302
  }
63303
63303
  /**
@@ -63311,7 +63311,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63311
63311
  */
63312
63312
  get hasVisibleColumns() {
63313
63313
  if (this._hasVisibleColumns === undefined) {
63314
- return this.columnList ? this.columnList.some(c => !c.hidden) : false;
63314
+ return this._columns ? this._columns.some(c => !c.hidden) : false;
63315
63315
  }
63316
63316
  return this._hasVisibleColumns;
63317
63317
  }
@@ -63352,7 +63352,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63352
63352
  * ```
63353
63353
  */
63354
63354
  get hasColumnLayouts() {
63355
- return !!this.columnList.some(col => col.columnLayout);
63355
+ return !!this._columns.some(col => col.columnLayout);
63356
63356
  }
63357
63357
  /**
63358
63358
  * @hidden @internal
@@ -63807,7 +63807,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63807
63807
  * ```
63808
63808
  */
63809
63809
  selectAllColumns() {
63810
- this.selectColumns(this.columnList.filter(c => !c.columnGroup));
63810
+ this.selectColumns(this._columns.filter(c => !c.columnGroup));
63811
63811
  }
63812
63812
  /**
63813
63813
  *
@@ -63916,7 +63916,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63916
63916
  navigateTo(rowIndex, visibleColIndex = -1, cb = null) {
63917
63917
  const totalItems = this.totalItemCount ?? this.dataView.length - 1;
63918
63918
  if (rowIndex < 0 || rowIndex > totalItems || (visibleColIndex !== -1
63919
- && this.columnList.map(col => col.visibleIndex).indexOf(visibleColIndex) === -1)) {
63919
+ && this._columns.map(col => col.visibleIndex).indexOf(visibleColIndex) === -1)) {
63920
63920
  return;
63921
63921
  }
63922
63922
  if (this.dataView.slice(rowIndex, rowIndex + 1).find(rec => rec.expression || rec.childGridsData)) {
@@ -63962,7 +63962,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63962
63962
  * ```
63963
63963
  */
63964
63964
  getNextCell(currRowIndex, curVisibleColIndex, callback = null) {
63965
- const columns = this.columnList.filter(col => !col.columnGroup && col.visibleIndex >= 0);
63965
+ const columns = this._columns.filter(col => !col.columnGroup && col.visibleIndex >= 0);
63966
63966
  const dataViewIndex = this._getDataViewIndex(currRowIndex);
63967
63967
  if (!this.isValidPosition(dataViewIndex, curVisibleColIndex)) {
63968
63968
  return { rowIndex: currRowIndex, visibleColumnIndex: curVisibleColIndex };
@@ -63997,7 +63997,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63997
63997
  * ```
63998
63998
  */
63999
63999
  getPreviousCell(currRowIndex, curVisibleColIndex, callback = null) {
64000
- const columns = this.columnList.filter(col => !col.columnGroup && col.visibleIndex >= 0);
64000
+ const columns = this._columns.filter(col => !col.columnGroup && col.visibleIndex >= 0);
64001
64001
  const dataViewIndex = this._getDataViewIndex(currRowIndex);
64002
64002
  if (!this.isValidPosition(dataViewIndex, curVisibleColIndex)) {
64003
64003
  return { rowIndex: currRowIndex, visibleColumnIndex: curVisibleColIndex };
@@ -64419,7 +64419,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64419
64419
  if (!this.columnWidthSetByUser) {
64420
64420
  this._columnWidth = this.width !== null ? this.getPossibleColumnWidth() : MINIMUM_COLUMN_WIDTH$2 + 'px';
64421
64421
  }
64422
- this.columnList.forEach((column) => {
64422
+ this._columns.forEach((column) => {
64423
64423
  if (this.hasColumnLayouts && parseInt(this._columnWidth, 10)) {
64424
64424
  const columnWidthCombined = parseInt(this._columnWidth, 10) * (column.colEnd ? column.colEnd - column.colStart : 1);
64425
64425
  column.defaultWidth = columnWidthCombined + 'px';
@@ -64472,7 +64472,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64472
64472
  * @hidden
64473
64473
  */
64474
64474
  _moveColumns(from, to, pos) {
64475
- const list = this.columnList.toArray();
64475
+ const orderedList = this._pinnedColumns.concat(this._unpinnedColumns);
64476
+ const list = orderedList;
64476
64477
  this._reorderColumns(from, to, pos, list);
64477
64478
  const newList = this._resetColumnList(list);
64478
64479
  this.updateColumns(newList);
@@ -64484,18 +64485,17 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64484
64485
  updateColumns(newColumns) {
64485
64486
  // update internal collections to retain order.
64486
64487
  this._pinnedColumns = newColumns
64487
- .filter((c) => c.pinned).sort((a, b) => this._pinnedColumns.indexOf(a) - this._pinnedColumns.indexOf(b));
64488
+ .filter((c) => c.pinned);
64488
64489
  this._unpinnedColumns = newColumns.filter((c) => !c.pinned);
64489
- this.columnList.reset(newColumns);
64490
- this.columnList.notifyOnChanges();
64491
- this._columns = this.columnList.toArray();
64490
+ this._columns = newColumns;
64491
+ this.resetCaches();
64492
64492
  }
64493
64493
  /**
64494
64494
  * @hidden
64495
64495
  */
64496
64496
  _resetColumnList(list) {
64497
64497
  if (!list) {
64498
- list = this.columnList.toArray();
64498
+ list = this._columns;
64499
64499
  }
64500
64500
  let newList = [];
64501
64501
  list.filter(c => c.level === 0).forEach(p => {
@@ -64543,7 +64543,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64543
64543
  if (this.autoGenerate) {
64544
64544
  this.autogenerateColumns();
64545
64545
  }
64546
- this.initColumns(this.columnList, (col) => this.columnInit.emit(col));
64546
+ else {
64547
+ this._columns = this.getColumnList();
64548
+ }
64549
+ this.initColumns(this._columns, (col) => this.columnInit.emit(col));
64547
64550
  this.columnListDiffer.diff(this.columnList);
64548
64551
  this.columnList.changes
64549
64552
  .pipe(takeUntil(this.destroy$))
@@ -64551,6 +64554,9 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64551
64554
  this.onColumnsChanged(change);
64552
64555
  });
64553
64556
  }
64557
+ getColumnList() {
64558
+ return this.columnList.toArray();
64559
+ }
64554
64560
  /**
64555
64561
  * @hidden
64556
64562
  */
@@ -64592,10 +64598,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64592
64598
  */
64593
64599
  onColumnsChanged(change) {
64594
64600
  const diff = this.columnListDiffer.diff(change);
64595
- if (this.autoGenerate && this.columnList.length === 0 && this._autoGeneratedCols.length > 0) {
64601
+ if (this.autoGenerate && this._columns.length === 0 && this._autoGeneratedCols.length > 0) {
64596
64602
  // In Ivy if there are nested conditional templates the content children are re-evaluated
64597
64603
  // hence autogenerated columns are cleared and need to be reset.
64598
- this.columnList.reset(this._autoGeneratedCols);
64604
+ this.updateColumns(this._autoGeneratedCols);
64599
64605
  return;
64600
64606
  }
64601
64607
  if (diff) {
@@ -64610,7 +64616,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64610
64616
  this._unpinnedColumns.push(record.item);
64611
64617
  }
64612
64618
  });
64613
- this.initColumns(this.columnList, (col) => this.columnInit.emit(col));
64619
+ this.initColumns(this.columnList.toArray(), (col) => this.columnInit.emit(col));
64614
64620
  diff.forEachRemovedItem((record) => {
64615
64621
  const isColumnGroup = record.item instanceof IgxColumnGroupComponent;
64616
64622
  if (!isColumnGroup) {
@@ -64906,7 +64912,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64906
64912
  columns.push(ref.instance);
64907
64913
  });
64908
64914
  this._autoGeneratedCols = columns;
64909
- this.columnList.reset(columns);
64915
+ this.updateColumns(columns);
64910
64916
  if (data && data.length > 0) {
64911
64917
  this.shouldGenerate = false;
64912
64918
  }
@@ -64918,10 +64924,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64918
64924
  * @hidden
64919
64925
  */
64920
64926
  initColumns(collection, cb = null) {
64921
- this._columnGroups = this.columnList.some(col => col.columnGroup);
64927
+ this._columnGroups = collection.some(col => col.columnGroup);
64922
64928
  if (this.hasColumnLayouts) {
64923
64929
  // Set overall row layout size
64924
- this.columnList.forEach((col) => {
64930
+ collection.forEach((col) => {
64925
64931
  if (col.columnLayout) {
64926
64932
  const layoutSize = col.children ?
64927
64933
  col.children.reduce((acc, val) => Math.max(val.rowStart + val.gridRowSpan - 1, acc), 1) :
@@ -64933,18 +64939,17 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64933
64939
  if (this.hasColumnLayouts && this.hasColumnGroups) {
64934
64940
  // invalid configuration - multi-row and column groups
64935
64941
  // remove column groups
64936
- const columnLayoutColumns = this.columnList.filter((col) => col.columnLayout || col.columnLayoutChild);
64937
- this.columnList.reset(columnLayoutColumns);
64942
+ const columnLayoutColumns = collection.filter((col) => col.columnLayout || col.columnLayoutChild);
64943
+ collection = columnLayoutColumns;
64938
64944
  }
64939
64945
  this._maxLevelHeaderDepth = null;
64940
- this._columns = this.columnList.toArray();
64941
64946
  collection.forEach((column) => {
64942
64947
  column.defaultWidth = this.columnWidthSetByUser ? this._columnWidth : column.defaultWidth ? column.defaultWidth : '';
64943
64948
  if (cb) {
64944
64949
  cb(column);
64945
64950
  }
64946
64951
  });
64947
- this.reinitPinStates();
64952
+ this.updateColumns(collection);
64948
64953
  if (this.hasColumnLayouts) {
64949
64954
  collection.forEach((column) => {
64950
64955
  column.populateVisibleIndexes();
@@ -64955,11 +64960,11 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64955
64960
  * @hidden
64956
64961
  */
64957
64962
  reinitPinStates() {
64958
- this._pinnedColumns = this.columnList
64963
+ this._pinnedColumns = this._columns
64959
64964
  .filter((c) => c.pinned).sort((a, b) => this._pinnedColumns.indexOf(a) - this._pinnedColumns.indexOf(b));
64960
- this._unpinnedColumns = this.hasColumnGroups ? this.columnList.filter((c) => !c.pinned) :
64961
- this.columnList.filter((c) => !c.pinned)
64962
- .sort((a, b) => this._unpinnedColumns.findIndex(x => x.field === a.field) - this._unpinnedColumns.findIndex(x => x.field === b.field));
64965
+ this._unpinnedColumns = this.hasColumnGroups ? this._columns.filter((c) => !c.pinned) :
64966
+ this._columns.filter((c) => !c.pinned)
64967
+ .sort((a, b) => this._unpinnedColumns.indexOf(a) - this._unpinnedColumns.indexOf(b));
64963
64968
  }
64964
64969
  extractDataFromSelection(source, formatters = false, headers = false, columnData) {
64965
64970
  let columnsArray;
@@ -65138,7 +65143,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
65138
65143
  // Make sure we don't exceed unpinned area min width and get pinned and unpinned col collections.
65139
65144
  // We take into account top level columns (top level groups and non groups).
65140
65145
  // If top level is unpinned the pinning handles all children to be unpinned as well.
65141
- for (const column of this.columnList) {
65146
+ for (const column of this._columns) {
65142
65147
  if (column.pinned && !column.parent) {
65143
65148
  pinnedColumns.push(column);
65144
65149
  }
@@ -65231,7 +65236,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
65231
65236
  _columnsReordered(column) {
65232
65237
  this.notifyChanges();
65233
65238
  if (this.hasColumnLayouts) {
65234
- this.columnList.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
65239
+ this._columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
65235
65240
  }
65236
65241
  // after reordering is done reset cached column collections.
65237
65242
  this.resetColumnCollections();
@@ -65393,7 +65398,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
65393
65398
  }
65394
65399
  isValidPosition(rowIndex, colIndex) {
65395
65400
  const rows = this.summariesRowList.filter(s => s.index !== 0).concat(this.rowList.toArray()).length;
65396
- const cols = this.columnList.filter(col => !col.columnGroup && col.visibleIndex >= 0 && !col.hidden).length;
65401
+ const cols = this._columns.filter(col => !col.columnGroup && col.visibleIndex >= 0 && !col.hidden).length;
65397
65402
  if (rows < 1 || cols < 1) {
65398
65403
  return false;
65399
65404
  }
@@ -66473,7 +66478,7 @@ class IgxGridMRLNavigationService extends IgxGridNavigationService {
66473
66478
  col.visibleIndex > this.activeNode.column && col.colStart > this.activeNode.layout.colStart);
66474
66479
  if (!column || (previous && this.activeNode.layout.colStart === 1)) {
66475
66480
  const index = previous ? parent.visibleIndex - 1 : parent.visibleIndex + 1;
66476
- const children = this.grid.columnList.find(cols => cols.columnLayout && cols.visibleIndex === index).children;
66481
+ const children = this.grid.columns.find(cols => cols.columnLayout && cols.visibleIndex === index).children;
66477
66482
  column = previous ? children.toArray().reverse().find(child => child.rowStart <= this.activeNode.layout.rowStart) :
66478
66483
  children.find(child => this.rowEnd(child) > this.activeNode.layout.rowStart && child.colStart === 1);
66479
66484
  }
@@ -68348,7 +68353,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
68348
68353
  this._applyGrouping();
68349
68354
  this.notifyChanges();
68350
68355
  }
68351
- if (!this._init && JSON.stringify(oldExpressions) !== JSON.stringify(newExpressions) && this.columnList) {
68356
+ if (!this._init && JSON.stringify(oldExpressions) !== JSON.stringify(newExpressions) && this._columns) {
68352
68357
  const groupedCols = [];
68353
68358
  const ungroupedCols = [];
68354
68359
  const groupedColsArr = newExpressions.filter((obj) => !oldExpressions.some((obj2) => obj.fieldName === obj2.fieldName));
@@ -68412,7 +68417,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
68412
68417
  else {
68413
68418
  this.groupingDiffer = null;
68414
68419
  }
68415
- if (this.columnList && this.groupingExpressions) {
68420
+ if (this._columns && this.groupingExpressions) {
68416
68421
  this._setGroupColsVisibility(value);
68417
68422
  }
68418
68423
  this._hideGroupedColumns = value;
@@ -68466,7 +68471,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
68466
68471
  */
68467
68472
  getCellByColumnVisibleIndex(rowIndex, index) {
68468
68473
  const row = this.getRowByIndex(rowIndex);
68469
- const column = this.columnList.find((col) => col.visibleIndex === index);
68474
+ const column = this._columns.find((col) => col.visibleIndex === index);
68470
68475
  if (row && row instanceof IgxGridRow && !row.data?.detailsData && column) {
68471
68476
  return new IgxGridCell(this, rowIndex, column.field);
68472
68477
  }
@@ -68729,7 +68734,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
68729
68734
  * ```
68730
68735
  */
68731
68736
  get hasGroupableColumns() {
68732
- return this.columnList.some((col) => col.groupable && !col.columnGroup);
68737
+ return this._columns.some((col) => col.groupable && !col.columnGroup);
68733
68738
  }
68734
68739
  /**
68735
68740
  * Returns whether the `IgxGridComponent` has group area.
@@ -68853,7 +68858,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
68853
68858
  this._groupRowTemplate = this.groupTemplate.template;
68854
68859
  }
68855
68860
  this.detailTemplate.changes.subscribe(() => this.trackChanges = (_, rec) => (rec?.detailsData !== undefined ? rec.detailsData : rec));
68856
- if (this.hideGroupedColumns && this.columnList && this.groupingExpressions) {
68861
+ if (this.hideGroupedColumns && this._columns && this.groupingExpressions) {
68857
68862
  this._setGroupColsVisibility(this.hideGroupedColumns);
68858
68863
  }
68859
68864
  this._setupNavigationService();
@@ -68901,9 +68906,9 @@ class IgxGridComponent extends IgxGridBaseDirective {
68901
68906
  * @hidden @internal
68902
68907
  */
68903
68908
  ngDoCheck() {
68904
- if (this.groupingDiffer && this.columnList && !this.hasColumnLayouts) {
68909
+ if (this.groupingDiffer && this._columns && !this.hasColumnLayouts) {
68905
68910
  const changes = this.groupingDiffer.diff(this.groupingExpressions);
68906
- if (changes && this.columnList.length > 0) {
68911
+ if (changes && this._columns.length > 0) {
68907
68912
  changes.forEachAddedItem((rec) => {
68908
68913
  const col = this.getColumnByName(rec.item.fieldName);
68909
68914
  if (col) {
@@ -69033,7 +69038,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
69033
69038
  */
69034
69039
  getCellByColumn(rowIndex, columnField) {
69035
69040
  const row = this.getRowByIndex(rowIndex);
69036
- const column = this.columnList.find((col) => col.field === columnField);
69041
+ const column = this._columns.find((col) => col.field === columnField);
69037
69042
  if (row && row instanceof IgxGridRow && !row.data?.detailsData && column) {
69038
69043
  if (this.pagingMode === 1 && this.gridAPI.grid.page !== 0) {
69039
69044
  row.index = rowIndex + this.paginator.perPage * this.paginator.page;
@@ -69055,7 +69060,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
69055
69060
  */
69056
69061
  getCellByKey(rowSelector, columnField) {
69057
69062
  const row = this.getRowByKey(rowSelector);
69058
- const column = this.columnList.find((col) => col.field === columnField);
69063
+ const column = this._columns.find((col) => col.field === columnField);
69059
69064
  if (row && column) {
69060
69065
  return new IgxGridCell(this, row.index, columnField);
69061
69066
  }
@@ -69157,7 +69162,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
69157
69162
  return !expression.fieldName;
69158
69163
  }
69159
69164
  _setGroupColsVisibility(value) {
69160
- if (this.columnList.length > 0 && !this.hasColumnLayouts) {
69165
+ if (this._columns.length > 0 && !this.hasColumnLayouts) {
69161
69166
  this.groupingExpressions.forEach((expr) => {
69162
69167
  const col = this.getColumnByName(expr.fieldName);
69163
69168
  col.hidden = value;
@@ -69332,7 +69337,7 @@ class IgxGridStateDirective {
69332
69337
  },
69333
69338
  columns: {
69334
69339
  getFeatureState: (context) => {
69335
- const gridColumns = context.currGrid.columnList.map((c) => ({
69340
+ const gridColumns = context.currGrid.columns.map((c) => ({
69336
69341
  pinned: c.pinned,
69337
69342
  sortable: c.sortable,
69338
69343
  filterable: c.filterable,
@@ -69392,6 +69397,9 @@ class IgxGridStateDirective {
69392
69397
  }
69393
69398
  });
69394
69399
  context.grid.updateColumns(newColumns);
69400
+ newColumns.forEach(col => {
69401
+ context.grid.columnInit.emit(col);
69402
+ });
69395
69403
  }
69396
69404
  },
69397
69405
  groupBy: {
@@ -69641,13 +69649,11 @@ class IgxGridStateDirective {
69641
69649
  // TODO Notify the grid that columnList.changes is triggered by the state directive
69642
69650
  // instead of piping it like below
69643
69651
  const columns = 'columns';
69644
- this.grid.columnList.changes.pipe(delay(0), take(1)).subscribe(() => {
69645
- this.featureKeys = this.featureKeys.filter(f => f !== columns);
69646
- this.restoreFeatures(state);
69647
- });
69648
69652
  this.applyFeatures(features);
69649
69653
  if (this.featureKeys.includes(columns) && this.options[columns] && state[columns]) {
69650
69654
  this.getFeature(columns).restoreFeatureState(this, state[columns]);
69655
+ this.featureKeys = this.featureKeys.filter(f => f !== columns);
69656
+ this.restoreFeatures(state);
69651
69657
  }
69652
69658
  else {
69653
69659
  this.restoreFeatures(state);
@@ -69698,8 +69704,8 @@ class IgxGridStateDirective {
69698
69704
  else {
69699
69705
  const expr = item;
69700
69706
  let dataType;
69701
- if (this.currGrid.columnList.length > 0) {
69702
- dataType = this.currGrid.columnList.find(c => c.field === expr.fieldName).dataType;
69707
+ if (this.currGrid.columns.length > 0) {
69708
+ dataType = this.currGrid.columns.find(c => c.field === expr.fieldName).dataType;
69703
69709
  }
69704
69710
  else if (this.state.columns) {
69705
69711
  dataType = this.state.columns.find(c => c.field === expr.fieldName).dataType;
@@ -70034,14 +70040,14 @@ class IgxColumnLayoutComponent extends IgxColumnGroupComponent {
70034
70040
  set hidden(value) {
70035
70041
  this._hidden = value;
70036
70042
  this.children.forEach(child => child.hidden = value);
70037
- if (this.grid && this.grid.columnList && this.grid.columnList.length > 0) {
70043
+ if (this.grid && this.grid.columns && this.grid.columns.length > 0) {
70038
70044
  // reset indexes in case columns are hidden/shown runtime
70039
70045
  const columns = this.grid && this.grid.pinnedColumns && this.grid.unpinnedColumns ?
70040
70046
  this.grid.pinnedColumns.concat(this.grid.unpinnedColumns) : [];
70041
70047
  if (!this._hidden && !columns.find(c => c.field === this.field)) {
70042
70048
  this.grid.resetColumnCollections();
70043
70049
  }
70044
- this.grid.columnList.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
70050
+ this.grid.columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
70045
70051
  }
70046
70052
  }
70047
70053
  /**
@@ -71968,13 +71974,13 @@ class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {
71968
71974
  return this._hideGroupedColumns;
71969
71975
  }
71970
71976
  set hideGroupedColumns(value) {
71971
- if (this.grid.columnList && this.expressions) {
71977
+ if (this.grid.columns && this.expressions) {
71972
71978
  this.setColumnsVisibility(value);
71973
71979
  }
71974
71980
  this._hideGroupedColumns = value;
71975
71981
  }
71976
71982
  ngAfterContentInit() {
71977
- if (this.grid.columnList && this.expressions) {
71983
+ if (this.grid.columns && this.expressions) {
71978
71984
  this.groupingDiffer = this.differs.find(this.expressions).create();
71979
71985
  this.updateColumnsVisibility();
71980
71986
  }
@@ -72025,9 +72031,9 @@ class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {
72025
72031
  this.updateColumnsVisibility();
72026
72032
  }
72027
72033
  updateColumnsVisibility() {
72028
- if (this.groupingDiffer && this.grid.columnList && !this.grid.hasColumnLayouts) {
72034
+ if (this.groupingDiffer && this.grid.columns && !this.grid.hasColumnLayouts) {
72029
72035
  const changes = this.groupingDiffer.diff(this.expressions);
72030
- if (changes && this.grid.columnList.length > 0) {
72036
+ if (changes && this.grid.columns.length > 0) {
72031
72037
  changes.forEachAddedItem((rec) => {
72032
72038
  const col = this.grid.getColumnByName(rec.item.fieldName);
72033
72039
  col.hidden = this.hideGroupedColumns;
@@ -72040,7 +72046,7 @@ class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {
72040
72046
  }
72041
72047
  }
72042
72048
  setColumnsVisibility(value) {
72043
- if (this.grid.columnList.length > 0 && !this.grid.hasColumnLayouts) {
72049
+ if (this.grid.columns.length > 0 && !this.grid.hasColumnLayouts) {
72044
72050
  this.expressions.forEach((expr) => {
72045
72051
  const col = this.grid.getColumnByName(expr.fieldName);
72046
72052
  col.hidden = value;
@@ -73520,7 +73526,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
73520
73526
  */
73521
73527
  getCellByColumnVisibleIndex(rowIndex, index) {
73522
73528
  const row = this.getRowByIndex(rowIndex);
73523
- const column = this.columnList.find((col) => col.visibleIndex === index);
73529
+ const column = this.columns.find((col) => col.visibleIndex === index);
73524
73530
  if (row && row instanceof IgxTreeGridRow && column) {
73525
73531
  return new IgxGridCell(this, rowIndex, column.field);
73526
73532
  }
@@ -73857,7 +73863,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
73857
73863
  */
73858
73864
  getCellByColumn(rowIndex, columnField) {
73859
73865
  const row = this.getRowByIndex(rowIndex);
73860
- const column = this.columnList.find((col) => col.field === columnField);
73866
+ const column = this.columns.find((col) => col.field === columnField);
73861
73867
  if (row && row instanceof IgxTreeGridRow && column) {
73862
73868
  return new IgxGridCell(this, rowIndex, columnField);
73863
73869
  }
@@ -73876,7 +73882,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
73876
73882
  */
73877
73883
  getCellByKey(rowSelector, columnField) {
73878
73884
  const row = this.getRowByKey(rowSelector);
73879
- const column = this.columnList.find((col) => col.field === columnField);
73885
+ const column = this.columns.find((col) => col.field === columnField);
73880
73886
  if (row && column) {
73881
73887
  return new IgxGridCell(this, row.index, columnField);
73882
73888
  }
@@ -73934,7 +73940,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
73934
73940
  * ```
73935
73941
  */
73936
73942
  get hasGroupableColumns() {
73937
- return this.columnList.some((col) => col.groupable && !col.columnGroup);
73943
+ return this.columns.some((col) => col.groupable && !col.columnGroup);
73938
73944
  }
73939
73945
  generateDataFields(data) {
73940
73946
  return super.generateDataFields(data).filter(field => field !== this.childDataKey);
@@ -74017,8 +74023,8 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
74017
74023
  if (this.hasColumnLayouts) {
74018
74024
  // invalid configuration - tree grid should not allow column layouts
74019
74025
  // remove column layouts
74020
- const nonColumnLayoutColumns = this.columnList.filter((col) => !col.columnLayout && !col.columnLayoutChild);
74021
- this.columnList.reset(nonColumnLayoutColumns);
74026
+ const nonColumnLayoutColumns = this.columns.filter((col) => !col.columnLayout && !col.columnLayoutChild);
74027
+ this.updateColumns(nonColumnLayoutColumns);
74022
74028
  }
74023
74029
  super.initColumns(collection, cb);
74024
74030
  }
@@ -74926,7 +74932,7 @@ class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirective {
74926
74932
  */
74927
74933
  get maxLevelHeaderDepth() {
74928
74934
  if (this._maxLevelHeaderDepth === null) {
74929
- this._maxLevelHeaderDepth = this.columnList.reduce((acc, col) => Math.max(acc, col.level), 0);
74935
+ this._maxLevelHeaderDepth = this.columns.reduce((acc, col) => Math.max(acc, col.level), 0);
74930
74936
  }
74931
74937
  return this._maxLevelHeaderDepth;
74932
74938
  }
@@ -74969,13 +74975,12 @@ class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirective {
74969
74975
  columns.push(ref.instance);
74970
74976
  });
74971
74977
  const result = flatten(columns);
74972
- this.columnList.reset(result);
74973
- this.columnList.notifyOnChanges();
74978
+ this.updateColumns(result);
74974
74979
  this.initPinning();
74975
74980
  const factoryColumn = this.resolver.resolveComponentFactory(IgxColumnComponent);
74976
74981
  const outputs = factoryColumn.outputs.filter(o => o.propName !== 'columnChange');
74977
74982
  outputs.forEach(output => {
74978
- this.columnList.forEach(column => {
74983
+ this.columns.forEach(column => {
74979
74984
  if (column[output.propName]) {
74980
74985
  column[output.propName].pipe(takeUntil(column.destroy$)).subscribe((args) => {
74981
74986
  const rowIslandColumn = this.parentIsland.childColumns.find(col => col.field === column.field);
@@ -75216,6 +75221,7 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
75216
75221
  this.rootGrid = null;
75217
75222
  this.layout_id = `igx-row-island-`;
75218
75223
  this.isInit = false;
75224
+ this._childColumns = [];
75219
75225
  }
75220
75226
  /**
75221
75227
  * Sets if all immediate children of the grids for this `IgxRowIslandComponent` should be expanded/collapsed.
@@ -75305,7 +75311,8 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
75305
75311
  const nestedColumns = this.children.map((layout) => layout.columnList.toArray());
75306
75312
  const colsArray = [].concat.apply([], nestedColumns);
75307
75313
  const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
75308
- this.childColumns.reset(topCols);
75314
+ this._childColumns = topCols;
75315
+ this.updateColumns(this._childColumns);
75309
75316
  this.columnList.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {
75310
75317
  Promise.resolve().then(() => {
75311
75318
  this.updateColumnList();
@@ -75313,7 +75320,7 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
75313
75320
  });
75314
75321
  // handle column changes so that they are passed to child grid instances when columnChange is emitted.
75315
75322
  this.ri_columnListDiffer.diff(this.childColumns);
75316
- this.childColumns.toArray().forEach(x => x.columnChange.pipe(takeUntil(x.destroy$)).subscribe(() => this.updateColumnList()));
75323
+ this._childColumns.forEach(x => x.columnChange.pipe(takeUntil(x.destroy$)).subscribe(() => this.updateColumnList()));
75317
75324
  this.childColumns.changes.pipe(takeUntil(this.destroy$)).subscribe((change) => {
75318
75325
  const diff = this.ri_columnListDiffer.diff(change);
75319
75326
  if (diff) {
@@ -75400,15 +75407,9 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
75400
75407
  }
75401
75408
  return false;
75402
75409
  });
75403
- this.childColumns.reset(topCols);
75404
- if (this.parentIsland) {
75405
- this.parentIsland.columnList.notifyOnChanges();
75406
- }
75407
- else {
75408
- this.rootGrid.columnList.notifyOnChanges();
75409
- }
75410
+ this._childColumns = topCols;
75410
75411
  this.rowIslandAPI.getChildGrids().forEach((grid) => {
75411
- grid.createColumnsList(this.childColumns.toArray());
75412
+ grid.createColumnsList(this._childColumns);
75412
75413
  if (!document.body.contains(grid.nativeElement)) {
75413
75414
  grid.updateOnRender = true;
75414
75415
  }
@@ -76097,7 +76098,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76097
76098
  */
76098
76099
  getCellByColumnVisibleIndex(rowIndex, index) {
76099
76100
  const row = this.getRowByIndex(rowIndex);
76100
- const column = this.columnList.find((col) => col.visibleIndex === index);
76101
+ const column = this.columns.find((col) => col.visibleIndex === index);
76101
76102
  if (row && row instanceof IgxHierarchicalGridRow && column) {
76102
76103
  return new IgxGridCell(this, rowIndex, column.field);
76103
76104
  }
@@ -76320,7 +76321,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76320
76321
  */
76321
76322
  getCellByColumn(rowIndex, columnField) {
76322
76323
  const row = this.getRowByIndex(rowIndex);
76323
- const column = this.columnList.find((col) => col.field === columnField);
76324
+ const column = this.columns.find((col) => col.field === columnField);
76324
76325
  if (row && row instanceof IgxHierarchicalGridRow && column) {
76325
76326
  return new IgxGridCell(this, rowIndex, columnField);
76326
76327
  }
@@ -76339,7 +76340,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76339
76340
  */
76340
76341
  getCellByKey(rowSelector, columnField) {
76341
76342
  const row = this.getRowByKey(rowSelector);
76342
- const column = this.columnList.find((col) => col.field === columnField);
76343
+ const column = this.columns.find((col) => col.field === columnField);
76343
76344
  if (row && column) {
76344
76345
  return new IgxGridCell(this, row.index, columnField);
76345
76346
  }
@@ -76615,8 +76616,8 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76615
76616
  if (this.hasColumnLayouts) {
76616
76617
  // invalid configuration - hierarchical grid should not allow column layouts
76617
76618
  // remove column layouts
76618
- const nonColumnLayoutColumns = this.columnList.filter((col) => !col.columnLayout && !col.columnLayoutChild);
76619
- this.columnList.reset(nonColumnLayoutColumns);
76619
+ const nonColumnLayoutColumns = this.columns.filter((col) => !col.columnLayout && !col.columnLayoutChild);
76620
+ this.updateColumns(nonColumnLayoutColumns);
76620
76621
  }
76621
76622
  super.initColumns(collection, cb);
76622
76623
  }
@@ -76624,16 +76625,25 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76624
76625
  if (this.parentIsland && this.parentIsland.childColumns.length > 0 && !this.autoGenerate) {
76625
76626
  this.createColumnsList(this.parentIsland.childColumns.toArray());
76626
76627
  }
76627
- super.setupColumns();
76628
+ else {
76629
+ super.setupColumns();
76630
+ }
76631
+ }
76632
+ getColumnList() {
76633
+ const childLayouts = this.parent ? this.childLayoutList : this.allLayoutList;
76634
+ const nestedColumns = childLayouts.map((layout) => layout.columnList.toArray());
76635
+ const colsArray = [].concat.apply([], nestedColumns);
76636
+ if (colsArray.length > 0) {
76637
+ const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
76638
+ return topCols;
76639
+ }
76640
+ else {
76641
+ return this.columnList.toArray();
76642
+ }
76628
76643
  }
76629
76644
  onColumnsChanged(change) {
76630
76645
  Promise.resolve().then(() => {
76631
76646
  this.updateColumnList();
76632
- const cols = change.filter(c => c.grid === this);
76633
- if (cols.length > 0 || this.autoGenerate) {
76634
- this.columnList.reset(cols);
76635
- super.onColumnsChanged(this.columnList);
76636
- }
76637
76647
  });
76638
76648
  }
76639
76649
  _shouldAutoSize(renderedHeight) {
@@ -76649,8 +76659,8 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76649
76659
  const colLength = this.columnList.length;
76650
76660
  if (colsArray.length > 0) {
76651
76661
  const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
76652
- this.columnList.reset(topCols);
76653
- if (recalcColSizes && this.columnList.length !== colLength) {
76662
+ this.updateColumns(topCols);
76663
+ if (recalcColSizes && this.columns.length !== colLength) {
76654
76664
  this.calculateGridSizes(false);
76655
76665
  }
76656
76666
  }
@@ -86544,7 +86554,7 @@ class IgxPivotGridComponent extends IgxGridBaseDirective {
86544
86554
  */
86545
86555
  ngAfterContentInit() {
86546
86556
  // ignore any user defined columns and auto-generate based on pivot config.
86547
- this.columnList.reset([]);
86557
+ this.updateColumns([]);
86548
86558
  Promise.resolve().then(() => {
86549
86559
  this.setupColumns();
86550
86560
  });
@@ -87417,8 +87427,8 @@ class IgxPivotGridComponent extends IgxGridBaseDirective {
87417
87427
  }
87418
87428
  }
87419
87429
  });
87430
+ this.updateColumns(columns);
87420
87431
  this.reflow();
87421
- this.columnList.reset(columns);
87422
87432
  if (data && data.length > 0) {
87423
87433
  this.shouldGenerate = false;
87424
87434
  }