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

atinc / ngx-tethys / #55

30 Jul 2025 07:08AM UTC coverage: 9.866% (-80.4%) from 90.297%
#55

push

why520crazy
feat(empty): add setMessage for update display text #TINFR-2616

92 of 6794 branches covered (1.35%)

Branch coverage included in aggregate %.

2014 of 14552 relevant lines covered (13.84%)

6.15 hits per line

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

18.18
/src/date-range/optional-dates/optional-dates.component.ts
1
import { Component, OnInit, Signal, inject } 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 { ThyIcon } from 'ngx-tethys/icon';
7
import {
8
    ThyDropdownMenuComponent,
9
    ThyDropdownMenuItemDirective,
10
    ThyDropdownMenuItemNameDirective,
11
    ThyDropdownMenuItemExtendIconDirective
12
} from 'ngx-tethys/dropdown';
13
import { injectLocale, ThyDateRangeLocale } from 'ngx-tethys/i18n';
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
    imports: [
×
23
        ThyDropdownMenuComponent,
×
24
        ThyDropdownMenuItemDirective,
×
25
        ThyDropdownMenuItemNameDirective,
26
        ThyDropdownMenuItemExtendIconDirective,
27
        ThyIcon,
×
28
        ThyRangePickerDirective,
29
        FormsModule
30
    ]
31
})
32
export class OptionalDateRanges implements OnInit {
33
    private thyPopover = inject(ThyPopover);
×
34
    private locale: Signal<ThyDateRangeLocale> = injectLocale('dateRange');
35

36
    hiddenMenu = false;
1✔
37

38
    optionalDateRanges: DateRangeItemInfo[];
39

40
    customValue = this.locale().custom;
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
    ngOnInit() {}
57

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

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