igniteui-angular 12.3.27 → 12.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/igniteui-angular.umd.js +294 -170
- package/bundles/igniteui-angular.umd.js.map +1 -1
- package/esm2015/lib/grids/api.service.js +3 -4
- package/esm2015/lib/grids/columns/column.component.js +5 -5
- package/esm2015/lib/grids/common/crud.service.js +3 -3
- package/esm2015/lib/grids/common/events.js +1 -1
- package/esm2015/lib/grids/grid/grid.component.js +11 -11
- package/esm2015/lib/grids/grid-base.directive.js +83 -85
- package/esm2015/lib/grids/grid-mrl-navigation.service.js +2 -2
- package/esm2015/lib/grids/grid-public-row.js +3 -3
- package/esm2015/lib/grids/grouping/group-by-area.directive.js +1 -1
- package/esm2015/lib/grids/grouping/tree-grid-group-by-area.component.js +6 -6
- package/esm2015/lib/grids/hierarchical-grid/hierarchical-grid-base.directive.js +4 -5
- package/esm2015/lib/grids/hierarchical-grid/hierarchical-grid.component.js +25 -14
- package/esm2015/lib/grids/hierarchical-grid/row-island.component.js +7 -11
- package/esm2015/lib/grids/state.directive.js +12 -9
- package/esm2015/lib/grids/summaries/grid-summary.service.js +5 -5
- package/esm2015/lib/grids/tree-grid/tree-grid.component.js +25 -9
- package/esm2015/lib/services/exporter-common/base-export-service.js +3 -3
- package/esm2015/lib/simple-combo/simple-combo.component.js +2 -2
- package/esm2015/lib/splitter/splitter-pane/splitter-pane.component.js +58 -6
- package/esm2015/lib/splitter/splitter.component.js +22 -3
- package/esm2015/lib/tree/tree.component.js +30 -1
- package/fesm2015/igniteui-angular.js +289 -167
- package/fesm2015/igniteui-angular.js.map +1 -1
- package/igniteui-angular.metadata.json +1 -1
- package/lib/grids/common/events.d.ts +1 -0
- package/lib/grids/grid-base.directive.d.ts +9 -13
- package/lib/grids/hierarchical-grid/hierarchical-grid.component.d.ts +2 -1
- package/lib/grids/hierarchical-grid/row-island.component.d.ts +1 -0
- package/lib/grids/tree-grid/tree-grid.component.d.ts +2 -2
- package/lib/splitter/splitter-pane/splitter-pane.component.d.ts +19 -5
- package/lib/tree/tree.component.d.ts +29 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator, NgModel, F
|
|
|
6
6
|
import * as i2 from '@angular/common';
|
|
7
7
|
import { isPlatformBrowser, CommonModule, DOCUMENT, DatePipe, formatDate, FormatWidth, getLocaleDateFormat, getLocaleCurrencyCode, DecimalPipe, CurrencyPipe, PercentPipe, getLocaleNumberFormat, NumberFormatStyle, getCurrencySymbol } from '@angular/common';
|
|
8
8
|
import { Observable, noop, Subject, fromEvent, interval, animationFrameScheduler, merge, pipe, Subscription, timer } from 'rxjs';
|
|
9
|
-
import { throttleTime, takeUntil, filter, first as first$1, take, throttle, debounce, tap, switchMap, skipLast, map, shareReplay, takeWhile, debounceTime,
|
|
9
|
+
import { throttleTime, takeUntil, filter, first as first$1, take, throttle, debounce, tap, switchMap, skipLast, map, shareReplay, takeWhile, debounceTime, pluck } from 'rxjs/operators';
|
|
10
10
|
import mergeWith from 'lodash.mergewith';
|
|
11
11
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
12
12
|
import { __decorate, __awaiter } from 'tslib';
|
|
@@ -6703,8 +6703,8 @@ class IgxRowAddCrudState extends IgxRowCrudState {
|
|
|
6703
6703
|
if (isAddRow) {
|
|
6704
6704
|
this.endAddRow();
|
|
6705
6705
|
if (commit) {
|
|
6706
|
-
this.grid.rowAddedNotifier.next({ data: args.newValue });
|
|
6707
|
-
this.grid.rowAdded.emit({ data: args.newValue });
|
|
6706
|
+
this.grid.rowAddedNotifier.next({ data: args.newValue, owner: this.grid });
|
|
6707
|
+
this.grid.rowAdded.emit({ data: args.newValue, owner: this.grid });
|
|
6708
6708
|
}
|
|
6709
6709
|
}
|
|
6710
6710
|
return args;
|
|
@@ -6885,7 +6885,7 @@ class GridBaseAPIService {
|
|
|
6885
6885
|
this.destroyMap = new Map();
|
|
6886
6886
|
}
|
|
6887
6887
|
get_column_by_name(name) {
|
|
6888
|
-
return this.grid.
|
|
6888
|
+
return this.grid.columns.find((col) => col.field === name);
|
|
6889
6889
|
}
|
|
6890
6890
|
get_summary_data() {
|
|
6891
6891
|
const grid = this.grid;
|
|
@@ -7145,8 +7145,7 @@ class GridBaseAPIService {
|
|
|
7145
7145
|
return;
|
|
7146
7146
|
}
|
|
7147
7147
|
const record = data[index];
|
|
7148
|
-
|
|
7149
|
-
grid.rowDeletedNotifier.next({ data: data[index] });
|
|
7148
|
+
grid.rowDeletedNotifier.next({ data: data[index], owner: grid });
|
|
7150
7149
|
this.deleteRowFromData(rowId, index);
|
|
7151
7150
|
if (grid.selectionService.isRowSelected(rowId)) {
|
|
7152
7151
|
grid.selectionService.deselectRow(rowId);
|
|
@@ -10627,8 +10626,7 @@ class IgxColumnComponent {
|
|
|
10627
10626
|
*/
|
|
10628
10627
|
move(index) {
|
|
10629
10628
|
let target;
|
|
10630
|
-
|
|
10631
|
-
let columns = grid.columnList.filter(c => c.visibleIndex > -1);
|
|
10629
|
+
let columns = this.grid.columns.filter(c => c.visibleIndex > -1);
|
|
10632
10630
|
// grid last visible index
|
|
10633
10631
|
const li = columns.map(c => c.visibleIndex).reduce((a, b) => Math.max(a, b));
|
|
10634
10632
|
const parent = this.parent;
|
|
@@ -10646,7 +10644,8 @@ class IgxColumnComponent {
|
|
|
10646
10644
|
/* eslint-enable max-len */
|
|
10647
10645
|
if (isPreceding) {
|
|
10648
10646
|
columns = columns.filter(c => c.visibleIndex > this.visibleIndex);
|
|
10649
|
-
target = columns.find(c => c.level === this.level &&
|
|
10647
|
+
target = columns.find(c => c.level === this.level &&
|
|
10648
|
+
c.visibleIndex + c.calcChildren() - this.calcChildren() === index);
|
|
10650
10649
|
}
|
|
10651
10650
|
else {
|
|
10652
10651
|
columns = columns.filter(c => c.visibleIndex < this.visibleIndex);
|
|
@@ -10656,7 +10655,7 @@ class IgxColumnComponent {
|
|
|
10656
10655
|
return;
|
|
10657
10656
|
}
|
|
10658
10657
|
const pos = isPreceding ? DropPosition.AfterDropTarget : DropPosition.BeforeDropTarget;
|
|
10659
|
-
grid.moveColumn(this, target, pos);
|
|
10658
|
+
this.grid.moveColumn(this, target, pos);
|
|
10660
10659
|
}
|
|
10661
10660
|
/**
|
|
10662
10661
|
* No children for the column, so will returns 1 or 0, if the column is hidden.
|
|
@@ -11570,7 +11569,7 @@ class IgxBaseExporter {
|
|
|
11570
11569
|
throw Error('No options provided!');
|
|
11571
11570
|
}
|
|
11572
11571
|
this.options = options;
|
|
11573
|
-
let columns = grid.
|
|
11572
|
+
let columns = grid.columns;
|
|
11574
11573
|
if (this.options.ignoreMultiColumnHeaders) {
|
|
11575
11574
|
columns = columns.filter(col => col.children === undefined);
|
|
11576
11575
|
}
|
|
@@ -12202,7 +12201,7 @@ class IgxBaseExporter {
|
|
|
12202
12201
|
columnList = this.getAutoGeneratedColumns(islandData);
|
|
12203
12202
|
}
|
|
12204
12203
|
else {
|
|
12205
|
-
const islandColumnList = island.
|
|
12204
|
+
const islandColumnList = island.columns;
|
|
12206
12205
|
columnList = this.getColumns(islandColumnList);
|
|
12207
12206
|
}
|
|
12208
12207
|
this._ownersMap.set(island, columnList);
|
|
@@ -37287,7 +37286,7 @@ class IgxSimpleComboComponent extends IgxComboBaseDirective {
|
|
|
37287
37286
|
}
|
|
37288
37287
|
/** @hidden @internal */
|
|
37289
37288
|
onBlur() {
|
|
37290
|
-
if (this.collapsed) {
|
|
37289
|
+
if (this.collapsed && !this.selectedItem) {
|
|
37291
37290
|
this.clearOnBlur();
|
|
37292
37291
|
}
|
|
37293
37292
|
super.onBlur();
|
|
@@ -44525,7 +44524,7 @@ class IgxGridSummaryService {
|
|
|
44525
44524
|
this.removeSummaries(rowID);
|
|
44526
44525
|
}
|
|
44527
44526
|
if (args.rowID !== undefined && args.rowID !== null) {
|
|
44528
|
-
let columnName = args.cellID ? this.grid.
|
|
44527
|
+
let columnName = args.cellID ? this.grid.columns.find(col => col.index === args.cellID.columnID).field : undefined;
|
|
44529
44528
|
if (columnName && this.grid.rowEditable) {
|
|
44530
44529
|
return;
|
|
44531
44530
|
}
|
|
@@ -44582,7 +44581,7 @@ class IgxGridSummaryService {
|
|
|
44582
44581
|
return this.summaryHeight = 0;
|
|
44583
44582
|
}
|
|
44584
44583
|
let maxSummaryLength = 0;
|
|
44585
|
-
this.grid.
|
|
44584
|
+
this.grid.columns.filter((col) => col.hasSummary && !col.hidden).forEach((column) => {
|
|
44586
44585
|
const getCurrentSummaryColumn = column.summaries.operate([], [], column.field).length;
|
|
44587
44586
|
if (getCurrentSummaryColumn) {
|
|
44588
44587
|
if (maxSummaryLength < getCurrentSummaryColumn) {
|
|
@@ -44603,7 +44602,7 @@ class IgxGridSummaryService {
|
|
|
44603
44602
|
if (!this.hasSummarizedColumns || !data) {
|
|
44604
44603
|
return rowSummaries;
|
|
44605
44604
|
}
|
|
44606
|
-
this.grid.
|
|
44605
|
+
this.grid.columns.filter(col => col.hasSummary).forEach((column) => {
|
|
44607
44606
|
if (!rowSummaries.get(column.field)) {
|
|
44608
44607
|
const summaryResult = column.summaries.operate(data.map(r => resolveNestedPath(r, column.field)), data, column.field, this.grid.locale, column.pipeArgs);
|
|
44609
44608
|
rowSummaries.set(column.field, summaryResult);
|
|
@@ -44637,7 +44636,7 @@ class IgxGridSummaryService {
|
|
|
44637
44636
|
this.groupingExpressions = groupingArgs.expressions.map(record => record.fieldName);
|
|
44638
44637
|
}
|
|
44639
44638
|
get hasSummarizedColumns() {
|
|
44640
|
-
const summarizedColumns = this.grid.
|
|
44639
|
+
const summarizedColumns = this.grid.columns.filter(col => col.hasSummary && !col.hidden);
|
|
44641
44640
|
return summarizedColumns.length > 0;
|
|
44642
44641
|
}
|
|
44643
44642
|
deleteSummaryCache(id, columnName) {
|
|
@@ -51028,8 +51027,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
51028
51027
|
get maxLevelHeaderDepth() {
|
|
51029
51028
|
if (this._maxLevelHeaderDepth === null) {
|
|
51030
51029
|
this._maxLevelHeaderDepth = this.hasColumnLayouts ?
|
|
51031
|
-
this.
|
|
51032
|
-
this.
|
|
51030
|
+
this._columns.reduce((acc, col) => Math.max(acc, col.rowStart), 0) :
|
|
51031
|
+
this._columns.reduce((acc, col) => Math.max(acc, col.level), 0);
|
|
51033
51032
|
}
|
|
51034
51033
|
return this._maxLevelHeaderDepth;
|
|
51035
51034
|
}
|
|
@@ -51042,7 +51041,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
51042
51041
|
* ``
|
|
51043
51042
|
*/
|
|
51044
51043
|
get hiddenColumnsCount() {
|
|
51045
|
-
return this.
|
|
51044
|
+
return this._columns.filter((col) => col.columnGroup === false && col.hidden === true).length;
|
|
51046
51045
|
}
|
|
51047
51046
|
/**
|
|
51048
51047
|
* Gets the number of pinned columns.
|
|
@@ -51697,8 +51696,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
51697
51696
|
this.notifyChanges(true);
|
|
51698
51697
|
this.cdr.detectChanges();
|
|
51699
51698
|
});
|
|
51700
|
-
this.verticalScrollContainer.contentSizeChange.pipe(filter(() => !this._init), destructor).subscribe(() => {
|
|
51701
|
-
this.notifyChanges();
|
|
51699
|
+
this.verticalScrollContainer.contentSizeChange.pipe(filter(() => !this._init), throttleTime(30), destructor).subscribe(() => {
|
|
51700
|
+
this.notifyChanges(true);
|
|
51702
51701
|
});
|
|
51703
51702
|
this.onDensityChanged.pipe(destructor).subscribe(() => {
|
|
51704
51703
|
this.crudService.endEdit(false);
|
|
@@ -51724,13 +51723,13 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
51724
51723
|
* @internal
|
|
51725
51724
|
*/
|
|
51726
51725
|
resetColumnsCaches() {
|
|
51727
|
-
this.
|
|
51726
|
+
this._columns.forEach(column => column.resetCaches());
|
|
51728
51727
|
}
|
|
51729
51728
|
/**
|
|
51730
51729
|
* @hidden @internal
|
|
51731
51730
|
*/
|
|
51732
51731
|
generateRowID() {
|
|
51733
|
-
const primaryColumn = this.
|
|
51732
|
+
const primaryColumn = this._columns.find(col => col.field === this.primaryKey);
|
|
51734
51733
|
const idType = this.data.length ?
|
|
51735
51734
|
this.resolveDataTypes(this.data[0][this.primaryKey]) : primaryColumn ? primaryColumn.dataType : 'string';
|
|
51736
51735
|
return idType === 'string' ? v4() : FAKE_ROW_ID--;
|
|
@@ -51797,7 +51796,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
51797
51796
|
this.resetColumnCollections();
|
|
51798
51797
|
this.resetCachedWidths();
|
|
51799
51798
|
this.hasVisibleColumns = undefined;
|
|
51800
|
-
this._columnGroups = this.
|
|
51799
|
+
this._columnGroups = this._columns.some(col => col.columnGroup);
|
|
51801
51800
|
}
|
|
51802
51801
|
/**
|
|
51803
51802
|
* @hidden
|
|
@@ -52028,7 +52027,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52028
52027
|
* ```
|
|
52029
52028
|
*/
|
|
52030
52029
|
toggleColumnVisibility(args) {
|
|
52031
|
-
const col = args.column ? this.
|
|
52030
|
+
const col = args.column ? this._columns.find((c) => c === args.column) : undefined;
|
|
52032
52031
|
if (!col) {
|
|
52033
52032
|
return;
|
|
52034
52033
|
}
|
|
@@ -52265,13 +52264,6 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52265
52264
|
get summariesMargin() {
|
|
52266
52265
|
return this.featureColumnsWidth();
|
|
52267
52266
|
}
|
|
52268
|
-
/**
|
|
52269
|
-
* @hidden
|
|
52270
|
-
* @internal
|
|
52271
|
-
*/
|
|
52272
|
-
get columns() {
|
|
52273
|
-
return this._columns;
|
|
52274
|
-
}
|
|
52275
52267
|
/**
|
|
52276
52268
|
* Gets an array of `IgxColumnComponent`s.
|
|
52277
52269
|
*
|
|
@@ -52280,8 +52272,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52280
52272
|
* const colums = this.grid.columnsCollection.
|
|
52281
52273
|
* ```
|
|
52282
52274
|
*/
|
|
52283
|
-
get
|
|
52284
|
-
return this.
|
|
52275
|
+
get columns() {
|
|
52276
|
+
return this._columns || [];
|
|
52285
52277
|
}
|
|
52286
52278
|
/**
|
|
52287
52279
|
* Gets an array of the pinned `IgxColumnComponent`s.
|
|
@@ -52348,7 +52340,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52348
52340
|
* @param name
|
|
52349
52341
|
*/
|
|
52350
52342
|
getColumnByName(name) {
|
|
52351
|
-
return this.
|
|
52343
|
+
return this._columns.find((col) => col.field === name);
|
|
52352
52344
|
}
|
|
52353
52345
|
getColumnByVisibleIndex(index) {
|
|
52354
52346
|
return this.visibleColumns.find((col) => !col.columnGroup && !col.columnLayout &&
|
|
@@ -52366,7 +52358,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52366
52358
|
if (this._visibleColumns.length) {
|
|
52367
52359
|
return this._visibleColumns;
|
|
52368
52360
|
}
|
|
52369
|
-
this._visibleColumns = this.
|
|
52361
|
+
this._visibleColumns = this._columns.filter(c => !c.hidden);
|
|
52370
52362
|
return this._visibleColumns;
|
|
52371
52363
|
}
|
|
52372
52364
|
/**
|
|
@@ -52497,14 +52489,14 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52497
52489
|
* @internal
|
|
52498
52490
|
*/
|
|
52499
52491
|
get showAddButton() {
|
|
52500
|
-
return this.rowEditable && this.dataView.length === 0 && this.
|
|
52492
|
+
return this.rowEditable && this.dataView.length === 0 && this._columns.length > 0;
|
|
52501
52493
|
}
|
|
52502
52494
|
/**
|
|
52503
52495
|
* @hidden
|
|
52504
52496
|
* @internal
|
|
52505
52497
|
*/
|
|
52506
52498
|
get showDragIcons() {
|
|
52507
|
-
return this.rowDraggable && this.
|
|
52499
|
+
return this.rowDraggable && this._columns.length > this.hiddenColumnsCount;
|
|
52508
52500
|
}
|
|
52509
52501
|
/**
|
|
52510
52502
|
* Places a column before or after the specified target column.
|
|
@@ -52541,12 +52533,12 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52541
52533
|
const index = pos === DropPosition.AfterDropTarget ? unpinnedIndex + 1 : unpinnedIndex;
|
|
52542
52534
|
columnPinStateChanged = column.unpin(index);
|
|
52543
52535
|
}
|
|
52544
|
-
if (target.pinned && column.pinned && !columnPinStateChanged) {
|
|
52545
|
-
|
|
52546
|
-
}
|
|
52547
|
-
if (!target.pinned && !column.pinned && !columnPinStateChanged) {
|
|
52548
|
-
|
|
52549
|
-
}
|
|
52536
|
+
// if (target.pinned && column.pinned && !columnPinStateChanged) {
|
|
52537
|
+
// this._reorderColumns(column, target, pos, this._pinnedColumns);
|
|
52538
|
+
// }
|
|
52539
|
+
// if (!target.pinned && !column.pinned && !columnPinStateChanged) {
|
|
52540
|
+
// this._reorderColumns(column, target, pos, this._unpinnedColumns);
|
|
52541
|
+
// }
|
|
52550
52542
|
this._moveColumns(column, target, pos);
|
|
52551
52543
|
this._columnsReordered(column);
|
|
52552
52544
|
}
|
|
@@ -52609,7 +52601,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52609
52601
|
// commit pending states prior to adding a row
|
|
52610
52602
|
this.crudService.endEdit(true);
|
|
52611
52603
|
this.gridAPI.addRowToData(data);
|
|
52612
|
-
this.rowAddedNotifier.next({ data });
|
|
52604
|
+
this.rowAddedNotifier.next({ data, owner: this });
|
|
52613
52605
|
this.pipeTrigger++;
|
|
52614
52606
|
this.notifyChanges();
|
|
52615
52607
|
}
|
|
@@ -52636,7 +52628,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52636
52628
|
rowID: rowId,
|
|
52637
52629
|
cancel: false,
|
|
52638
52630
|
rowData: this.getRowData(rowId),
|
|
52639
|
-
oldValue: null
|
|
52631
|
+
oldValue: null,
|
|
52632
|
+
owner: this
|
|
52640
52633
|
};
|
|
52641
52634
|
this.rowDelete.emit(args);
|
|
52642
52635
|
if (args.cancel) {
|
|
@@ -52644,8 +52637,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52644
52637
|
}
|
|
52645
52638
|
const record = this.gridAPI.deleteRowById(rowId);
|
|
52646
52639
|
if (record !== null && record !== undefined) {
|
|
52647
|
-
|
|
52648
|
-
this.rowDeleted.emit({ data: record });
|
|
52640
|
+
this.rowDeleted.emit({ data: record, owner: this });
|
|
52649
52641
|
}
|
|
52650
52642
|
return record;
|
|
52651
52643
|
}
|
|
@@ -52664,7 +52656,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
52664
52656
|
*/
|
|
52665
52657
|
updateCell(value, rowSelector, column) {
|
|
52666
52658
|
if (this.isDefined(this.primaryKey)) {
|
|
52667
|
-
const col = this.
|
|
52659
|
+
const col = this._columns.find(c => c.field === column);
|
|
52668
52660
|
if (col) {
|
|
52669
52661
|
// Simplify
|
|
52670
52662
|
const rowData = this.gridAPI.getRowData(rowSelector);
|
|
@@ -53116,7 +53108,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53116
53108
|
* ```
|
|
53117
53109
|
*/
|
|
53118
53110
|
get hasSortableColumns() {
|
|
53119
|
-
return this.
|
|
53111
|
+
return this._columns.some((col) => col.sortable);
|
|
53120
53112
|
}
|
|
53121
53113
|
/**
|
|
53122
53114
|
* Returns if the `IgxGridComponent` has editable columns.
|
|
@@ -53127,7 +53119,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53127
53119
|
* ```
|
|
53128
53120
|
*/
|
|
53129
53121
|
get hasEditableColumns() {
|
|
53130
|
-
return this.
|
|
53122
|
+
return this._columns.some((col) => col.editable);
|
|
53131
53123
|
}
|
|
53132
53124
|
/**
|
|
53133
53125
|
* Returns if the `IgxGridComponent` has filterable columns.
|
|
@@ -53138,7 +53130,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53138
53130
|
* ```
|
|
53139
53131
|
*/
|
|
53140
53132
|
get hasFilterableColumns() {
|
|
53141
|
-
return this.
|
|
53133
|
+
return this._columns.some((col) => col.filterable);
|
|
53142
53134
|
}
|
|
53143
53135
|
/**
|
|
53144
53136
|
* Returns if the `IgxGridComponent` has summarized columns.
|
|
@@ -53149,7 +53141,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53149
53141
|
* ```
|
|
53150
53142
|
*/
|
|
53151
53143
|
get hasSummarizedColumns() {
|
|
53152
|
-
const summarizedColumns = this.
|
|
53144
|
+
const summarizedColumns = this._columns.filter(col => col.hasSummary && !col.hidden);
|
|
53153
53145
|
return summarizedColumns.length > 0;
|
|
53154
53146
|
}
|
|
53155
53147
|
/**
|
|
@@ -53163,7 +53155,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53163
53155
|
*/
|
|
53164
53156
|
get hasVisibleColumns() {
|
|
53165
53157
|
if (this._hasVisibleColumns === undefined) {
|
|
53166
|
-
return this.
|
|
53158
|
+
return this._columns ? this._columns.some(c => !c.hidden) : false;
|
|
53167
53159
|
}
|
|
53168
53160
|
return this._hasVisibleColumns;
|
|
53169
53161
|
}
|
|
@@ -53179,7 +53171,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53179
53171
|
* ```
|
|
53180
53172
|
*/
|
|
53181
53173
|
get hasMovableColumns() {
|
|
53182
|
-
return this.
|
|
53174
|
+
return this.columns && this.columns.some((col) => col.movable);
|
|
53183
53175
|
}
|
|
53184
53176
|
/**
|
|
53185
53177
|
* Returns if the `IgxGridComponent` has column groups.
|
|
@@ -53201,7 +53193,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53201
53193
|
* ```
|
|
53202
53194
|
*/
|
|
53203
53195
|
get hasColumnLayouts() {
|
|
53204
|
-
return !!this.
|
|
53196
|
+
return !!this._columns.some(col => col.columnLayout);
|
|
53205
53197
|
}
|
|
53206
53198
|
/**
|
|
53207
53199
|
* @hidden @internal
|
|
@@ -53656,7 +53648,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53656
53648
|
* ```
|
|
53657
53649
|
*/
|
|
53658
53650
|
selectAllColumns() {
|
|
53659
|
-
this.selectColumns(this.
|
|
53651
|
+
this.selectColumns(this._columns.filter(c => !c.columnGroup));
|
|
53660
53652
|
}
|
|
53661
53653
|
/**
|
|
53662
53654
|
*
|
|
@@ -53774,7 +53766,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53774
53766
|
var _a;
|
|
53775
53767
|
const totalItems = (_a = this.totalItemCount) !== null && _a !== void 0 ? _a : this.dataView.length - 1;
|
|
53776
53768
|
if (rowIndex < 0 || rowIndex > totalItems || (visibleColIndex !== -1
|
|
53777
|
-
&& this.
|
|
53769
|
+
&& this._columns.map(col => col.visibleIndex).indexOf(visibleColIndex) === -1)) {
|
|
53778
53770
|
return;
|
|
53779
53771
|
}
|
|
53780
53772
|
if (this.dataView.slice(rowIndex, rowIndex + 1).find(rec => rec.expression || rec.childGridsData)) {
|
|
@@ -53820,7 +53812,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53820
53812
|
* ```
|
|
53821
53813
|
*/
|
|
53822
53814
|
getNextCell(currRowIndex, curVisibleColIndex, callback = null) {
|
|
53823
|
-
const columns = this.
|
|
53815
|
+
const columns = this._columns.filter(col => !col.columnGroup && col.visibleIndex >= 0);
|
|
53824
53816
|
const dataViewIndex = this._getDataViewIndex(currRowIndex);
|
|
53825
53817
|
if (!this.isValidPosition(dataViewIndex, curVisibleColIndex)) {
|
|
53826
53818
|
return { rowIndex: currRowIndex, visibleColumnIndex: curVisibleColIndex };
|
|
@@ -53855,7 +53847,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
53855
53847
|
* ```
|
|
53856
53848
|
*/
|
|
53857
53849
|
getPreviousCell(currRowIndex, curVisibleColIndex, callback = null) {
|
|
53858
|
-
const columns = this.
|
|
53850
|
+
const columns = this._columns.filter(col => !col.columnGroup && col.visibleIndex >= 0);
|
|
53859
53851
|
const dataViewIndex = this._getDataViewIndex(currRowIndex);
|
|
53860
53852
|
if (!this.isValidPosition(dataViewIndex, curVisibleColIndex)) {
|
|
53861
53853
|
return { rowIndex: currRowIndex, visibleColumnIndex: curVisibleColIndex };
|
|
@@ -54121,20 +54113,6 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54121
54113
|
console.warn('The row with the specified PK or index is outside of the current data view.');
|
|
54122
54114
|
}
|
|
54123
54115
|
}
|
|
54124
|
-
/**
|
|
54125
|
-
* Update internal column's collection.
|
|
54126
|
-
*
|
|
54127
|
-
* @hidden
|
|
54128
|
-
*/
|
|
54129
|
-
updateColumns(newColumns) {
|
|
54130
|
-
// update internal collections to retain order.
|
|
54131
|
-
this._pinnedColumns = newColumns
|
|
54132
|
-
.filter((c) => c.pinned).sort((a, b) => this._pinnedColumns.indexOf(a) - this._pinnedColumns.indexOf(b));
|
|
54133
|
-
this._unpinnedColumns = newColumns.filter((c) => !c.pinned);
|
|
54134
|
-
this.columnList.reset(newColumns);
|
|
54135
|
-
this.columnList.notifyOnChanges();
|
|
54136
|
-
this._columns = this.columnList.toArray();
|
|
54137
|
-
}
|
|
54138
54116
|
/**
|
|
54139
54117
|
* Enters add mode by spawning the UI at the specified index.
|
|
54140
54118
|
*
|
|
@@ -54152,6 +54130,19 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54152
54130
|
}
|
|
54153
54131
|
return this.beginAddRowById(this.gridAPI.get_rec_id_by_index(index - 1, this.dataView));
|
|
54154
54132
|
}
|
|
54133
|
+
/**
|
|
54134
|
+
* Update internal column's collection.
|
|
54135
|
+
*
|
|
54136
|
+
* @hidden
|
|
54137
|
+
*/
|
|
54138
|
+
updateColumns(newColumns) {
|
|
54139
|
+
// update internal collections to retain order.
|
|
54140
|
+
this._pinnedColumns = newColumns
|
|
54141
|
+
.filter((c) => c.pinned);
|
|
54142
|
+
this._unpinnedColumns = newColumns.filter((c) => !c.pinned);
|
|
54143
|
+
this._columns = newColumns;
|
|
54144
|
+
this.resetCaches();
|
|
54145
|
+
}
|
|
54155
54146
|
beginAddRowForIndex(index, asChild = false) {
|
|
54156
54147
|
const row = index == null ?
|
|
54157
54148
|
null : this.rowList.find(r => r.index === index);
|
|
@@ -54291,7 +54282,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54291
54282
|
if (!this.columnWidthSetByUser) {
|
|
54292
54283
|
this._columnWidth = this.width !== null ? this.getPossibleColumnWidth() : MINIMUM_COLUMN_WIDTH + 'px';
|
|
54293
54284
|
}
|
|
54294
|
-
this.
|
|
54285
|
+
this._columns.forEach((column) => {
|
|
54295
54286
|
if (this.hasColumnLayouts && parseInt(this._columnWidth, 10)) {
|
|
54296
54287
|
const columnWidthCombined = parseInt(this._columnWidth, 10) * (column.colEnd ? column.colEnd - column.colStart : 1);
|
|
54297
54288
|
column.defaultWidth = columnWidthCombined + 'px';
|
|
@@ -54343,7 +54334,8 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54343
54334
|
* @hidden
|
|
54344
54335
|
*/
|
|
54345
54336
|
_moveColumns(from, to, pos) {
|
|
54346
|
-
const
|
|
54337
|
+
const orderedList = this._pinnedColumns.concat(this._unpinnedColumns);
|
|
54338
|
+
const list = orderedList;
|
|
54347
54339
|
this._reorderColumns(from, to, pos, list);
|
|
54348
54340
|
const newList = this._resetColumnList(list);
|
|
54349
54341
|
this.updateColumns(newList);
|
|
@@ -54353,7 +54345,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54353
54345
|
*/
|
|
54354
54346
|
_resetColumnList(list) {
|
|
54355
54347
|
if (!list) {
|
|
54356
|
-
list = this.
|
|
54348
|
+
list = this._columns;
|
|
54357
54349
|
}
|
|
54358
54350
|
let newList = [];
|
|
54359
54351
|
list.filter(c => c.level === 0).forEach(p => {
|
|
@@ -54398,7 +54390,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54398
54390
|
if (this.autoGenerate) {
|
|
54399
54391
|
this.autogenerateColumns();
|
|
54400
54392
|
}
|
|
54401
|
-
|
|
54393
|
+
else {
|
|
54394
|
+
this._columns = this.getColumnList();
|
|
54395
|
+
}
|
|
54396
|
+
this.initColumns(this._columns, (col) => this.columnInit.emit(col));
|
|
54402
54397
|
this.columnListDiffer.diff(this.columnList);
|
|
54403
54398
|
this.columnList.changes
|
|
54404
54399
|
.pipe(takeUntil(this.destroy$))
|
|
@@ -54406,6 +54401,9 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54406
54401
|
this.onColumnsChanged(change);
|
|
54407
54402
|
});
|
|
54408
54403
|
}
|
|
54404
|
+
getColumnList() {
|
|
54405
|
+
return this.columnList.toArray();
|
|
54406
|
+
}
|
|
54409
54407
|
/**
|
|
54410
54408
|
* @hidden
|
|
54411
54409
|
*/
|
|
@@ -54447,10 +54445,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54447
54445
|
*/
|
|
54448
54446
|
onColumnsChanged(change) {
|
|
54449
54447
|
const diff = this.columnListDiffer.diff(change);
|
|
54450
|
-
if (this.autoGenerate && this.
|
|
54448
|
+
if (this.autoGenerate && this._columns.length === 0 && this._autoGeneratedCols.length > 0) {
|
|
54451
54449
|
// In Ivy if there are nested conditional templates the content children are re-evaluated
|
|
54452
54450
|
// hence autogenerated columns are cleared and need to be reset.
|
|
54453
|
-
this.
|
|
54451
|
+
this.updateColumns(this._autoGeneratedCols);
|
|
54454
54452
|
return;
|
|
54455
54453
|
}
|
|
54456
54454
|
if (diff) {
|
|
@@ -54465,7 +54463,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54465
54463
|
this._unpinnedColumns.push(record.item);
|
|
54466
54464
|
}
|
|
54467
54465
|
});
|
|
54468
|
-
this.initColumns(this.columnList, (col) => this.columnInit.emit(col));
|
|
54466
|
+
this.initColumns(this.columnList.toArray(), (col) => this.columnInit.emit(col));
|
|
54469
54467
|
diff.forEachRemovedItem((record) => {
|
|
54470
54468
|
const isColumnGroup = record.item instanceof IgxColumnGroupComponent;
|
|
54471
54469
|
if (!isColumnGroup) {
|
|
@@ -54676,12 +54674,14 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54676
54674
|
}
|
|
54677
54675
|
_shouldAutoSize(renderedHeight) {
|
|
54678
54676
|
this.tbody.nativeElement.style.display = 'none';
|
|
54679
|
-
|
|
54677
|
+
let res = !this.nativeElement.parentElement ||
|
|
54680
54678
|
this.nativeElement.parentElement.clientHeight === 0 ||
|
|
54681
|
-
this.nativeElement.parentElement.clientHeight === renderedHeight
|
|
54679
|
+
this.nativeElement.parentElement.clientHeight === renderedHeight;
|
|
54680
|
+
if (!this.platform.isChromium && !this.platform.isFirefox) {
|
|
54682
54681
|
// If grid causes the parent container to extend (for example when container is flex)
|
|
54683
54682
|
// we should always auto-size since the actual size of the container will continuously change as the grid renders elements.
|
|
54684
|
-
this.checkContainerSizeChange();
|
|
54683
|
+
res = this.checkContainerSizeChange();
|
|
54684
|
+
}
|
|
54685
54685
|
this.tbody.nativeElement.style.display = '';
|
|
54686
54686
|
return res;
|
|
54687
54687
|
}
|
|
@@ -54765,7 +54765,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54765
54765
|
columns.push(ref.instance);
|
|
54766
54766
|
});
|
|
54767
54767
|
this._autoGeneratedCols = columns;
|
|
54768
|
-
this.
|
|
54768
|
+
this.updateColumns(columns);
|
|
54769
54769
|
if (data && data.length > 0) {
|
|
54770
54770
|
this.shouldGenerate = false;
|
|
54771
54771
|
}
|
|
@@ -54791,10 +54791,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54791
54791
|
* @hidden
|
|
54792
54792
|
*/
|
|
54793
54793
|
initColumns(collection, cb = null) {
|
|
54794
|
-
this._columnGroups =
|
|
54794
|
+
this._columnGroups = collection.some(col => col.columnGroup);
|
|
54795
54795
|
if (this.hasColumnLayouts) {
|
|
54796
54796
|
// Set overall row layout size
|
|
54797
|
-
|
|
54797
|
+
collection.forEach((col) => {
|
|
54798
54798
|
if (col.columnLayout) {
|
|
54799
54799
|
const layoutSize = col.children ?
|
|
54800
54800
|
col.children.reduce((acc, val) => Math.max(val.rowStart + val.gridRowSpan - 1, acc), 1) :
|
|
@@ -54806,18 +54806,17 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54806
54806
|
if (this.hasColumnLayouts && this.hasColumnGroups) {
|
|
54807
54807
|
// invalid configuration - multi-row and column groups
|
|
54808
54808
|
// remove column groups
|
|
54809
|
-
const columnLayoutColumns =
|
|
54810
|
-
|
|
54809
|
+
const columnLayoutColumns = collection.filter((col) => col.columnLayout || col.columnLayoutChild);
|
|
54810
|
+
collection = columnLayoutColumns;
|
|
54811
54811
|
}
|
|
54812
54812
|
this._maxLevelHeaderDepth = null;
|
|
54813
|
-
this._columns = this.columnList.toArray();
|
|
54814
54813
|
collection.forEach((column) => {
|
|
54815
54814
|
column.defaultWidth = this.columnWidthSetByUser ? this._columnWidth : column.defaultWidth ? column.defaultWidth : '';
|
|
54816
54815
|
if (cb) {
|
|
54817
54816
|
cb(column);
|
|
54818
54817
|
}
|
|
54819
54818
|
});
|
|
54820
|
-
this.
|
|
54819
|
+
this.updateColumns(collection);
|
|
54821
54820
|
if (this.hasColumnLayouts) {
|
|
54822
54821
|
collection.forEach((column) => {
|
|
54823
54822
|
column.populateVisibleIndexes();
|
|
@@ -54828,13 +54827,11 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
54828
54827
|
* @hidden
|
|
54829
54828
|
*/
|
|
54830
54829
|
reinitPinStates() {
|
|
54831
|
-
this._pinnedColumns = this.
|
|
54832
|
-
.filter((c) => c.pinned)
|
|
54833
|
-
|
|
54834
|
-
|
|
54835
|
-
|
|
54836
|
-
.sort((a, b) => this._unpinnedColumns.findIndex(x => x.field === a.field) -
|
|
54837
|
-
this._unpinnedColumns.findIndex(x => x.field === b.field));
|
|
54830
|
+
this._pinnedColumns = this._columns
|
|
54831
|
+
.filter((c) => c.pinned).sort((a, b) => this._pinnedColumns.indexOf(a) - this._pinnedColumns.indexOf(b));
|
|
54832
|
+
this._unpinnedColumns = this.hasColumnGroups ? this._columns.filter((c) => !c.pinned) :
|
|
54833
|
+
this._columns.filter((c) => !c.pinned)
|
|
54834
|
+
.sort((a, b) => this._unpinnedColumns.indexOf(a) - this._unpinnedColumns.indexOf(b));
|
|
54838
54835
|
}
|
|
54839
54836
|
extractDataFromSelection(source, formatters = false, headers = false, columnData) {
|
|
54840
54837
|
var _a;
|
|
@@ -55133,7 +55130,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
55133
55130
|
_columnsReordered(column) {
|
|
55134
55131
|
this.notifyChanges();
|
|
55135
55132
|
if (this.hasColumnLayouts) {
|
|
55136
|
-
this.
|
|
55133
|
+
this._columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
|
|
55137
55134
|
}
|
|
55138
55135
|
// after reordering is done reset cached column collections.
|
|
55139
55136
|
this.resetColumnCollections();
|
|
@@ -55296,7 +55293,7 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
55296
55293
|
}
|
|
55297
55294
|
isValidPosition(rowIndex, colIndex) {
|
|
55298
55295
|
const rows = this.summariesRowList.filter(s => s.index !== 0).concat(this.rowList.toArray()).length;
|
|
55299
|
-
const cols = this.
|
|
55296
|
+
const cols = this._columns.filter(col => !col.columnGroup && col.visibleIndex >= 0 && !col.hidden).length;
|
|
55300
55297
|
if (rows < 1 || cols < 1) {
|
|
55301
55298
|
return false;
|
|
55302
55299
|
}
|
|
@@ -55856,7 +55853,7 @@ class BaseRow {
|
|
|
55856
55853
|
*/
|
|
55857
55854
|
get cells() {
|
|
55858
55855
|
const res = [];
|
|
55859
|
-
this.grid.
|
|
55856
|
+
this.grid.columns.forEach(col => {
|
|
55860
55857
|
const cell = new IgxGridCell(this.grid, this.index, col.field);
|
|
55861
55858
|
res.push(cell);
|
|
55862
55859
|
});
|
|
@@ -56167,7 +56164,7 @@ class IgxHierarchicalGridRow extends BaseRow {
|
|
|
56167
56164
|
*/
|
|
56168
56165
|
get cells() {
|
|
56169
56166
|
const res = [];
|
|
56170
|
-
this.grid.
|
|
56167
|
+
this.grid.columns.forEach(col => {
|
|
56171
56168
|
const cell = new IgxGridCell(this.grid, this.index, col.field);
|
|
56172
56169
|
res.push(cell);
|
|
56173
56170
|
});
|
|
@@ -61603,7 +61600,7 @@ class IgxGridMRLNavigationService extends IgxGridNavigationService {
|
|
|
61603
61600
|
col.visibleIndex > this.activeNode.column && col.colStart > this.activeNode.layout.colStart);
|
|
61604
61601
|
if (!column || (previous && this.activeNode.layout.colStart === 1)) {
|
|
61605
61602
|
const index = previous ? parent.visibleIndex - 1 : parent.visibleIndex + 1;
|
|
61606
|
-
const children = this.grid.
|
|
61603
|
+
const children = this.grid.columns.find(cols => cols.columnLayout && cols.visibleIndex === index).children;
|
|
61607
61604
|
column = previous ? children.toArray().reverse().find(child => child.rowStart <= this.activeNode.layout.rowStart) :
|
|
61608
61605
|
children.find(child => this.rowEnd(child) > this.activeNode.layout.rowStart && child.colStart === 1);
|
|
61609
61606
|
}
|
|
@@ -62039,7 +62036,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62039
62036
|
// setter called before grid is registered in grid API service
|
|
62040
62037
|
this.sortingExpressions.unshift.apply(this.sortingExpressions, this._groupingExpressions);
|
|
62041
62038
|
}
|
|
62042
|
-
if (!this._init && JSON.stringify(oldExpressions) !== JSON.stringify(newExpressions) && this.
|
|
62039
|
+
if (!this._init && JSON.stringify(oldExpressions) !== JSON.stringify(newExpressions) && this._columns) {
|
|
62043
62040
|
const groupedCols = [];
|
|
62044
62041
|
const ungroupedCols = [];
|
|
62045
62042
|
const groupedColsArr = newExpressions.filter((obj) => !oldExpressions.some((obj2) => obj.fieldName === obj2.fieldName));
|
|
@@ -62103,7 +62100,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62103
62100
|
else {
|
|
62104
62101
|
this.groupingDiffer = null;
|
|
62105
62102
|
}
|
|
62106
|
-
if (this.
|
|
62103
|
+
if (this._columns && this.groupingExpressions) {
|
|
62107
62104
|
this._setGroupColsVisibility(value);
|
|
62108
62105
|
}
|
|
62109
62106
|
this._hideGroupedColumns = value;
|
|
@@ -62158,7 +62155,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62158
62155
|
getCellByColumnVisibleIndex(rowIndex, index) {
|
|
62159
62156
|
var _a;
|
|
62160
62157
|
const row = this.getRowByIndex(rowIndex);
|
|
62161
|
-
const column = this.
|
|
62158
|
+
const column = this._columns.find((col) => col.visibleIndex === index);
|
|
62162
62159
|
if (row && row instanceof IgxGridRow && !((_a = row.data) === null || _a === void 0 ? void 0 : _a.detailsData) && column) {
|
|
62163
62160
|
return new IgxGridCell(this, rowIndex, column.field);
|
|
62164
62161
|
}
|
|
@@ -62428,7 +62425,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62428
62425
|
* ```
|
|
62429
62426
|
*/
|
|
62430
62427
|
get hasGroupableColumns() {
|
|
62431
|
-
return this.
|
|
62428
|
+
return this._columns.some((col) => col.groupable && !col.columnGroup);
|
|
62432
62429
|
}
|
|
62433
62430
|
/**
|
|
62434
62431
|
* Returns whether the `IgxGridComponent` has group area.
|
|
@@ -62553,7 +62550,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62553
62550
|
this._groupRowTemplate = this.groupTemplate.template;
|
|
62554
62551
|
}
|
|
62555
62552
|
this.detailTemplate.changes.subscribe(() => this.trackChanges = (_, rec) => ((rec === null || rec === void 0 ? void 0 : rec.detailsData) !== undefined ? rec.detailsData : rec));
|
|
62556
|
-
if (this.hideGroupedColumns && this.
|
|
62553
|
+
if (this.hideGroupedColumns && this._columns && this.groupingExpressions) {
|
|
62557
62554
|
this._setGroupColsVisibility(this.hideGroupedColumns);
|
|
62558
62555
|
}
|
|
62559
62556
|
this._setupNavigationService();
|
|
@@ -62601,9 +62598,9 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62601
62598
|
* @hidden @internal
|
|
62602
62599
|
*/
|
|
62603
62600
|
ngDoCheck() {
|
|
62604
|
-
if (this.groupingDiffer && this.
|
|
62601
|
+
if (this.groupingDiffer && this._columns && !this.hasColumnLayouts) {
|
|
62605
62602
|
const changes = this.groupingDiffer.diff(this.groupingExpressions);
|
|
62606
|
-
if (changes && this.
|
|
62603
|
+
if (changes && this._columns.length > 0) {
|
|
62607
62604
|
changes.forEachAddedItem((rec) => {
|
|
62608
62605
|
const col = this.getColumnByName(rec.item.fieldName);
|
|
62609
62606
|
if (col) {
|
|
@@ -62737,7 +62734,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62737
62734
|
getCellByColumn(rowIndex, columnField) {
|
|
62738
62735
|
var _a;
|
|
62739
62736
|
const row = this.getRowByIndex(rowIndex);
|
|
62740
|
-
const column = this.
|
|
62737
|
+
const column = this._columns.find((col) => col.field === columnField);
|
|
62741
62738
|
if (row && row instanceof IgxGridRow && !((_a = row.data) === null || _a === void 0 ? void 0 : _a.detailsData) && column) {
|
|
62742
62739
|
if (this.pagingMode === 1 && this.gridAPI.grid.page !== 0) {
|
|
62743
62740
|
row.index = rowIndex + this.paginator.perPage * this.paginator.page;
|
|
@@ -62759,7 +62756,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62759
62756
|
*/
|
|
62760
62757
|
getCellByKey(rowSelector, columnField) {
|
|
62761
62758
|
const row = this.getRowByKey(rowSelector);
|
|
62762
|
-
const column = this.
|
|
62759
|
+
const column = this._columns.find((col) => col.field === columnField);
|
|
62763
62760
|
if (row && column) {
|
|
62764
62761
|
return new IgxGridCell(this, row.index, columnField);
|
|
62765
62762
|
}
|
|
@@ -62860,7 +62857,7 @@ class IgxGridComponent extends IgxGridBaseDirective {
|
|
|
62860
62857
|
return !expression.fieldName;
|
|
62861
62858
|
}
|
|
62862
62859
|
_setGroupColsVisibility(value) {
|
|
62863
|
-
if (this.
|
|
62860
|
+
if (this._columns.length > 0 && !this.hasColumnLayouts) {
|
|
62864
62861
|
this.groupingExpressions.forEach((expr) => {
|
|
62865
62862
|
const col = this.getColumnByName(expr.fieldName);
|
|
62866
62863
|
col.hidden = value;
|
|
@@ -63051,6 +63048,9 @@ class IgxGridStateDirective {
|
|
|
63051
63048
|
}
|
|
63052
63049
|
});
|
|
63053
63050
|
context.grid.updateColumns(newColumns);
|
|
63051
|
+
newColumns.forEach(col => {
|
|
63052
|
+
context.grid.columnInit.emit(col);
|
|
63053
|
+
});
|
|
63054
63054
|
}
|
|
63055
63055
|
},
|
|
63056
63056
|
groupBy: {
|
|
@@ -63292,13 +63292,11 @@ class IgxGridStateDirective {
|
|
|
63292
63292
|
// TODO Notify the grid that columnList.changes is triggered by the state directive
|
|
63293
63293
|
// instead of piping it like below
|
|
63294
63294
|
const columns = 'columns';
|
|
63295
|
-
this.grid.columnList.changes.pipe(delay(0), take(1)).subscribe(() => {
|
|
63296
|
-
this.featureKeys = this.featureKeys.filter(f => f !== columns);
|
|
63297
|
-
this.restoreFeatures(state);
|
|
63298
|
-
});
|
|
63299
63295
|
this.applyFeatures(features);
|
|
63300
63296
|
if (this.featureKeys.includes(columns) && this.options[columns] && state[columns]) {
|
|
63301
63297
|
this.getFeature(columns).restoreFeatureState(this, state[columns]);
|
|
63298
|
+
this.featureKeys = this.featureKeys.filter(f => f !== columns);
|
|
63299
|
+
this.restoreFeatures(state);
|
|
63302
63300
|
}
|
|
63303
63301
|
else {
|
|
63304
63302
|
this.restoreFeatures(state);
|
|
@@ -63349,8 +63347,8 @@ class IgxGridStateDirective {
|
|
|
63349
63347
|
else {
|
|
63350
63348
|
const expr = item;
|
|
63351
63349
|
let dataType;
|
|
63352
|
-
if (this.currGrid.
|
|
63353
|
-
dataType = this.currGrid.
|
|
63350
|
+
if (this.currGrid.columns.length > 0) {
|
|
63351
|
+
dataType = this.currGrid.columns.find(c => c.field === expr.fieldName).dataType;
|
|
63354
63352
|
}
|
|
63355
63353
|
else if (this.state.columns) {
|
|
63356
63354
|
dataType = this.state.columns.find(c => c.field === expr.fieldName).dataType;
|
|
@@ -63389,6 +63387,9 @@ class IgxGridStateDirective {
|
|
|
63389
63387
|
case GridColumnDataType.Date:
|
|
63390
63388
|
filters = IgxDateFilteringOperand.instance();
|
|
63391
63389
|
break;
|
|
63390
|
+
case GridColumnDataType.DateTime:
|
|
63391
|
+
filters = IgxDateTimeFilteringOperand.instance();
|
|
63392
|
+
break;
|
|
63392
63393
|
case GridColumnDataType.String:
|
|
63393
63394
|
default:
|
|
63394
63395
|
filters = IgxStringFilteringOperand.instance();
|
|
@@ -65414,13 +65415,13 @@ class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {
|
|
|
65414
65415
|
return this._hideGroupedColumns;
|
|
65415
65416
|
}
|
|
65416
65417
|
set hideGroupedColumns(value) {
|
|
65417
|
-
if (this.grid.
|
|
65418
|
+
if (this.grid.columns && this.expressions) {
|
|
65418
65419
|
this.setColumnsVisibility(value);
|
|
65419
65420
|
}
|
|
65420
65421
|
this._hideGroupedColumns = value;
|
|
65421
65422
|
}
|
|
65422
65423
|
ngAfterContentInit() {
|
|
65423
|
-
if (this.grid.
|
|
65424
|
+
if (this.grid.columns && this.expressions) {
|
|
65424
65425
|
this.groupingDiffer = this.differs.find(this.expressions).create();
|
|
65425
65426
|
this.updateColumnsVisibility();
|
|
65426
65427
|
}
|
|
@@ -65499,9 +65500,9 @@ class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {
|
|
|
65499
65500
|
}
|
|
65500
65501
|
}
|
|
65501
65502
|
updateColumnsVisibility() {
|
|
65502
|
-
if (this.groupingDiffer && this.grid.
|
|
65503
|
+
if (this.groupingDiffer && this.grid.columns && !this.grid.hasColumnLayouts) {
|
|
65503
65504
|
const changes = this.groupingDiffer.diff(this.expressions);
|
|
65504
|
-
if (changes && this.grid.
|
|
65505
|
+
if (changes && this.grid.columns.length > 0) {
|
|
65505
65506
|
changes.forEachAddedItem((rec) => {
|
|
65506
65507
|
const col = this.grid.getColumnByName(rec.item.fieldName);
|
|
65507
65508
|
col.hidden = this.hideGroupedColumns;
|
|
@@ -65514,7 +65515,7 @@ class IgxTreeGridGroupByAreaComponent extends IgxGroupByAreaDirective {
|
|
|
65514
65515
|
}
|
|
65515
65516
|
}
|
|
65516
65517
|
setColumnsVisibility(value) {
|
|
65517
|
-
if (this.grid.
|
|
65518
|
+
if (this.grid.columns.length > 0 && !this.grid.hasColumnLayouts) {
|
|
65518
65519
|
this.expressions.forEach((expr) => {
|
|
65519
65520
|
const col = this.grid.getColumnByName(expr.fieldName);
|
|
65520
65521
|
col.hidden = value;
|
|
@@ -65738,7 +65739,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
65738
65739
|
*/
|
|
65739
65740
|
getCellByColumnVisibleIndex(rowIndex, index) {
|
|
65740
65741
|
const row = this.getRowByIndex(rowIndex);
|
|
65741
|
-
const column = this.
|
|
65742
|
+
const column = this.columns.find((col) => col.visibleIndex === index);
|
|
65742
65743
|
if (row && row instanceof IgxTreeGridRow && column) {
|
|
65743
65744
|
return new IgxGridCell(this, rowIndex, column.field);
|
|
65744
65745
|
}
|
|
@@ -65893,7 +65894,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
65893
65894
|
addRow(data, parentRowID) {
|
|
65894
65895
|
this.crudService.endEdit(true);
|
|
65895
65896
|
this.gridAPI.addRowToData(data, parentRowID);
|
|
65896
|
-
this.rowAddedNotifier.next({ data });
|
|
65897
|
+
this.rowAddedNotifier.next({ data, owner: this });
|
|
65897
65898
|
this.pipeTrigger++;
|
|
65898
65899
|
this.notifyChanges();
|
|
65899
65900
|
}
|
|
@@ -66000,7 +66001,22 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
66000
66001
|
// if this is flat self-referencing data, and CascadeOnDelete is set to true
|
|
66001
66002
|
// and if we have transactions we should start pending transaction. This allows
|
|
66002
66003
|
// us in case of delete action to delete all child rows as single undo action
|
|
66003
|
-
|
|
66004
|
+
const args = {
|
|
66005
|
+
rowID: rowId,
|
|
66006
|
+
cancel: false,
|
|
66007
|
+
rowData: this.getRowData(rowId),
|
|
66008
|
+
oldValue: null,
|
|
66009
|
+
owner: this
|
|
66010
|
+
};
|
|
66011
|
+
this.rowDelete.emit(args);
|
|
66012
|
+
if (args.cancel) {
|
|
66013
|
+
return;
|
|
66014
|
+
}
|
|
66015
|
+
const record = this.gridAPI.deleteRowById(rowId);
|
|
66016
|
+
if (record !== null && record !== undefined) {
|
|
66017
|
+
this.rowDeleted.emit({ data: record, owner: this });
|
|
66018
|
+
}
|
|
66019
|
+
return record;
|
|
66004
66020
|
}
|
|
66005
66021
|
/**
|
|
66006
66022
|
* Returns the `IgxTreeGridRow` by index.
|
|
@@ -66075,7 +66091,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
66075
66091
|
*/
|
|
66076
66092
|
getCellByColumn(rowIndex, columnField) {
|
|
66077
66093
|
const row = this.getRowByIndex(rowIndex);
|
|
66078
|
-
const column = this.
|
|
66094
|
+
const column = this.columns.find((col) => col.field === columnField);
|
|
66079
66095
|
if (row && row instanceof IgxTreeGridRow && column) {
|
|
66080
66096
|
return new IgxGridCell(this, rowIndex, columnField);
|
|
66081
66097
|
}
|
|
@@ -66094,7 +66110,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
66094
66110
|
*/
|
|
66095
66111
|
getCellByKey(rowSelector, columnField) {
|
|
66096
66112
|
const row = this.getRowByKey(rowSelector);
|
|
66097
|
-
const column = this.
|
|
66113
|
+
const column = this.columns.find((col) => col.field === columnField);
|
|
66098
66114
|
if (row && column) {
|
|
66099
66115
|
return new IgxGridCell(this, row.index, columnField);
|
|
66100
66116
|
}
|
|
@@ -66152,7 +66168,7 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
66152
66168
|
* ```
|
|
66153
66169
|
*/
|
|
66154
66170
|
get hasGroupableColumns() {
|
|
66155
|
-
return this.
|
|
66171
|
+
return this.columns.some((col) => col.groupable && !col.columnGroup);
|
|
66156
66172
|
}
|
|
66157
66173
|
transactionStatusUpdate(event) {
|
|
66158
66174
|
let actions = [];
|
|
@@ -66232,8 +66248,8 @@ class IgxTreeGridComponent extends IgxGridBaseDirective {
|
|
|
66232
66248
|
if (this.hasColumnLayouts) {
|
|
66233
66249
|
// invalid configuration - tree grid should not allow column layouts
|
|
66234
66250
|
// remove column layouts
|
|
66235
|
-
const nonColumnLayoutColumns = this.
|
|
66236
|
-
this.
|
|
66251
|
+
const nonColumnLayoutColumns = this.columns.filter((col) => !col.columnLayout && !col.columnLayoutChild);
|
|
66252
|
+
this.updateColumns(nonColumnLayoutColumns);
|
|
66237
66253
|
}
|
|
66238
66254
|
super.initColumns(collection, cb);
|
|
66239
66255
|
}
|
|
@@ -66344,6 +66360,7 @@ IgxTreeGridComponent.decorators = [
|
|
|
66344
66360
|
{ provide: GridBaseAPIService, useClass: IgxTreeGridAPIService },
|
|
66345
66361
|
{ provide: IgxGridBaseDirective, useExisting: forwardRef(() => IgxTreeGridComponent) },
|
|
66346
66362
|
IgxFilteringService,
|
|
66363
|
+
IgxColumnResizingService,
|
|
66347
66364
|
IgxForOfSyncService,
|
|
66348
66365
|
IgxForOfScrollSyncService
|
|
66349
66366
|
]
|
|
@@ -67767,7 +67784,7 @@ class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirective {
|
|
|
67767
67784
|
*/
|
|
67768
67785
|
get maxLevelHeaderDepth() {
|
|
67769
67786
|
if (this._maxLevelHeaderDepth === null) {
|
|
67770
|
-
this._maxLevelHeaderDepth = this.
|
|
67787
|
+
this._maxLevelHeaderDepth = this.columns.reduce((acc, col) => Math.max(acc, col.level), 0);
|
|
67771
67788
|
}
|
|
67772
67789
|
return this._maxLevelHeaderDepth;
|
|
67773
67790
|
}
|
|
@@ -67810,13 +67827,12 @@ class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirective {
|
|
|
67810
67827
|
columns.push(ref.instance);
|
|
67811
67828
|
});
|
|
67812
67829
|
const result = flatten(columns);
|
|
67813
|
-
this.
|
|
67814
|
-
this.columnList.notifyOnChanges();
|
|
67830
|
+
this.updateColumns(result);
|
|
67815
67831
|
this.initPinning();
|
|
67816
67832
|
const factoryColumn = this.resolver.resolveComponentFactory(IgxColumnComponent);
|
|
67817
67833
|
const outputs = factoryColumn.outputs.filter(o => o.propName !== 'columnChange');
|
|
67818
67834
|
outputs.forEach(output => {
|
|
67819
|
-
this.
|
|
67835
|
+
this.columns.forEach(column => {
|
|
67820
67836
|
if (column[output.propName]) {
|
|
67821
67837
|
column[output.propName].pipe(takeUntil(column.destroy$)).subscribe((args) => {
|
|
67822
67838
|
const rowIslandColumn = this.parentIsland.childColumns.find(col => col.field === column.field);
|
|
@@ -68168,6 +68184,7 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68168
68184
|
* @hidden
|
|
68169
68185
|
*/
|
|
68170
68186
|
this.rootGrid = null;
|
|
68187
|
+
this._childColumns = [];
|
|
68171
68188
|
this.layout_id = `igx-row-island-`;
|
|
68172
68189
|
this.isInit = false;
|
|
68173
68190
|
this.hgridAPI = gridAPI;
|
|
@@ -68260,7 +68277,8 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68260
68277
|
const nestedColumns = this.children.map((layout) => layout.columnList.toArray());
|
|
68261
68278
|
const colsArray = [].concat.apply([], nestedColumns);
|
|
68262
68279
|
const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
|
|
68263
|
-
this.
|
|
68280
|
+
this._childColumns = topCols;
|
|
68281
|
+
this.updateColumns(this._childColumns);
|
|
68264
68282
|
this.columnList.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
68265
68283
|
Promise.resolve().then(() => {
|
|
68266
68284
|
this.updateColumnList();
|
|
@@ -68268,7 +68286,7 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68268
68286
|
});
|
|
68269
68287
|
// handle column changes so that they are passed to child grid instances when columnChange is emitted.
|
|
68270
68288
|
this.ri_columnListDiffer.diff(this.childColumns);
|
|
68271
|
-
this.
|
|
68289
|
+
this._childColumns.forEach(x => x.columnChange.pipe(takeUntil(x.destroy$)).subscribe(() => this.updateColumnList()));
|
|
68272
68290
|
this.childColumns.changes.pipe(takeUntil(this.destroy$)).subscribe((change) => {
|
|
68273
68291
|
const diff = this.ri_columnListDiffer.diff(change);
|
|
68274
68292
|
if (diff) {
|
|
@@ -68360,15 +68378,9 @@ class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68360
68378
|
}
|
|
68361
68379
|
return false;
|
|
68362
68380
|
});
|
|
68363
|
-
this.
|
|
68364
|
-
if (this.parentIsland) {
|
|
68365
|
-
this.parentIsland.columnList.notifyOnChanges();
|
|
68366
|
-
}
|
|
68367
|
-
else {
|
|
68368
|
-
this.rootGrid.columnList.notifyOnChanges();
|
|
68369
|
-
}
|
|
68381
|
+
this._childColumns = topCols;
|
|
68370
68382
|
this.rowIslandAPI.getChildGrids().forEach((grid) => {
|
|
68371
|
-
grid.createColumnsList(this.
|
|
68383
|
+
grid.createColumnsList(this._childColumns);
|
|
68372
68384
|
if (!document.body.contains(grid.nativeElement)) {
|
|
68373
68385
|
grid.updateOnRender = true;
|
|
68374
68386
|
}
|
|
@@ -68604,7 +68616,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68604
68616
|
*/
|
|
68605
68617
|
getCellByColumnVisibleIndex(rowIndex, index) {
|
|
68606
68618
|
const row = this.getRowByIndex(rowIndex);
|
|
68607
|
-
const column = this.
|
|
68619
|
+
const column = this.columns.find((col) => col.visibleIndex === index);
|
|
68608
68620
|
if (row && row instanceof IgxHierarchicalGridRow && column) {
|
|
68609
68621
|
return new IgxGridCell(this, rowIndex, column.field);
|
|
68610
68622
|
}
|
|
@@ -68826,7 +68838,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68826
68838
|
*/
|
|
68827
68839
|
getCellByColumn(rowIndex, columnField) {
|
|
68828
68840
|
const row = this.getRowByIndex(rowIndex);
|
|
68829
|
-
const column = this.
|
|
68841
|
+
const column = this.columns.find((col) => col.field === columnField);
|
|
68830
68842
|
if (row && row instanceof IgxHierarchicalGridRow && column) {
|
|
68831
68843
|
return new IgxGridCell(this, rowIndex, columnField);
|
|
68832
68844
|
}
|
|
@@ -68845,7 +68857,7 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
68845
68857
|
*/
|
|
68846
68858
|
getCellByKey(rowSelector, columnField) {
|
|
68847
68859
|
const row = this.getRowByKey(rowSelector);
|
|
68848
|
-
const column = this.
|
|
68860
|
+
const column = this.columns.find((col) => col.field === columnField);
|
|
68849
68861
|
if (row && column) {
|
|
68850
68862
|
return new IgxGridCell(this, row.index, columnField);
|
|
68851
68863
|
}
|
|
@@ -69120,8 +69132,8 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
69120
69132
|
if (this.hasColumnLayouts) {
|
|
69121
69133
|
// invalid configuration - hierarchical grid should not allow column layouts
|
|
69122
69134
|
// remove column layouts
|
|
69123
|
-
const nonColumnLayoutColumns = this.
|
|
69124
|
-
this.
|
|
69135
|
+
const nonColumnLayoutColumns = this.columns.filter((col) => !col.columnLayout && !col.columnLayoutChild);
|
|
69136
|
+
this.updateColumns(nonColumnLayoutColumns);
|
|
69125
69137
|
}
|
|
69126
69138
|
super.initColumns(collection, cb);
|
|
69127
69139
|
}
|
|
@@ -69129,16 +69141,25 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
69129
69141
|
if (this.parentIsland && this.parentIsland.childColumns.length > 0 && !this.autoGenerate) {
|
|
69130
69142
|
this.createColumnsList(this.parentIsland.childColumns.toArray());
|
|
69131
69143
|
}
|
|
69132
|
-
|
|
69144
|
+
else {
|
|
69145
|
+
super.setupColumns();
|
|
69146
|
+
}
|
|
69147
|
+
}
|
|
69148
|
+
getColumnList() {
|
|
69149
|
+
const childLayouts = this.parent ? this.childLayoutList : this.allLayoutList;
|
|
69150
|
+
const nestedColumns = childLayouts.map((layout) => layout.columnList.toArray());
|
|
69151
|
+
const colsArray = [].concat.apply([], nestedColumns);
|
|
69152
|
+
if (colsArray.length > 0) {
|
|
69153
|
+
const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
|
|
69154
|
+
return topCols;
|
|
69155
|
+
}
|
|
69156
|
+
else {
|
|
69157
|
+
return this.columnList.toArray();
|
|
69158
|
+
}
|
|
69133
69159
|
}
|
|
69134
69160
|
onColumnsChanged(change) {
|
|
69135
69161
|
Promise.resolve().then(() => {
|
|
69136
69162
|
this.updateColumnList();
|
|
69137
|
-
const cols = change.filter(c => c.gridAPI.grid === this);
|
|
69138
|
-
if (cols.length > 0 || this.autoGenerate) {
|
|
69139
|
-
this.columnList.reset(cols);
|
|
69140
|
-
super.onColumnsChanged(this.columnList);
|
|
69141
|
-
}
|
|
69142
69163
|
});
|
|
69143
69164
|
}
|
|
69144
69165
|
_shouldAutoSize(renderedHeight) {
|
|
@@ -69154,8 +69175,8 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
69154
69175
|
const colLength = this.columnList.length;
|
|
69155
69176
|
if (colsArray.length > 0) {
|
|
69156
69177
|
const topCols = this.columnList.filter((item) => colsArray.indexOf(item) === -1);
|
|
69157
|
-
this.
|
|
69158
|
-
if (recalcColSizes && this.
|
|
69178
|
+
this.updateColumns(topCols);
|
|
69179
|
+
if (recalcColSizes && this.columns.length !== colLength) {
|
|
69159
69180
|
this.calculateGridSizes(false);
|
|
69160
69181
|
}
|
|
69161
69182
|
}
|
|
@@ -69188,6 +69209,7 @@ IgxHierarchicalGridComponent.decorators = [
|
|
|
69188
69209
|
{ provide: GridBaseAPIService, useClass: IgxHierarchicalGridAPIService },
|
|
69189
69210
|
{ provide: IgxGridBaseDirective, useExisting: forwardRef(() => IgxHierarchicalGridComponent) },
|
|
69190
69211
|
IgxGridSummaryService,
|
|
69212
|
+
IgxColumnResizingService,
|
|
69191
69213
|
IgxFilteringService,
|
|
69192
69214
|
IgxHierarchicalGridNavigationService,
|
|
69193
69215
|
IgxForOfSyncService,
|
|
@@ -73865,17 +73887,67 @@ class IgxSplitterPaneComponent {
|
|
|
73865
73887
|
this.overflow = 'auto';
|
|
73866
73888
|
/**
|
|
73867
73889
|
* @hidden @internal
|
|
73868
|
-
*
|
|
73890
|
+
* Get/Sets the `minWidth` properties of the current pane.
|
|
73869
73891
|
*/
|
|
73870
|
-
this.
|
|
73892
|
+
this.minWidth = '0';
|
|
73871
73893
|
/**
|
|
73872
73894
|
* @hidden @internal
|
|
73873
|
-
*
|
|
73895
|
+
* Get/Sets the `maxWidth` properties of the current pane.
|
|
73896
|
+
*/
|
|
73897
|
+
this.maxWidth = '100%';
|
|
73898
|
+
/**
|
|
73899
|
+
* @hidden @internal
|
|
73900
|
+
* Gets/Sets the `minHeight` properties of the current pane.
|
|
73901
|
+
*/
|
|
73902
|
+
this.minHeight = '0';
|
|
73903
|
+
/**
|
|
73904
|
+
* @hidden @internal
|
|
73905
|
+
* Gets/Sets the `maxHeight` properties of the current `IgxSplitterPaneComponent`.
|
|
73874
73906
|
*/
|
|
73875
73907
|
this.maxHeight = '100%';
|
|
73876
73908
|
this._size = 'auto';
|
|
73877
73909
|
this._collapsed = false;
|
|
73878
73910
|
}
|
|
73911
|
+
/**
|
|
73912
|
+
* Gets/Sets the minimum allowed size of the current pane.
|
|
73913
|
+
*
|
|
73914
|
+
* @example
|
|
73915
|
+
* ```html
|
|
73916
|
+
* <igx-splitter>
|
|
73917
|
+
* <igx-splitter-pane [minSize]='minSize'>...</igx-splitter-pane>
|
|
73918
|
+
* </igx-splitter>
|
|
73919
|
+
* ```
|
|
73920
|
+
*/
|
|
73921
|
+
get minSize() {
|
|
73922
|
+
return this._minSize;
|
|
73923
|
+
}
|
|
73924
|
+
;
|
|
73925
|
+
set minSize(value) {
|
|
73926
|
+
this._minSize = value;
|
|
73927
|
+
if (this.owner) {
|
|
73928
|
+
this.owner.panes.notifyOnChanges();
|
|
73929
|
+
}
|
|
73930
|
+
}
|
|
73931
|
+
/**
|
|
73932
|
+
* Gets/Set the maximum allowed size of the current pane.
|
|
73933
|
+
*
|
|
73934
|
+
* @example
|
|
73935
|
+
* ```html
|
|
73936
|
+
* <igx-splitter>
|
|
73937
|
+
* <igx-splitter-pane [maxSize]='maxSize'>...</igx-splitter-pane>
|
|
73938
|
+
* </igx-splitter>
|
|
73939
|
+
* ```
|
|
73940
|
+
*/
|
|
73941
|
+
get maxSize() {
|
|
73942
|
+
return this._maxSize;
|
|
73943
|
+
}
|
|
73944
|
+
;
|
|
73945
|
+
set maxSize(value) {
|
|
73946
|
+
this._maxSize = value;
|
|
73947
|
+
if (this.owner) {
|
|
73948
|
+
this.owner.panes.notifyOnChanges();
|
|
73949
|
+
}
|
|
73950
|
+
}
|
|
73879
73951
|
/**
|
|
73880
73952
|
* Gets/Sets the size of the current pane.
|
|
73881
73953
|
* * @example
|
|
@@ -73987,8 +74059,10 @@ IgxSplitterPaneComponent.propDecorators = {
|
|
|
73987
74059
|
collapsedChange: [{ type: Output }],
|
|
73988
74060
|
order: [{ type: HostBinding, args: ['style.order',] }],
|
|
73989
74061
|
overflow: [{ type: HostBinding, args: ['style.overflow',] }],
|
|
73990
|
-
|
|
73991
|
-
|
|
74062
|
+
minWidth: [{ type: HostBinding, args: ['style.min-width',] }],
|
|
74063
|
+
maxWidth: [{ type: HostBinding, args: ['style.max-width',] }],
|
|
74064
|
+
minHeight: [{ type: HostBinding, args: ['style.min-height',] }],
|
|
74065
|
+
maxHeight: [{ type: HostBinding, args: ['style.max-height',] }],
|
|
73992
74066
|
size: [{ type: Input }],
|
|
73993
74067
|
flex: [{ type: HostBinding, args: ['style.flex',] }],
|
|
73994
74068
|
collapsed: [{ type: Input }]
|
|
@@ -74089,8 +74163,10 @@ class IgxSplitterComponent {
|
|
|
74089
74163
|
return this._type;
|
|
74090
74164
|
}
|
|
74091
74165
|
set type(value) {
|
|
74166
|
+
var _a;
|
|
74092
74167
|
this._type = value;
|
|
74093
74168
|
this.resetPaneSizes();
|
|
74169
|
+
(_a = this.panes) === null || _a === void 0 ? void 0 : _a.notifyOnChanges();
|
|
74094
74170
|
}
|
|
74095
74171
|
/**
|
|
74096
74172
|
* @hidden @internal
|
|
@@ -74195,7 +74271,18 @@ class IgxSplitterComponent {
|
|
|
74195
74271
|
* This method inits panes with properties.
|
|
74196
74272
|
*/
|
|
74197
74273
|
initPanes() {
|
|
74198
|
-
this.panes.forEach(pane =>
|
|
74274
|
+
this.panes.forEach(pane => {
|
|
74275
|
+
var _a, _b, _c, _d;
|
|
74276
|
+
pane.owner = this;
|
|
74277
|
+
if (this.type === SplitterType.Horizontal) {
|
|
74278
|
+
pane.minWidth = (_a = pane.minSize) !== null && _a !== void 0 ? _a : '0';
|
|
74279
|
+
pane.maxWidth = (_b = pane.maxSize) !== null && _b !== void 0 ? _b : '100%';
|
|
74280
|
+
}
|
|
74281
|
+
else {
|
|
74282
|
+
pane.minHeight = (_c = pane.minSize) !== null && _c !== void 0 ? _c : '0';
|
|
74283
|
+
pane.maxHeight = (_d = pane.maxSize) !== null && _d !== void 0 ? _d : '100%';
|
|
74284
|
+
}
|
|
74285
|
+
});
|
|
74199
74286
|
this.assignFlexOrder();
|
|
74200
74287
|
if (this.panes.filter(x => x.collapsed).length > 0) {
|
|
74201
74288
|
// if any panes are collapsed, reset sizes.
|
|
@@ -74209,7 +74296,13 @@ class IgxSplitterComponent {
|
|
|
74209
74296
|
resetPaneSizes() {
|
|
74210
74297
|
if (this.panes) {
|
|
74211
74298
|
// if type is changed runtime, should reset sizes.
|
|
74212
|
-
this.panes.forEach(x =>
|
|
74299
|
+
this.panes.forEach(x => {
|
|
74300
|
+
x.size = 'auto';
|
|
74301
|
+
x.minWidth = '0';
|
|
74302
|
+
x.maxWidth = '100%';
|
|
74303
|
+
x.minHeight = '0';
|
|
74304
|
+
x.maxHeight = '100%';
|
|
74305
|
+
});
|
|
74213
74306
|
}
|
|
74214
74307
|
}
|
|
74215
74308
|
/**
|
|
@@ -76745,6 +76838,35 @@ IgxTreeExpandIndicatorDirective.decorators = [
|
|
|
76745
76838
|
selector: '[igxTreeExpandIndicator]'
|
|
76746
76839
|
},] }
|
|
76747
76840
|
];
|
|
76841
|
+
/**
|
|
76842
|
+
* IgxTreeComponent allows a developer to show a set of nodes in a hierarchical fashion.
|
|
76843
|
+
*
|
|
76844
|
+
* @igxModule IgxTreeModule
|
|
76845
|
+
* @igxKeywords tree
|
|
76846
|
+
* @igxTheme igx-tree-theme
|
|
76847
|
+
* @igxGroup Grids & Lists
|
|
76848
|
+
*
|
|
76849
|
+
* @remark
|
|
76850
|
+
* The Angular Tree Component allows users to represent hierarchical data in a tree-view structure,
|
|
76851
|
+
* maintaining parent-child relationships, as well as to define static tree-view structure without a corresponding data model.
|
|
76852
|
+
* Its primary purpose is to allow end-users to visualize and navigate within hierarchical data structures.
|
|
76853
|
+
* The Ignite UI for Angular Tree Component also provides load on demand capabilities, item activation,
|
|
76854
|
+
* bi-state and cascading selection of items through built-in checkboxes, built-in keyboard navigation and more.
|
|
76855
|
+
*
|
|
76856
|
+
* @example
|
|
76857
|
+
* ```html
|
|
76858
|
+
* <igx-tree>
|
|
76859
|
+
* <igx-tree-node>
|
|
76860
|
+
* I am a parent node 1
|
|
76861
|
+
* <igx-tree-node>
|
|
76862
|
+
* I am a child node 1
|
|
76863
|
+
* </igx-tree-node>
|
|
76864
|
+
* ...
|
|
76865
|
+
* </igx-tree-node>
|
|
76866
|
+
* ...
|
|
76867
|
+
* </igx-tree>
|
|
76868
|
+
* ```
|
|
76869
|
+
*/
|
|
76748
76870
|
class IgxTreeComponent extends DisplayDensityBase {
|
|
76749
76871
|
constructor(navService, selectionService, treeService, element, _displayDensityOptions) {
|
|
76750
76872
|
super(_displayDensityOptions);
|