• 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

25.0
/src/timeline/timeline-item.component.ts
1
import {
2
    Component,
3
    Input,
4
    HostBinding,
5
    OnInit,
6
    OnChanges,
7
    ContentChild,
8
    TemplateRef,
9
    ViewChild,
10
    ChangeDetectorRef,
11
    ChangeDetectionStrategy,
1✔
12
    SimpleChanges
13
} from '@angular/core';
×
14
import { SafeAny } from 'ngx-tethys/types';
×
15
import { ThyTimeMode } from './timeline.component';
16
import { ThyTimelineService } from './timeline.service';
17
import { NgIf, NgTemplateOutlet } from '@angular/common';
18

×
19
export type thyColor = 'primary' | 'success' | 'warning' | 'danger' | 'info';
×
20

×
21
/**
×
22
 * 时间轴节点组件
×
23
 * @name thy-timeline-item
×
24
 * @order 20
25
 */
26
@Component({
×
27
    changeDetection: ChangeDetectionStrategy.OnPush,
28
    selector: 'thy-timeline-item',
29
    templateUrl: './timeline-item.component.html',
×
30
    exportAs: 'ThyTimelineItem',
31
    standalone: true,
32
    imports: [NgIf, NgTemplateOutlet]
1✔
33
})
34
export class ThyTimelineItemComponent implements OnInit, OnChanges {
35
    @ViewChild('timelineItem', { static: false }) template: TemplateRef<void>;
36

1✔
37
    @HostBinding('class') className: string;
38

39
    public color: thyColor = 'primary';
40

41
    public isLast = false;
42

43
    public isFirst = false;
44

45
    public position: ThyTimeMode;
1✔
46

47
    public reverse: Boolean = false;
48

49
    /**
50
     * 指定圆圈颜色
51
     * @type primary | success | warning | danger | info
52
     * @default primary
53
     */
54
    @Input()
55
    set thyColor(value: thyColor) {
56
        if (value) {
57
            this.color = value;
58
        }
59
    }
60

61
    /**
62
     * 自定义节点位置
63
     * @type left | right | center
64
     */
65
    @Input() thyPosition: ThyTimeMode;
66

67
    /**
68
     * 自定义时间轴点模板
69
     * @type TemplateRef
70
     */
71
    @ContentChild('dot', { static: false }) dot: TemplateRef<SafeAny>;
72

73
    /**
74
     * 自定义另一侧的模板
75
     * @type TemplateRef
76
     */
77
    @ContentChild('description', { static: false }) description: TemplateRef<SafeAny>;
78

79
    constructor(private cdr: ChangeDetectorRef, private timelineService: ThyTimelineService) {}
80

81
    detectChanges(): void {
82
        this.cdr.detectChanges();
83
    }
84

85
    ngOnChanges(changes: SimpleChanges): void {
86
        this.timelineService.markForCheck();
87
    }
88

89
    ngOnInit() {}
90
}
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