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

atinc / ngx-tethys / 81f087e7-cb7d-4a5c-add8-ace5133e7e84

27 May 2025 08:22AM UTC coverage: 10.045% (-80.2%) from 90.262%
81f087e7-cb7d-4a5c-add8-ace5133e7e84

Pull #3457

circleci

pubuzhixing8
chore: remove useless code
Pull Request #3457: refactor(flexible-text): migrate to signal for flexible-text #TINFR-1471

108 of 6835 branches covered (1.58%)

Branch coverage included in aggregate %.

17 of 17 new or added lines in 1 file covered. (100.0%)

11669 existing lines in 344 files now uncovered.

2036 of 14508 relevant lines covered (14.03%)

6.24 hits per line

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

0.0
/src/mention/adapter/adapter.ts
1
import { MentionDefaultDataItem, Mention } from '../interfaces';
2

UNCOV
3
export interface SeekQueryResult {
×
4
    term: string;
5
    start: number;
UNCOV
6
    end: number;
×
UNCOV
7
}
×
UNCOV
8

×
UNCOV
9
export interface MatchedMention<T = MentionDefaultDataItem> {
×
UNCOV
10
    query: SeekQueryResult;
×
11
    mention: Mention<T>;
12
}
13

UNCOV
14
export type MentionInputorElement = HTMLTextAreaElement | HTMLInputElement;
×
15
export abstract class MentionAdapter {
16
    inputor: MentionInputorElement;
UNCOV
17

×
18
    matchedMention: MatchedMention;
19

20
    constructor(inputor: MentionInputorElement) {
21
        this.inputor = inputor;
22
    }
23

24
    abstract seekQuery(event: Event, mention: Mention): SeekQueryResult;
25

26
    abstract insertMention(item: MentionDefaultDataItem): string;
27

28
    lookup(event: Event, mentions: Mention[]) {
29
        this.matchedMention = null;
30
        for (const mention of mentions) {
31
            const query = this.seekQuery(event, mention);
32
            if (query) {
33
                this.matchedMention = {
34
                    query: query,
35
                    mention: mention
36
                };
37
                break;
38
            }
39
        }
40
        return this.matchedMention;
41
    }
42
}
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