• 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

21.05
/src/shared/directives/thy-drag-drop.directive.ts
1
import { Directive, AfterContentInit, ContentChildren, QueryList, OnDestroy } from '@angular/core';
2
import { CdkDrag } from '@angular/cdk/drag-drop';
3
import { merge, Subject } from 'rxjs';
4
import { takeUntil, startWith } from 'rxjs/operators';
5

6
/**
7
 * @private
8
 */
9
@Directive({
1✔
10
    selector: '[thyDragDrop]'
UNCOV
11
})
×
12
export class ThyDragDropDirective implements AfterContentInit, OnDestroy {
13
    @ContentChildren(CdkDrag, { descendants: true }) draggables: QueryList<CdkDrag>;
UNCOV
14

×
UNCOV
15
    private ngUnsubscribe$ = new Subject<void>();
×
UNCOV
16

×
UNCOV
17
    constructor() {}
×
UNCOV
18

×
UNCOV
19
    ngAfterContentInit() {
×
UNCOV
20
        if (this.draggables) {
×
21
            this.draggables.changes.pipe(startWith(this.draggables)).subscribe(() => {
22
                this.ngUnsubscribe$.next();
23
                this.ngUnsubscribe$.complete();
UNCOV
24

×
25
                this.ngUnsubscribe$ = new Subject();
UNCOV
26
                merge(
×
27
                    ...this.draggables.toArray().map(dragRef => {
28
                        return dragRef.started;
UNCOV
29
                    })
×
30
                )
31
                    .pipe(takeUntil(this.ngUnsubscribe$))
32
                    .subscribe(() => {
33
                        document.body.classList.add('thy-dragging-body');
34
                    });
UNCOV
35

×
UNCOV
36
                merge(...this.draggables.toArray().map(dragRef => dragRef.released))
×
37
                    .pipe(takeUntil(this.ngUnsubscribe$))
38
                    .subscribe(() => {
1✔
39
                        document.body.classList.remove('thy-dragging-body');
1✔
40
                    });
41
            });
42
        }
43
    }
1✔
44

45
    ngOnDestroy(): void {
46
        this.ngUnsubscribe$.next();
47
        this.ngUnsubscribe$.complete();
48
    }
49
}
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