• 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

57.14
/projects/igniteui-angular/src/lib/grids/headers/pipes.ts
1
import { Pipe, PipeTransform } from '@angular/core';
2
import { ISortingExpression } from '../../data-operations/sorting-strategy';
3
import { ColumnType } from '../common/grid.interface';
4

5

6
@Pipe({
7
    name: 'sortingIndex',
8
    standalone: true
9
})
10
export class SortingIndexPipe implements PipeTransform {
2✔
11
    public transform(columnField: string, sortingExpressions: ISortingExpression[]): number {
UNCOV
12
        let sortIndex = sortingExpressions.findIndex(expression => expression.fieldName === columnField);
×
UNCOV
13
        return sortIndex !== -1 ? ++sortIndex : null;
×
14
    }
15
}
16

17
@Pipe({
18
    name: 'igxHeaderGroupWidth',
19
    standalone: true
20
})
21
export class IgxHeaderGroupWidthPipe implements PipeTransform {
2✔
22

23
    public transform(width: any, minWidth: any, hasLayout: boolean) {
24
        const isFitContent = width === 'fit-content';
512✔
25
        return hasLayout ? '' : isFitContent ? width : `${Math.max(parseFloat(width), minWidth)}px`;
512!
26
    }
27
}
28

29

30
@Pipe({
31
    name: 'igxHeaderGroupStyle',
32
    standalone: true
33
})
34
export class IgxHeaderGroupStylePipe implements PipeTransform {
2✔
35

36
    public transform(styles: { [prop: string]: any }, column: ColumnType, _: number): { [prop: string]: any } {
37
        const css = {};
533✔
38

39
        if (!styles) {
533✔
40
            return css;
533✔
41
        }
42

UNCOV
43
        for (const prop of Object.keys(styles)) {
×
UNCOV
44
            const res = styles[prop];
×
UNCOV
45
            css[prop] = typeof res === 'function' ? res(column) : res;
×
46
        }
47

UNCOV
48
        return css;
×
49
    }
50
}
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