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

IgniteUI / igniteui-angular / 13331632524

14 Feb 2025 02:51PM CUT coverage: 22.015% (-69.6%) from 91.622%
13331632524

Pull #15372

github

web-flow
Merge d52d57714 into bcb78ae0a
Pull Request #15372: chore(*): test ci passing

1990 of 15592 branches covered (12.76%)

431 of 964 new or added lines in 18 files covered. (44.71%)

19956 existing lines in 307 files now uncovered.

6452 of 29307 relevant lines covered (22.02%)

249.17 hits per line

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

20.0
/projects/igniteui-angular/src/lib/directives/hint/hint.directive.ts
1
import { Directive, HostBinding, Input, OnInit } from '@angular/core';
2

3
enum IgxHintPosition {
2✔
4
    START,
2✔
5
    END
2✔
6
}
7

8
@Directive({
9
    selector: 'igx-hint,[igxHint]',
10
    standalone: true
11
})
12
export class IgxHintDirective implements OnInit {
2✔
13
    /**
14
     * Sets/gets whether the hint position is at the start.
15
     * Default value is `false`.
16
     * ```typescript
17
     * @ViewChild('hint', {read: IgxHintDirective})
18
     * public igxHint: IgxHintDirective;
19
     * this.igxHint.isPositionStart = true;
20
     * ```
21
     * ```typescript
22
     * let isHintPositionStart = this.igxHint.isPositionStart;
23
     * ```
24
     *
25
     * @memberof IgxHintDirective
26
     */
27
    @HostBinding('class.igx-input-group__hint-item--start')
UNCOV
28
    public isPositionStart = false;
×
29
    /**
30
     * Sets/gets whether the hint position is at the end.
31
     * Default value is `false`.
32
     * ```typescript
33
     * @ViewChild('hint', {read: IgxHintDirective})
34
     * public igxHint: IgxHintDirective;
35
     * this.igxHint.isPositionEnd = true;
36
     * ```
37
     * ```typescript
38
     * let isHintPositionEnd = this.igxHint.isPositionEnd;
39
     * ```
40
     *
41
     * @memberof IgxHintDirective
42
     */
43
    @HostBinding('class.igx-input-group__hint-item--end')
UNCOV
44
    public isPositionEnd = false;
×
45

UNCOV
46
    private _position: IgxHintPosition = IgxHintPosition.START;
×
47
    /**
48
     * Sets the position of the hint.
49
     * ```html
50
     * <igx-input-group>
51
     *  <input igxInput type="text"/>
52
     *  <igx-hint #hint [position]="'start'">IgxHint displayed at the start</igx-hint>
53
     * </igx-input-group>
54
     * ```
55
     *
56
     * @memberof IgxHintDirective
57
     */
58
    @Input()
59
    public set position(value: string) {
UNCOV
60
        const position: IgxHintPosition = (IgxHintPosition as any)[value.toUpperCase()];
×
UNCOV
61
        if (position !== undefined) {
×
UNCOV
62
            this._position = position;
×
UNCOV
63
            this._applyPosition(this._position);
×
64
        }
65
    }
66
    /**
67
     * Gets the position of the hint.
68
     * ```typescript
69
     * @ViewChild('hint', {read: IgxHintDirective})
70
     * public igxHint: IgxHintDirective;
71
     * let hintPosition =  this.igxHint.position;
72
     * ```
73
     *
74
     * @memberof IgxHintDirective
75
     */
76
    public get position() {
77
        return this._position.toString();
×
78
    }
79
    /**
80
     * @hidden
81
     */
82
    public ngOnInit() {
UNCOV
83
        this._applyPosition(this._position);
×
84
    }
85

86
    private _applyPosition(position: IgxHintPosition) {
UNCOV
87
        this.isPositionStart = this.isPositionEnd = false;
×
UNCOV
88
        switch (position) {
×
89
            case IgxHintPosition.START:
UNCOV
90
                this.isPositionStart = true;
×
UNCOV
91
                break;
×
92
            case IgxHintPosition.END:
UNCOV
93
                this.isPositionEnd = true;
×
UNCOV
94
                break;
×
95
            default: break;
×
96
        }
97
    }
98
}
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