• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-angular / 26023601418

18 May 2026 08:57AM UTC coverage: 4.854% (-85.3%) from 90.174%
26023601418

Pull #17281

github

web-flow
Merge e7ce7a18e into 5a85df190
Pull Request #17281: feat: Added virtual scroll component and sample implementation

400 of 17347 branches covered (2.31%)

Branch coverage included in aggregate %.

63 of 222 new or added lines in 4 files covered. (28.38%)

27932 existing lines in 341 files now uncovered.

2022 of 32547 relevant lines covered (6.21%)

0.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/projects/igniteui-angular/grids/core/src/services/excel/worksheet-data.ts
1
import { ExportHeaderType, ExportRecordType, IColumnList, IExportRecord } from '../exporter-common/base-export-service';
2
import { ExportUtilities } from '../exporter-common/export-utilities';
3
import { IgxExcelExporterOptions } from './excel-exporter-options';
4
import { WorksheetDataDictionary } from './worksheet-data-dictionary';
5

6
/** @hidden */
7
export class WorksheetData {
8
    private _rowCount: number;
9
    private _dataDictionary: WorksheetDataDictionary;
10
    private _isSpecialData: boolean;
11
    private _hasMultiColumnHeader: boolean;
12
    private _hasMultiRowHeader: boolean;
13
    private _isHierarchical: boolean;
14
    private _hasSummaries: boolean;
15
    private _isPivotGrid: boolean;
16
    private _isTreeGrid: boolean;
17

UNCOV
18
    constructor(private _data: IExportRecord[],
×
UNCOV
19
                public options: IgxExcelExporterOptions,
×
UNCOV
20
                public sort: any,
×
UNCOV
21
                public columnCount: number,
×
UNCOV
22
                public rootKeys: string[],
×
UNCOV
23
                public indexOfLastPinnedColumn: number,
×
UNCOV
24
                public columnWidths: number[],
×
UNCOV
25
                public owner: IColumnList,
×
UNCOV
26
                public owners: Map<any, IColumnList>) {
×
UNCOV
27
            this.initializeData();
×
28
    }
29

30
    public get data(): IExportRecord[] {
UNCOV
31
        return this._data;
×
32
    }
33

34
    public get rowCount(): number {
UNCOV
35
        return this._rowCount;
×
36
    }
37

38
    public get isEmpty(): boolean {
UNCOV
39
        return !this.rowCount
×
40
            || this.rowCount === this.owner.maxLevel + 1
41
            || !this.columnCount
UNCOV
42
            || this.owner.columns.every(c => c.skip);
×
43
    }
44

45
    public get isSpecialData(): boolean {
UNCOV
46
        return this._isSpecialData;
×
47
    }
48

49
    public get dataDictionary(): WorksheetDataDictionary {
UNCOV
50
        return this._dataDictionary;
×
51
    }
52

53
    public get hasMultiColumnHeader(): boolean {
UNCOV
54
        return this._hasMultiColumnHeader;
×
55
    }
56

57
    public get hasSummaries(): boolean {
UNCOV
58
        return this._hasSummaries;
×
59
    }
60

61
    public get hasMultiRowHeader(): boolean {
UNCOV
62
        return this._hasMultiRowHeader;
×
63
    }
64

65
    public get isHierarchical(): boolean {
UNCOV
66
        return this._isHierarchical;
×
67
    }
68

69
    public get isTreeGrid(): boolean {
UNCOV
70
        return this._isTreeGrid;
×
71
    }
72

73
    public get isPivotGrid(): boolean {
UNCOV
74
        return this._isPivotGrid;
×
75
    }
76

77
    public get isGroupedGrid(): boolean {
UNCOV
78
        return this._data.some(d => d.type === ExportRecordType.GroupedRecord);
×
79
    }
80

81
    public get maxLevel(): number {
UNCOV
82
        return [...new Set(this._data.map(item => item.level))].sort((a,b) => (a > b ? -1 : 1))[0];
×
83
    }
84

85
    public get multiColumnHeaderRows(): number {
UNCOV
86
        return !this.options.ignoreMultiColumnHeaders ? Array.from(this.owners.values()).map(c => c.maxLevel).reduce((a,b) => a + b) : 0;
×
87
    }
88

89
    private initializeData() {
UNCOV
90
        this._dataDictionary = new WorksheetDataDictionary(this.columnCount, this.options.columnWidth, this.columnWidths);
×
91

UNCOV
92
        this._hasMultiColumnHeader = Array.from(this.owners.values())
×
UNCOV
93
            .some(o => o.columns.some(col => !col.skip && col.headerType === ExportHeaderType.MultiColumnHeader));
×
94

UNCOV
95
        this._hasMultiRowHeader = Array.from(this.owners.values())
×
UNCOV
96
            .some(o => o.columns.some(col => !col.skip && col.headerType === ExportHeaderType.MultiRowHeader));
×
97

UNCOV
98
        this._isHierarchical = this.data[0]?.type === ExportRecordType.HierarchicalGridRecord
×
99
            || !(typeof(Array.from(this.owners.keys())[0]) === 'string');
100

UNCOV
101
        this._hasSummaries = this._data.filter(d => d.type === ExportRecordType.SummaryRecord).length > 0;
×
102

UNCOV
103
        this._isTreeGrid = this._data.filter(d => d.type === ExportRecordType.TreeGridRecord).length > 0;
×
104

UNCOV
105
        this._isPivotGrid = this.data[0]?.type === ExportRecordType.PivotGridRecord;
×
106

UNCOV
107
        const exportMultiColumnHeaders = this._hasMultiColumnHeader && !this.options.ignoreMultiColumnHeaders;
×
108

UNCOV
109
        if (this._isHierarchical || exportMultiColumnHeaders || this._isPivotGrid) {
×
UNCOV
110
            this.options.exportAsTable = false;
×
111
        }
112

UNCOV
113
        if (!this._data || this._data.length === 0) {
×
UNCOV
114
            if (!this._isHierarchical) {
×
UNCOV
115
                this._rowCount = this.owner.maxLevel + 1;
×
116
            }
117

UNCOV
118
            return;
×
119
        }
120

UNCOV
121
        this._isSpecialData = ExportUtilities.isSpecialData(this._data[0].data);
×
UNCOV
122
        this._rowCount = this._data.length + this.multiColumnHeaderRows + 1;
×
123
    }
124
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc