• 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

13.64
/src/guider/guider.directive.ts
1
import { ThyGuiderManager } from './guider-manager';
2
import { AfterViewInit, Directive, ElementRef, OnDestroy, OnInit, NgZone, inject, input } from '@angular/core';
3
import { take } from 'rxjs/operators';
4

5
/**
6
 * 标记新手引导的步骤的target,使用指令方式的新手引导支持多路由跳转
7
 * @name thyGuiderTarget
8
 * @order 40
9
 */
10
@Directive({
11
    selector: '[thyGuiderTarget]',
1✔
12
    exportAs: 'thyGuiderTarget'
UNCOV
13
})
×
UNCOV
14
export class ThyGuiderTargetDirective implements OnInit, OnDestroy, AfterViewInit {
×
UNCOV
15
    private guiderManager = inject(ThyGuiderManager);
×
UNCOV
16
    private el = inject(ElementRef);
×
17
    private ngZone = inject(NgZone);
18

UNCOV
19
    /**
×
UNCOV
20
     * 标记当前元素对应的新手引导中 step 的 key
×
UNCOV
21
     */
×
UNCOV
22
    readonly target = input<string>(undefined, { alias: 'thyGuiderTarget' });
×
UNCOV
23

×
UNCOV
24
    ngOnInit() {
×
UNCOV
25
        this.guiderManager.addStepTarget(this.target(), this.el.nativeElement);
×
26
        this.ngZone.onStable.pipe(take(1)).subscribe(() => {
27
            const { key, guiderRef } = this.guiderManager.getActive();
28
            if (key === this.target()) {
29
                const index = guiderRef.steps.findIndex(step => step.key === this.target());
30
                this.ngZone.run(() => {
31
                    guiderRef.active(index);
UNCOV
32
                });
×
UNCOV
33
            }
×
UNCOV
34
        });
×
35
    }
UNCOV
36

×
37
    ngAfterViewInit() {}
38

1✔
39
    ngOnDestroy() {
40
        const { guiderRef } = this.guiderManager.getActive();
41
        if (guiderRef) {
42
            guiderRef.close();
1✔
43
        }
44
        this.guiderManager.removeStepTarget(this.target());
45
    }
46
}
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