• 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

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

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

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

14
export type MentionInputorElement = HTMLTextAreaElement | HTMLInputElement;
×
15
export abstract class MentionAdapter {
16
    inputor: MentionInputorElement;
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