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

IgniteUI / igniteui-angular / 13784630843

11 Mar 2025 09:28AM CUT coverage: 4.027% (-87.6%) from 91.657%
13784630843

Pull #15465

github

web-flow
Merge c3f73a0e2 into 9898d98a6
Pull Request #15465: [Query Builder] drag and drop refactor without DOM manipulations

124 of 15563 branches covered (0.8%)

0 of 160 new or added lines in 2 files covered. (0.0%)

25607 existing lines in 325 files now uncovered.

1180 of 29304 relevant lines covered (4.03%)

0.29 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 expressionId: string;
25
    public expression: IFilteringExpression;
26
    public beforeOperator: FilteringLogic;
27
    public afterOperator: FilteringLogic;
UNCOV
28
    public isSelected = false;
×
UNCOV
29
    public isVisible = true;
×
30

31
    constructor() {
32
        // Use IDs to identify expressions clearly and use to track them in template @for cycles.
UNCOV
33
        this.expressionId = crypto.randomUUID();
×
34
    }
35
}
36

37
/**
38
 * @hidden @internal
39
 */
40
export class ActiveElement {
41
    public index: number;
42
    public id: string;
43
    public checked: boolean;
44
}
45

46
export function generateExpressionsList(expressions: IFilteringExpressionsTree | IFilteringExpression,
47
    operator: FilteringLogic,
48
    expressionsUIs: ExpressionUI[]): void {
UNCOV
49
    generateExpressionsListRecursive(expressions, operator, expressionsUIs);
×
50

51
    // The beforeOperator of the first expression and the afterOperator of the last expression should be null
UNCOV
52
    if (expressionsUIs.length) {
×
UNCOV
53
        expressionsUIs[expressionsUIs.length - 1].afterOperator = null;
×
54
    }
55
}
56

57

58
function generateExpressionsListRecursive(expressions: IFilteringExpressionsTree | IFilteringExpression,
59
    operator: FilteringLogic,
60
    expressionsUIs: ExpressionUI[]): void {
UNCOV
61
    if (!expressions) {
×
UNCOV
62
        return;
×
63
    }
64

UNCOV
65
    if (isTree(expressions)) {
×
UNCOV
66
        for (const operand of expressions.filteringOperands) {
×
UNCOV
67
            generateExpressionsListRecursive(operand, expressions.operator, expressionsUIs);
×
68
        }
UNCOV
69
        if (expressionsUIs.length) {
×
UNCOV
70
            expressionsUIs[expressionsUIs.length - 1].afterOperator = operator;
×
71
        }
72
    } else {
UNCOV
73
        const exprUI = new ExpressionUI();
×
UNCOV
74
        exprUI.expression = expressions;
×
UNCOV
75
        exprUI.afterOperator = operator;
×
76

UNCOV
77
        const prevExprUI = expressionsUIs[expressionsUIs.length - 1];
×
UNCOV
78
        if (prevExprUI) {
×
UNCOV
79
            exprUI.beforeOperator = prevExprUI.afterOperator;
×
80
        }
81

UNCOV
82
        expressionsUIs.push(exprUI);
×
83
    }
84
}
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