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

IgniteUI / igniteui-angular / 20960087204

13 Jan 2026 02:19PM UTC coverage: 12.713% (-78.8%) from 91.5%
20960087204

Pull #16746

github

web-flow
Merge 9afce6e5d into a967f087e
Pull Request #16746: fix(csv): export summaries - master

1008 of 16803 branches covered (6.0%)

19 of 23 new or added lines in 2 files covered. (82.61%)

24693 existing lines in 336 files now uncovered.

3985 of 31345 relevant lines covered (12.71%)

2.49 hits per line

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

2.17
/projects/igniteui-angular/grids/core/src/columns/column-layout.component.ts
1
import {
2
    AfterContentInit,
3
    Component,
4
    ChangeDetectionStrategy,
5
    forwardRef,
6
    Input,
7
    booleanAttribute
8
} from '@angular/core';
9
import { IgxColumnComponent } from './column.component';
10
import { IgxColumnGroupComponent } from './column-group.component';
11

12
/* blazorIndirectRender */
13
/* blazorElement */
14
/* omitModule */
15
/* wcElementTag: igc-column-layout */
16
/* additionalIdentifier: Children.Field */
17
/* jsonAPIManageCollectionInMarkup */
18
/**
19
 * Column layout for declaration of Multi-row Layout
20
 *
21
 * @igxParent IgxGridComponent
22
 */
