• 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

35.71
/src/rate/rate-item.component.ts
1
import { Component, EventEmitter, Input, OnInit, Output, TemplateRef } from '@angular/core';
2
import { ThyIconComponent } from 'ngx-tethys/icon';
3
import { NgTemplateOutlet } from '@angular/common';
4
import { ThyStopPropagationDirective } from 'ngx-tethys/shared';
5
import { InputBoolean } from 'ngx-tethys/core';
6

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

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

1✔
24
        <ng-template #character>
1✔
25
            <thy-icon [thyIconName]="iconValue"></thy-icon>
26
        </ng-template>
27
    `,
28
    standalone: true,
29
    imports: [ThyStopPropagationDirective, NgTemplateOutlet, ThyIconComponent]
30
})
31
export class ThyRateItemComponent implements OnInit {
32
    @Input() @InputBoolean() allowHalf = false;
1✔
33

34
    @Input() iconValue: string;
35

36
    @Input() iconTemplate: TemplateRef<any>;
1✔
37

38
    @Output() readonly itemHover = new EventEmitter<boolean>();
39

40
    @Output() readonly itemClick = new EventEmitter<boolean>();
41

42
    constructor() {}
43

44
    ngOnInit() {}
45

46
    hoverRateItem(isHalf: boolean): void {
47
        this.itemHover.next(isHalf && this.allowHalf);
48
    }
49

50
    clickRateItem(isHalf: boolean): void {
51
        this.itemClick.next(isHalf && this.allowHalf);
52
    }
53
}
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