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

IgniteUI / igniteui-angular / 13331632524

14 Feb 2025 02:51PM UTC 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

84.62
/projects/igniteui-angular/src/lib/directives/divider/divider.directive.ts
1
import { Directive, HostBinding, Input, booleanAttribute } from '@angular/core';
2
import { mkenum } from '../../core/utils';
3

4
export const IgxDividerType = /*@__PURE__*/mkenum({
2✔
5
    SOLID: 'solid',
6
    DASHED: 'dashed'
7
});
8
export type IgxDividerType = (typeof IgxDividerType)[keyof typeof IgxDividerType];
9

10
let NEXT_ID = 0;
2✔
11

12
@Directive({
13
    selector: 'igx-divider',
14
    standalone: true
15
})
16
export class IgxDividerDirective {
2✔
17
    /**
18
     * Sets/gets the `id` of the divider.
19
     * If not set, `id` will have value `"igx-divider-0"`;
20
     * ```html
21
     * <igx-divider id="my-divider"></igx-divider>
22
     * ```
23
     * ```typescript
24
     * let dividerId =  this.divider.id;
25
     * ```
26
     */
27
    @HostBinding('attr.id')
28
    @Input()
29
    public id = `igx-divider-${NEXT_ID++}`;
2✔
30

31
    /**
32
     * Sets the value of `role` attribute.
33
     * If not the default value of `separator` will be used.
34
     */
35
    @HostBinding('attr.role')
36
    @Input()
37
    public role = 'separator';
2✔
38

39
    /**
40
     * Sets the type of the divider. The default value
41
     * is `default`. The divider can also be `dashed`;
42
     * ```html
43
     * <igx-divider type="dashed"></igx-divider>
44
     * ```
45
     */
46
    @HostBinding('class.igx-divider')
47
    @Input()
48
    public type: IgxDividerType | string = IgxDividerType.SOLID;
2✔
49

50
    @HostBinding('class.igx-divider--dashed')
51
    public get isDashed() {
52
        return this.type === IgxDividerType.DASHED;
20✔
53
    }
54

55
    /**
56
     * If set to `true` and an `inset` value has been provided,
57
     * the divider will start shrinking from both ends.
58
     * ```html
59
     * <igx-divider [middle]="true"></igx-divider>
60
     * ```
61
     */
62
    @HostBinding('class.igx-divider--inset')
63
    @Input({ transform: booleanAttribute })
64
    public middle = false;
2✔
65

66
    /**
67
     * Sets the divider in vertical orientation.
68
     * ```html
69
     * <igx-divider [vertical]="true"></igx-divider>
70
     * ```
71
     */
72
    @HostBinding('class.igx-divider--vertical')
73
    @Input({ transform: booleanAttribute })
74
    public vertical = false;
2✔
75

76
    /**
77
     * Sets the inset of the divider from the side(s).
78
     * If the divider attribute `middle` is set to `true`,
79
     * it will inset the divider on both sides.
80
     * ```typescript
81
     * this.divider.inset = '32px';
82
     * ```
83
     */
84
    @HostBinding('style.--inset')
85
    @Input()
86
    public set inset(value: string) {
UNCOV
87
        this._inset = value;
×
88
    }
89

90
    /**
91
     * Gets the current divider inset in terms of
92
     * inset-inline-start representation as applied to the divider.
93
     * ```typescript
94
     * const inset = this.divider.inset;
95
     * ```
96
     */
97
    public get inset() {
98
        return this._inset;
20✔
99
    }
100

101
    /**
102
     * Sets the value of the `inset` attribute.
103
     * If not provided it will be set to `'0'`.
104
     * ```html
105
     * <igx-divider inset="16px"></igx-divider>
106
     * ```
107
     */
108
    private _inset = '0';
2✔
109

110
    /**
111
     * A getter that returns `true` if the type of the divider is `default`;
112
     * ```typescript
113
     * const isDefault = this.divider.isDefault;
114
     * ```
115
     */
116
    public get isSolid() {
117
        return this.type === IgxDividerType.SOLID;
×
118
    }
119

120
}
121

122

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