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

IgniteUI / igniteui-angular / 12910003674

22 Jan 2025 02:10PM CUT coverage: 91.609% (+0.01%) from 91.597%
12910003674

push

github

web-flow
Merge pull request #15285 from IgniteUI/mvenkov/use-passed-overlay-settings-18.2

Use provided in show method overlay settings - 18.2

12988 of 15222 branches covered (85.32%)

5 of 5 new or added lines in 1 file covered. (100.0%)

46 existing lines in 9 files now uncovered.

26321 of 28732 relevant lines covered (91.61%)

33978.84 hits per line

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

68.97
/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-row-header-group.component.ts
1
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, Inject, Input, NgZone, ViewChild } from '@angular/core';
2
import { PlatformUtil } from '../../core/utils';
3
import { IGX_GRID_BASE, PivotGridType } from '../common/grid.interface';
4
import { IgxFilteringService } from '../filtering/grid-filtering.service';
5
import { IgxGridHeaderGroupComponent } from '../headers/grid-header-group.component';
6
import { IgxPivotColumnResizingService } from '../resizing/pivot-grid/pivot-resizing.service';
7
import { IPivotDimension, PivotRowHeaderGroupType } from './pivot-grid.interface';
8
import { IgxPivotRowDimensionHeaderComponent } from './pivot-row-dimension-header.component';
9
import { IgxHeaderGroupStylePipe } from '../headers/pipes';
10
import { IgxPivotResizeHandleDirective } from '../resizing/pivot-grid/pivot-resize-handle.directive';
11
import { IgxColumnMovingDropDirective } from '../moving/moving.drop.directive';
12
import { IgxColumnMovingDragDirective } from '../moving/moving.drag.directive';
13
import { NgIf, NgClass, NgStyle } from '@angular/common';
14
import { IgxIconComponent } from '../../icon/icon.component';
15
import { SortingDirection } from '../../data-operations/sorting-strategy';
16

17
/**
18
 * @hidden
19
 */
20
@Component({
21
    changeDetection: ChangeDetectionStrategy.OnPush,
22
    selector: 'igx-pivot-row-header-group',
23
    templateUrl: './pivot-row-dimension-header-group.component.html',
24
    standalone: true,
25
    imports: [IgxIconComponent, NgIf, IgxPivotRowDimensionHeaderComponent, NgClass, NgStyle, IgxColumnMovingDragDirective, IgxColumnMovingDropDirective, IgxPivotResizeHandleDirective, IgxHeaderGroupStylePipe]
26
})
27
export class IgxPivotRowHeaderGroupComponent extends IgxGridHeaderGroupComponent implements PivotRowHeaderGroupType {
2✔
28

29
    /**
30
     * @hidden
31
     */
32
    @HostBinding('style.user-select')
33
    public userSelect = 'none';
61✔
34

35
    constructor(private cdRef: ChangeDetectorRef,
61✔
36
        @Inject(IGX_GRID_BASE) public override grid: PivotGridType,
61✔
37
        private elementRef: ElementRef<HTMLElement>,
61✔
38
        public override colResizingService: IgxPivotColumnResizingService,
61✔
39
        filteringService: IgxFilteringService,
40
        platform: PlatformUtil,
41
        protected zone: NgZone) {
61✔
42
        super(cdRef, grid, elementRef, colResizingService, filteringService, platform);
61✔
43
    }
44

45
    /**
46
     * @hidden
47
     * @internal
48
     */
49
    @Input()
50
    public rowIndex: number;
51

52
    @Input()
53
    public set dimWidth(value: number) {
54
        this.column.width = value + 'px';
62✔
55
    }
56
    public get dimWidth() {
UNCOV
57
        return parseFloat(this.column.width);
×
58
    }
59

60
    public get parent() {
UNCOV
61
        return this;
×
62
    };
63

64
    @Input()
65
    public rootDimension: IPivotDimension;
66

67
    @ViewChild(IgxPivotRowDimensionHeaderComponent)
68
    public override header: IgxPivotRowDimensionHeaderComponent;
69

70
    @HostBinding('attr.id')
71
    public override get headerID() {
72
        return `${this.grid.id}_-2_${this.rootDimension.memberName}_${this.visibleIndex}`;
1,286✔
73
    }
74

75
    @HostBinding('attr.title')
76
    public override get title() {
77
        return this.rootDimension.displayName;
643✔
78
    }
79

80
    /**
81
     * @hidden
82
     * @internal
83
     */
84
    public get visibleIndex(): number {
85
        const rows = this.grid.visibleRowDimensions;
1,286✔
86
        return rows.indexOf(this.rootDimension);
1,286✔
87
    }
88

89
    @HostBinding('class.igx-grid-th--active')
90
    public override get active() {
91
        const nav = this.grid.navigation;
1,286✔
92
        const node = nav.activeNode;
1,286✔
93
        return node && !this.column.columnGroup ?
1,286!
94
            nav.isRowDimensionHeaderActive &&
1,286!
95
            node.row === this.rowIndex &&
96
            node.column === this.visibleIndex :
97
            false;
98
    }
99

100
    @HostBinding('class.asc')
101
    public get sortAscendingStyle() {
102
        return this.rootDimension.sortDirection === SortingDirection.Asc;
643✔
103
    }
104

105
    @HostBinding('class.desc')
106
    public get sortDescendingStyle() {
107
        return this.rootDimension.sortDirection === SortingDirection.Desc;
643✔
108
    }
109

110
    @HostBinding('class.igx-grid-th--sortable')
111
    public get sortableStyle() {
112
        return true;
643✔
113
    }
114

115
    @HostBinding('class.igx-grid-th--sorted')
116
    public get sortedStyle() {
117
        return this.rootDimension.sortDirection !== undefined && this.rootDimension.sortDirection !== SortingDirection.None;
643✔
118
    }
119

120
    protected override get activeNode() {
UNCOV
121
        this.grid.navigation.isRowDimensionHeaderActive = true;
×
122
        this.grid.navigation.isRowHeaderActive = false;
×
123
        return {
×
124
            row: this.rowIndex, column: this.visibleIndex, level: null,
125
            mchCache: {
126
                level: 0,
127
                visibleIndex:  this.visibleIndex
128
            },
129
            layout: null
130
        };
131
    }
132

133
    public override activate() {
UNCOV
134
        this.grid.navigation.setActiveNode(this.activeNode);
×
135
    }
136

137
    /**
138
     * @hidden @internal
139
     */
140
    public override pointerdown(_event: PointerEvent): void {
UNCOV
141
        this.activate();
×
142
    }
143

144
    /**
145
     * @hidden @internal
146
     */
147
    public override onMouseDown(_event: MouseEvent): void {
UNCOV
148
        this.activate();
×
149
    }
150

151
    public override get selectable(): boolean {
UNCOV
152
        return false;
×
153
    }
154
}
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