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

atinc / ngx-tethys / edbc1d43-1648-411a-a6bc-f24c9aa3f654

27 Mar 2025 06:13AM UTC coverage: 90.236% (+0.06%) from 90.179%
edbc1d43-1648-411a-a6bc-f24c9aa3f654

push

circleci

web-flow
Merge pull request #3282 from atinc/v19.0.0-next

5598 of 6865 branches covered (81.54%)

Branch coverage included in aggregate %.

8 of 8 new or added lines in 7 files covered. (100.0%)

157 existing lines in 46 files now uncovered.

13357 of 14141 relevant lines covered (94.46%)

992.51 hits per line

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

86.96
/src/progress/progress-strip.component.ts
1
import { Component, HostBinding, InjectionToken, Input, TemplateRef, ViewEncapsulation, numberAttribute, inject } from '@angular/core';
2
import { useHostRenderer } from '@tethys/cdk/dom';
3
import { ThyProgressType } from './interfaces';
4
import { NgStyle } from '@angular/common';
5

6
export interface ThyParentProgress {
1✔
7
    max: number;
8
    bars: ThyProgressStrip[];
9
}
10
export const THY_PROGRESS_COMPONENT = new InjectionToken<ThyParentProgress>('THY_PROGRESS_COMPONENT');
1✔
11

12
/**
27✔
13
 * @private
27✔
14
 */
27✔
15
@Component({
27✔
16
    selector: 'thy-progress-bar',
17
    templateUrl: './progress-strip.component.html',
18
    encapsulation: ViewEncapsulation.None,
28✔
19
    imports: [NgStyle]
20
})
21
export class ThyProgressStrip {
31!
UNCOV
22
    private progress = inject(THY_PROGRESS_COMPONENT);
×
23

24
    private value: number;
31✔
25

31✔
26
    private hostRenderer = useHostRenderer();
27

28
    color: string;
21✔
29

30
    @HostBinding(`class.progress-bar`) isProgressBar = true;
31

36✔
32
    @HostBinding('style.width.%') percent = 0;
33

1✔
34
    @Input() thyTips: string | TemplateRef<HTMLElement>;
35

36
    @Input() set thyType(type: ThyProgressType) {
37
        this.hostRenderer.updateClass(type ? [`progress-bar-${type}`] : []);
38
    }
39

40
    @Input({ transform: numberAttribute })
41
    set thyValue(value: number) {
42
        if (!value && value !== 0) {
1✔
43
            return;
44
        }
45
        this.value = value;
46
        this.recalculatePercentage();
47
    }
48

49
    @Input() set thyColor(color: string) {
50
        this.color = color || '';
51
    }
52

53
    recalculatePercentage(): void {
54
        this.percent = +((this.value / this.progress.max) * 100).toFixed(2);
55
    }
56
}
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