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

atinc / ngx-tethys / #71

06 Aug 2025 02:34AM UTC coverage: 9.672% (-80.6%) from 90.298%
#71

push

web-flow
feat(date-picker): add dateCellRender #TINFR-2386 (#3495) (#3499)

104 of 6813 branches covered (1.53%)

Branch coverage included in aggregate %.

1969 of 14620 relevant lines covered (13.47%)

6.13 hits per line

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

20.0
/src/progress/progress-strip.component.ts
1
import {
2
    Component,
3
    InjectionToken,
4
    computed,
5
    TemplateRef,
6
    ViewEncapsulation,
7
    numberAttribute,
1✔
8
    inject,
9
    input,
10
    effect,
11
    Signal
1✔
12
} from '@angular/core';
13
import { useHostRenderer } from '@tethys/cdk/dom';
×
14
import { ThyProgressType } from './interfaces';
×
15
import { NgStyle } from '@angular/common';
×
16

×
17
export interface ThyParentProgress {
×
18
    readonly max: Signal<number>;
19
    readonly bars: Signal<readonly ThyProgressStrip[]>;
20
}
×
21
export const THY_PROGRESS_COMPONENT = new InjectionToken<ThyParentProgress>('THY_PROGRESS_COMPONENT');
×
22

×
23
/**
×
24
 * @private
×
25
 */
26
@Component({
×
27
    selector: 'thy-progress-bar',
28
    templateUrl: './progress-strip.component.html',
×
29
    encapsulation: ViewEncapsulation.None,
×
30
    imports: [NgStyle],
×
31
    host: {
32
        class: 'progress-bar',
33
        '[style.width.%]': 'percent()'
1✔
34
    }
1✔
35
})
36
export class ThyProgressStrip {
37
    private progress = inject(THY_PROGRESS_COMPONENT);
38

39
    private hostRenderer = useHostRenderer();
40

41
    readonly thyTips = input<string | TemplateRef<HTMLElement>>(undefined);
1✔
42

43
    readonly thyType = input<ThyProgressType>();
44

45
    readonly thyValue = input(0, {
46
        transform: numberAttribute
47
    });
48

49
    readonly thyColor = input<string>();
50

51
    protected readonly percent = computed(() => {
52
        const value = this.thyValue();
53
        if (!value && value !== 0) {
54
            return 0;
55
        }
56
        return +((value / this.progress.max()) * 100).toFixed(2);
57
    });
58

59
    constructor() {
60
        effect(() => {
61
            const type = this.thyType();
62
            this.hostRenderer.updateClass(type ? [`progress-bar-${type}`] : []);
63
        });
64
    }
65
}
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

© 2026 Coveralls, Inc