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

atinc / ngx-tethys / 8a6ba229-c82f-4a21-a1ed-95461f2ad66c

04 Sep 2023 08:37AM UTC coverage: 90.196% (-0.004%) from 90.2%
8a6ba229-c82f-4a21-a1ed-95461f2ad66c

Pull #2829

circleci

cmm-va
fix: delete f
Pull Request #2829: fix: add tabIndex

5164 of 6386 branches covered (0.0%)

Branch coverage included in aggregate %.

78 of 78 new or added lines in 26 files covered. (100.0%)

13024 of 13779 relevant lines covered (94.52%)

971.69 hits per line

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

87.5
/src/radio/button/radio-button.component.ts
1
import { Component, OnInit, HostBinding, HostListener, Input, Optional, ChangeDetectorRef } from '@angular/core';
2
import { ThyTranslate } from 'ngx-tethys/core';
3
import { ThyRadioGroupComponent } from './../group/radio-group.component';
4
import { coerceBooleanProperty } from 'ngx-tethys/util';
5
import { ThyRadioComponent } from '../radio.component';
6

7
/**
8
 * @name [thy-radio-button],[thyRadioButton]
9
 */
10
@Component({
11
    // eslint-disable-next-line @angular-eslint/component-selector
1✔
12
    selector: '[thy-radio-button],[thyRadioButton]',
13
    templateUrl: './radio-button.component.html',
12✔
14
    standalone: true,
12✔
15
    host: {
16
        '[attr.tabindex]': `tabIndex`
17
    }
5✔
18
})
5✔
19
export class ThyRadioButtonComponent extends ThyRadioComponent implements OnInit {
5✔
20
    @HostBinding('class.btn') isButton = true;
21
    @HostBinding('class.active') isActive = false;
22

5✔
23
    name: string;
5!
24

5✔
25
    @Input() thyValue: string;
5✔
26

27
    set thyChecked(value: boolean) {
28
        this.isActive = !!value;
29
        this.writeValue(coerceBooleanProperty(value));
×
30
    }
31

1✔
32
    constructor(
33
        thyTranslate: ThyTranslate,
34
        @Optional() thyRadioGroupComponent: ThyRadioGroupComponent,
35
        changeDetectorRef: ChangeDetectorRef
36
    ) {
1✔
37
        super(thyTranslate, thyRadioGroupComponent, changeDetectorRef);
38
    }
39

40
    ngOnInit() {
41
        this._isFormCheck = false;
42
        if (this.thyRadioGroupComponent) {
43
            this.thyRadioGroupComponent.addRadio(this);
1✔
44
            this.thyRadioGroupComponent.setGroup();
45
        }
46
    }
47

48
    @HostListener('click', ['$event'])
49
    click($event: MouseEvent) {
50
        this.change();
51
    }
52
}
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