• 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-range/optional-dates/optional-dates.component.ts
1
import { Component, OnInit } from '@angular/core';
2
import { DateRangeItemInfo } from '../date-range.class';
3
import { ThyPopover } from 'ngx-tethys/popover';
4
import { FormsModule } from '@angular/forms';
5
import { ThyRangePickerDirective } from 'ngx-tethys/date-picker';
6
import { ThyIconComponent } from 'ngx-tethys/icon';
7
import {
8
    ThyActionMenuComponent,
9
    ThyActionMenuItemDirective,
10
    ThyActionMenuItemNameDirective,
11
    ThyActionMenuItemExtendIconDirective
12
} from 'ngx-tethys/action-menu';
13
import { NgIf, NgFor } from '@angular/common';
1✔
14

15
/**
×
16
 * @private
×
17
 */
×
18
@Component({
19
    // eslint-disable-next-line @angular-eslint/component-selector
20
    selector: 'date-range-optional',
21
    templateUrl: './optional-dates.component.html',
×
22
    standalone: true,
×
23
    imports: [
×
24
        NgIf,
25
        ThyActionMenuComponent,
26
        NgFor,
×
27
        ThyActionMenuItemDirective,
28
        ThyActionMenuItemNameDirective,
29
        ThyActionMenuItemExtendIconDirective,
30
        ThyIconComponent,
31
        ThyRangePickerDirective,
32
        FormsModule
×
33
    ]
34
})
1✔
35
export class OptionalDateRangesComponent implements OnInit {
36
    hiddenMenu = false;
37

38
    optionalDateRanges: DateRangeItemInfo[];
1✔
39

40
    customValue = '自定义';
41

42
    customKey: string;
43

44
    minDate: number | Date;
45

46
    maxDate: number | Date;
47

48
    disabledDate: (d: Date) => boolean;
49

50
    selectedDateRange: (date: DateRangeItemInfo) => void;
51

52
    calendarChange: (date: Date[]) => void;
53

54
    selectedDate: DateRangeItemInfo;
55

56
    constructor(private thyPopover: ThyPopover) {}
57

58
    ngOnInit() {}
59

60
    _selectDateRange(dateRange: DateRangeItemInfo) {
61
        this.selectedDate = dateRange;
62
        this.selectedDateRange(dateRange);
63
        this.thyPopover.close();
64
    }
65

66
    _selectedCustomDate(date: DateRangeItemInfo) {
67
        this.selectedDate = {
68
            begin: date.begin,
69
            end: date.end,
70
            key: this.customKey,
71
            text: this.customValue
72
        };
73
        this.selectedDateRange(this.selectedDate);
74
    }
75
}
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