• 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

8.33
/projects/igniteui-angular/src/lib/grids/grouping/grid-group-by-area.component.ts
1
import {
2
    Component,
3
    ElementRef,
4
    Input,
5
} from '@angular/core';
6
import { IChipsAreaReorderEventArgs } from '../../chips/public_api';
7
import { PlatformUtil } from '../../core/utils';
8
import { IGroupingExpression } from '../../data-operations/grouping-expression.interface';
9
import { ISortingExpression } from '../../data-operations/sorting-strategy';
10
import { FlatGridType } from '../common/grid.interface';
11
import { IgxGroupByAreaDirective, IgxGroupByMetaPipe } from './group-by-area.directive';
12
import { IgxDropDirective } from '../../directives/drag-drop/drag-drop.directive';
13
import { IgxGroupAreaDropDirective } from '../grid.directives';
14
import { IgxSuffixDirective } from '../../directives/suffix/suffix.directive';
15
import { IgxIconComponent } from '../../icon/icon.component';
16
import { IgxChipComponent } from '../../chips/chip.component';
17
import { NgFor, NgTemplateOutlet } from '@angular/common';
18
import { IgxChipsAreaComponent } from '../../chips/chips-area.component';
19

20
/**
21
 * An internal component representing the group-by drop area for the igx-grid component.
22
 *
23
 * @hidden @internal
24
 */
25
@Component({
26
    selector: 'igx-grid-group-by-area',
27
    templateUrl: 'group-by-area.component.html',
28
    providers: [{ provide: IgxGroupByAreaDirective, useExisting: IgxGridGroupByAreaComponent }],
29
    imports: [IgxChipsAreaComponent, NgFor, IgxChipComponent, IgxIconComponent, IgxSuffixDirective, IgxGroupAreaDropDirective, IgxDropDirective, NgTemplateOutlet, IgxGroupByMetaPipe]
30
})
31
export class IgxGridGroupByAreaComponent extends IgxGroupByAreaDirective {
2✔
32
    @Input()
UNCOV
33
    public sortingExpressions: ISortingExpression[] = [];
×
34

35
    /** The parent grid containing the component. */
36
    @Input()
37
    public override grid: FlatGridType;
38

39
    constructor(ref: ElementRef<HTMLElement>, platform: PlatformUtil) {
UNCOV
40
        super(ref, platform);
×
41
     }
42

43
    public handleReorder(event: IChipsAreaReorderEventArgs) {
UNCOV
44
        const { chipsArray, originalEvent } = event;
×
UNCOV
45
        const newExpressions = this.getReorderedExpressions(chipsArray);
×
46

UNCOV
47
        this.grid.groupingExpansionState = [];
×
UNCOV
48
        this.expressions = newExpressions;
×
49

50
        // When reordered using keyboard navigation, we don't have `onMoveEnd` event.
UNCOV
51
        if (originalEvent instanceof KeyboardEvent) {
×
52
            this.grid.groupingExpressions = newExpressions;
×
53
        }
54
    }
55

56
    public handleMoveEnd() {
UNCOV
57
        this.grid.groupingExpressions = this.expressions;
×
58
    }
59

60
    public groupBy(expression: IGroupingExpression) {
UNCOV
61
        this.grid.groupBy(expression);
×
62
    }
63

64
    public clearGrouping(name: string) {
UNCOV
65
        this.grid.clearGrouping(name);
×
66
    }
67
}
68

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