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

IgniteUI / igniteui-angular / 13331632524

14 Feb 2025 02:51PM CUT coverage: 22.015% (-69.6%) from 91.622%
13331632524

Pull #15372

github

web-flow
Merge d52d57714 into bcb78ae0a
Pull Request #15372: chore(*): test ci passing

1990 of 15592 branches covered (12.76%)

431 of 964 new or added lines in 18 files covered. (44.71%)

19956 existing lines in 307 files now uncovered.

6452 of 29307 relevant lines covered (22.02%)

249.17 hits per line

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

69.57
/projects/igniteui-angular/src/lib/grids/summaries/summary-row.component.ts
1
import {
2
    Component,
3
    Input,
4
    ViewChildren,
5
    QueryList,
6
    HostBinding,
7
    ViewChild,
8
    ElementRef,
9
    ChangeDetectionStrategy,
10
    ChangeDetectorRef,
11
    DoCheck,
12
    Inject
13
} from '@angular/core';
14
import { IgxSummaryResult } from './grid-summary';
15
import { IgxSummaryCellComponent } from './summary-cell.component';
16
import { IgxGridForOfDirective } from '../../directives/for-of/for_of.directive';
17
import { IgxForOfSyncService } from '../../directives/for-of/for_of.sync.service';
18
import { ColumnType, GridType, IGX_GRID_BASE } from '../common/grid.interface';
19
import { IgxGridNotGroupedPipe } from '../common/pipes';
20
import { NgIf, NgTemplateOutlet, NgFor } from '@angular/common';
21

22

23
@Component({
24
    changeDetection: ChangeDetectionStrategy.OnPush,
25
    selector: 'igx-grid-summary-row',
26
    templateUrl: './summary-row.component.html',
27
    providers: [IgxForOfSyncService],
28
    imports: [NgIf, NgTemplateOutlet, IgxGridForOfDirective, IgxSummaryCellComponent, NgFor, IgxGridNotGroupedPipe]
29
})
30
export class IgxSummaryRowComponent implements DoCheck  {
2✔
31

32
    @Input()
33
    public summaries: Map<string, IgxSummaryResult[]>;
34

35
    @Input()
36
    public gridID;
37

38
    @Input()
39
    public index: number;
40

41
    @Input()
42
    public firstCellIndentation = -1;
33✔
43

44
    @HostBinding('attr.data-rowIndex')
45
    public get dataRowIndex() {
46
        return this.index;
356✔
47
    }
48

49
    public get minHeight() {
50
        return this.grid.summaryRowHeight - 1;
4,450✔
51
    }
52

53
    @ViewChildren(IgxSummaryCellComponent, { read: IgxSummaryCellComponent })
54
    public _summaryCells: QueryList<IgxSummaryCellComponent>;
55

56
    public get summaryCells(): QueryList<IgxSummaryCellComponent> {
UNCOV
57
        const res = new QueryList<IgxSummaryCellComponent>();
×
UNCOV
58
        if (!this._summaryCells) {
×
59
            return res;
×
60
        }
UNCOV
61
        const cList = this._summaryCells.filter(c => c.nativeElement.isConnected);
×
UNCOV
62
        res.reset(cList);
×
UNCOV
63
        return res;
×
64
    }
65
    public set summaryCells(cells) { }
66

67
    /**
68
     * @hidden
69
     */
70
    @ViewChild('igxDirRef', { read: IgxGridForOfDirective })
71
    public virtDirRow: IgxGridForOfDirective<ColumnType, ColumnType[]>;
72

73
    constructor(@Inject(IGX_GRID_BASE) public grid: GridType,
33✔
74
                public element: ElementRef<HTMLElement>,
33✔
75
                public cdr: ChangeDetectorRef) {}
33✔
76

77
    public ngDoCheck() {
78
        this.cdr.markForCheck();
356✔
79
    }
80

81
    public get nativeElement() {
82
        return this.element.nativeElement;
60✔
83
    }
84

85
    public getColumnSummaries(columnName: string) {
86
        if (!this.summaries.get(columnName)) {
2,225✔
87
            return [];
1,591✔
88
        }
89
        return this.summaries.get(columnName);
634✔
90

91
    }
92

93
    /**
94
     * @hidden
95
     * @internal
96
     */
97
    public isCellActive(visibleColumnIndex) {
98
        const node = this.grid.navigation.activeNode;
2,225✔
99
        return node ? node.row === this.index && node.column === visibleColumnIndex : false;
2,225!
100
    }
101

102
    /**
103
     * @hidden
104
     */
105
    public get pinnedColumns(): ColumnType[] {
106
        return this.grid.pinnedColumns;
712✔
107
    }
108

109
    /**
110
     * @hidden
111
     */
112
    public get unpinnedColumns(): ColumnType[] {
113
        return this.grid.unpinnedColumns;
356✔
114
    }
115

116
    public getContext(row) {
UNCOV
117
        return {
×
118
            $implicit: row
119
        };
120
    }
121
}
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

© 2025 Coveralls, Inc