• 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

0.0
/projects/igniteui-angular/src/lib/grids/filtering/excel-style/common.ts
1
import { isTree } from '../../../data-operations/expressions-tree-util';
2
import { FilteringLogic, IFilteringExpression } from '../../../data-operations/filtering-expression.interface';
3
import { IFilteringExpressionsTree } from '../../../data-operations/filtering-expressions-tree';
4

5
/**
6
 * @hidden @internal
7
 */
8
export class FilterListItem {
9
    public value: any;
10
    public label: any;
11
    public isSelected: boolean;
12
    public indeterminate: boolean;
13
    public isFiltered: boolean;
UNCOV
14
    public isSpecial = false;
×
UNCOV
15
    public isBlanks = false;
×
16
    public children?: Array<FilterListItem>;
17
    public parent?: FilterListItem;
18
}
19

20
/**
21
 * @hidden
22
 */
23
export class ExpressionUI {
24
    public expression: IFilteringExpression;
25
    public beforeOperator: FilteringLogic;
26
    public afterOperator: FilteringLogic;
UNCOV
27
    public isSelected = false;
×
UNCOV
28
    public isVisible = true;
×
29
}
30

31
/**
32
 * @hidden @internal
33
 */
34
export class ActiveElement {
35
    public index: number;
36
    public id: string;
37
    public checked: boolean;
38
}
39

40
export function generateExpressionsList(expressions: IFilteringExpressionsTree | IFilteringExpression,
41
    operator: FilteringLogic,
42
    expressionsUIs: ExpressionUI[]): void {
UNCOV
43
    generateExpressionsListRecursive(expressions, operator, expressionsUIs);
×
44

45
    // The beforeOperator of the first expression and the afterOperator of the last expression should be null
UNCOV
46
    if (expressionsUIs.length) {
×
UNCOV
47
        expressionsUIs[expressionsUIs.length - 1].afterOperator = null;
×
48
    }
49
}
50

51

52
function generateExpressionsListRecursive(expressions: IFilteringExpressionsTree | IFilteringExpression,
53
    operator: FilteringLogic,
54
    expressionsUIs: ExpressionUI[]): void {
UNCOV
55
    if (!expressions) {
×
UNCOV
56
        return;
×
57
    }
58

NEW
59
    if (isTree(expressions)) {
×
NEW
60
        for (const operand of expressions.filteringOperands) {
×
NEW
61
            generateExpressionsListRecursive(operand, expressions.operator, expressionsUIs);
×
62
        }
UNCOV
63
        if (expressionsUIs.length) {
×
UNCOV
64
            expressionsUIs[expressionsUIs.length - 1].afterOperator = operator;
×
65
        }
66
    } else {
UNCOV
67
        const exprUI = new ExpressionUI();
×
NEW
68
        exprUI.expression = expressions;
×
UNCOV
69
        exprUI.afterOperator = operator;
×
70

UNCOV
71
        const prevExprUI = expressionsUIs[expressionsUIs.length - 1];
×
UNCOV
72
        if (prevExprUI) {
×
UNCOV
73
            exprUI.beforeOperator = prevExprUI.afterOperator;
×
74
        }
75

UNCOV
76
        expressionsUIs.push(exprUI);
×
77
    }
78
}
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