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

atinc / ngx-tethys / 68ef226c-f83e-44c1-b8ed-e420a83c5d84

28 May 2025 10:31AM UTC coverage: 10.352% (-80.0%) from 90.316%
68ef226c-f83e-44c1-b8ed-e420a83c5d84

Pull #3460

circleci

pubuzhixing8
chore: xxx
Pull Request #3460: refactor(icon): migrate signal input #TINFR-1476

132 of 6823 branches covered (1.93%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 1 file covered. (71.43%)

11648 existing lines in 344 files now uncovered.

2078 of 14525 relevant lines covered (14.31%)

6.69 hits per line

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

26.67
/src/rate/rate-item.component.ts
1
import { Component, TemplateRef, input, output } from '@angular/core';
2
import { ThyIcon } from 'ngx-tethys/icon';
3
import { NgTemplateOutlet } from '@angular/common';
4
import { ThyStopPropagationDirective } from 'ngx-tethys/shared';
5
import { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';
6

7
/**
8
 * @private
9
 */
10
@Component({
11
    selector: 'thy-rate-item, [thy-rate-item]',
1✔
12
    template: `
UNCOV
13
        <div class="thy-rate-item-left" thyStopPropagation (mouseover)="hoverRateItem(true)" (click)="clickRateItem(true)">
×
UNCOV
14
            <ng-template [ngTemplateOutlet]="iconTemplate() || (iconValue() && character) || defaultTemplate"></ng-template>
×
UNCOV
15
        </div>
×
UNCOV
16
        <div class="thy-rate-item-all" thyStopPropagation (mouseover)="hoverRateItem(false)" (click)="clickRateItem(false)">
×
UNCOV
17
            <ng-template [ngTemplateOutlet]="iconTemplate() || (iconValue() && character) || defaultTemplate"></ng-template>
×
18
        </div>
19

UNCOV
20
        <ng-template #defaultTemplate>
×
21
            <thy-icon thyIconName="star-fill"></thy-icon>
22
        </ng-template>
UNCOV
23

×
24
        <ng-template #character>
25
            <thy-icon [thyIconName]="iconValue()"></thy-icon>
1✔
26
        </ng-template>
1✔
27
    `,
28
    imports: [ThyStopPropagationDirective, NgTemplateOutlet, ThyIcon]
29
})
30
export class ThyRateItem {
31
    readonly allowHalf = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });
32

33
    readonly iconValue = input<string>();
34

1✔
35
    readonly iconTemplate = input<TemplateRef<any>>();
36

37
    readonly itemHover = output<boolean>();
38

39
    readonly itemClick = output<boolean>();
40

41
    constructor() {}
42

43
    hoverRateItem(isHalf: boolean): void {
44
        this.itemHover.emit(isHalf && this.allowHalf());
45
    }
46

47
    clickRateItem(isHalf: boolean): void {
48
        this.itemClick.emit(isHalf && this.allowHalf());
49
    }
50
}
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