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

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

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

2392 of 13661 relevant lines covered (17.51%)

83.12 hits per line

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

27.27
/src/date-picker/lib/year/year-header.component.ts
1
import { ChangeDetectionStrategy, Component } from '@angular/core';
2
import { DateHelperService } from '../../../date-picker/date-helper.service';
3
import { CalendarHeader, PanelSelector } from '../calendar/calendar-header.component';
4
import { ThyIconComponent } from 'ngx-tethys/icon';
5
import { NgIf, NgFor } from '@angular/common';
6

7
/**
8
 * @private
9
 */
10
@Component({
11
    changeDetection: ChangeDetectionStrategy.OnPush,
1✔
12
    // eslint-disable-next-line @angular-eslint/component-selector
13
    selector: 'year-header',
×
14
    templateUrl: '../calendar/calendar-header.component.html',
15
    standalone: true,
16
    imports: [NgIf, ThyIconComponent, NgFor]
×
17
})
18
export class YearHeaderComponent extends CalendarHeader {
19
    get startYear(): number {
×
20
        return parseInt(`${this.value.getYear() / 10}`, 10) * 10;
×
21
    }
22

23
    get endYear(): number {
×
24
        return this.startYear + 9;
25
    }
26

×
27
    constructor(public dateHelper: DateHelperService) {
28
        super(dateHelper);
29
    }
×
30

31
    superPrevious(): void {
32
        this.changeValue(this.value.addYears(-10));
33
    }
×
34

35
    superNext(): void {
36
        this.changeValue(this.value.addYears(10));
37
    }
38

1✔
39
    getSelectors(): PanelSelector[] {
40
        return [
41
            {
42
                className: `${this.prefixCls}-year-btn`,
1✔
43
                title: '',
44
                onClick: () => this.changePanel('decade'),
45
                label: `${this.startYear}-${this.endYear}`
46
            }
47
        ];
48
    }
49
}
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