23
@Component({
24
    changeDetection: ChangeDetectionStrategy.OnPush,
UNCOV
25
    providers: [{ provide: IgxColumnComponent, useExisting: forwardRef(() => IgxColumnLayoutComponent) }],
×
26
    selector: 'igx-column-layout',
27
    template: `@if (platform.isElements) {
28
        <ng-content select="igx-column,igc-column"></ng-content>
29
    }`,
30
    styles: `:host { display: none }`,
31
    standalone: true
32
})
33
export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements AfterContentInit {
3✔
34
    /** @hidden @internal **/
UNCOV
35
    public childrenVisibleIndexes = [];
×
36
    /**
37
     * Gets the width of the column layout.
38
     * ```typescript
39
     * let columnGroupWidth = this.columnGroup.width;
40
     * ```
41
     *
42
     * @memberof IgxColumnGroupComponent
43
     */
44
    public override get width(): any {
UNCOV
45
        const width = this.getFilledChildColumnSizes(this.children).reduce((acc, val) => acc + parseFloat(val), 0);
×
UNCOV
46
        return width;
×
47
    }
48

49
    /* blazorSuppress */
50
    public override set width(val: any) { }
51

52
    public override get columnLayout() {
UNCOV
53
        return true;
×
54
    }
55

56
    /**
57
     * @hidden
58
     */
59
    public override getCalcWidth(): any {
UNCOV
60
        let borderWidth = 0;
×
61

UNCOV
62
        if (this.headerGroup && this.headerGroup.hasLastPinnedChildColumn) {
×
UNCOV
63
            const headerStyles = this.grid.document.defaultView.getComputedStyle(this.headerGroup.nativeElement.children[0]);
×
UNCOV
64
            borderWidth = parseFloat(headerStyles.borderRightWidth);
×
65
        }
66

UNCOV
67
        return super.getCalcWidth() + borderWidth;
×
68
    }
69

70
    /**
71
     * Gets the column visible index.
72
     * If the column is not visible, returns `-1`.
73
     * ```typescript
74
     * let visibleColumnIndex =  this.column.visibleIndex;
75
     * ```
76
     *
77
     * @memberof IgxColumnComponent
78
     */
79
    public override get visibleIndex(): number {
UNCOV
80
        if (!isNaN(this._vIndex)) {
×
UNCOV
81
            return this._vIndex;
×
82
        }
83

UNCOV
84
        const unpinnedColumns = this.grid.unpinnedColumns.filter(c => c.columnLayout && !c.hidden);
×
UNCOV
85
        const pinnedStart = this.grid.pinnedStartColumns.filter(c => c.columnLayout && !c.hidden);
×
UNCOV
86
        const pinnedEndColumns = this.grid.pinnedEndColumns.filter(c => c.columnLayout && !c.hidden);
×
UNCOV
87
        const ordered = pinnedStart.concat(unpinnedColumns, pinnedEndColumns);
×
UNCOV
88
        const vIndex = ordered.indexOf(this);
×
UNCOV
89
        this._vIndex = vIndex;
×
UNCOV
90
        return vIndex;
×
91
    }
92

93
    /*
94
     * Gets whether the column layout is hidden.
95
     * ```typescript
96
     * let isHidden = this.columnGroup.hidden;
97
     * ```
98
     * @memberof IgxColumnGroupComponent
99
     */
100
    @Input({ transform: booleanAttribute })
101
    public override get hidden() {
UNCOV
102
        return this._hidden;
×
103
    }
104

105
     /* blazorSuppress */
106
    /**
107
     * Sets the column layout hidden property.
108
     * ```typescript
109
     * <igx-column-layout [hidden] = "true"></igx-column->
110
     * ```
111
     *
112
     * @memberof IgxColumnGroupComponent
113
     */
114
    public override set hidden(value: boolean) {
UNCOV
115
        this._hidden = value;
×
UNCOV
116
        this.children.forEach(child => child.hidden = value);
×
UNCOV
117
        if (this.grid && this.grid.columns && this.grid.columns.length > 0) {
×
118
            // reset indexes in case columns are hidden/shown runtime
UNCOV
119
            const columns = this.grid && this.grid.pinnedColumns && this.grid.unpinnedColumns ?
×
120
                this.grid.pinnedColumns.concat(this.grid.unpinnedColumns) : [];
UNCOV
121
            if (!this._hidden && !columns.find(c => c.field === this.field)) {
×
UNCOV
122
                this.grid.resetColumnCollections();
×
123
            }
UNCOV
124
            this.grid.columns.filter(x => x.columnLayout).forEach(x => x.populateVisibleIndexes());
×
125
        }
126
    }
127

128
    /**
129
     * @hidden
130
     */
131
    public override ngAfterContentInit() {
UNCOV
132
        super.ngAfterContentInit();
×
UNCOV
133
        if (!this.hidden) {
×
UNCOV
134
            this.hidden = this.allChildren.some(x => x.hidden);
×
135
        } else {
UNCOV
136
            this.children.forEach(child => child.hidden = this.hidden);
×
137
        }
138
    }
139

140
    /** @hidden @internal **/
141
    public get hasLastPinnedChildColumn() {
UNCOV
142
        return this.children.some(child => child.isLastPinned);
×
143
    }
144

145
    /** @hidden @internal **/
146
    public get hasFirstPinnedChildColumn() {
UNCOV
147
        return this.children.some(child => child.isFirstPinned);
×
148
    }
149

150
    /**
151
     * @hidden
152
     */
153
    public override populateVisibleIndexes() {
UNCOV
154
        this.childrenVisibleIndexes = [];
×
UNCOV
155
        const columns = this.grid?.pinnedColumns && this.grid?.unpinnedColumns
×
156
            ? this.grid.pinnedStartColumns.concat(this.grid.unpinnedColumns, this.grid.pinnedEndColumns)
157
            : [];
UNCOV
158
        const orderedCols = columns
×
UNCOV
159
            .filter(x => !x.columnGroup && !x.hidden)
×
UNCOV
160
            .sort((a, b) => a.rowStart - b.rowStart || columns.indexOf(a.parent) - columns.indexOf(b.parent) || a.colStart - b.colStart);
×
UNCOV
161
        this.children.forEach(child => {
×
UNCOV
162
            const rs = child.rowStart || 1;
×
UNCOV
163
            let vIndex = 0;
×
164
            // filter out all cols with larger rowStart
UNCOV
165
            const cols = orderedCols.filter(c =>
×
UNCOV
166
                !c.columnGroup && (c.rowStart || 1) <= rs);
×
UNCOV
167
            vIndex = cols.indexOf(child);
×
UNCOV
168
            this.childrenVisibleIndexes.push({ column: child, index: vIndex });
×
169
        });
170
    }
171
}
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

© 2026 Coveralls, Inc