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

atinc / ngx-tethys / aefe1666-7ec3-4957-aaeb-b7f919a65668

04 Sep 2023 10:13AM UTC coverage: 90.206% (+0.006%) from 90.2%
aefe1666-7ec3-4957-aaeb-b7f919a65668

Pull #2829

circleci

cmm-va
Merge branch 'cmm/#INFR-9451' of github.com:atinc/ngx-tethys into cmm/#INFR-9451
Pull Request #2829: fix: add tabIndex

5163 of 6383 branches covered (0.0%)

Branch coverage included in aggregate %.

60 of 60 new or added lines in 13 files covered. (100.0%)

13028 of 13783 relevant lines covered (94.52%)

971.37 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