• 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

10.0
/projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-actions-base.directive.ts
1
import { IgxGridActionButtonComponent } from './grid-action-button.component';
2
import { Directive, Input, AfterViewInit, QueryList, ViewChildren, IterableDiffers, booleanAttribute } from '@angular/core';
3
import { IgxActionStripComponent } from '../action-strip.component';
4
import { IgxRowDirective } from '../../grids/row.directive';
5
import { IgxIconService } from '../../icon/icon.service';
6

7
/* blazorElement */
8
/* contentParent: ActionStrip */
9
/* wcElementTag: igc-grid-action-base-directive */
10
/* jsonAPIManageCollectionInMarkup */
11
/* blazorIndirectRender */
12
@Directive({
13
    selector: '[igxGridActionsBase]',
14
    standalone: true
15
})
16
export class IgxGridActionsBaseDirective implements AfterViewInit {
2✔
17
    /** @hidden @internal **/
18
    @ViewChildren(IgxGridActionButtonComponent)
19
    public buttons: QueryList<IgxGridActionButtonComponent>;
20

21
    /**
22
     * Gets/Sets if the action buttons will be rendered as menu items. When in menu, items will be rendered with text label.
23
     *
24
     * @example
25
     * ```html
26
     *  <igx-grid-pinning-actions [asMenuItems]='true'></igx-grid-pinning-actions>
27
     *  <igx-grid-editing-actions [asMenuItems]='true'></igx-grid-editing-actions>
28
     * ```
29
     */
30
    @Input({ transform: booleanAttribute })
UNCOV
31
    public asMenuItems = false;
×
32

33
    /** @hidden @internal **/
34
    public strip: IgxActionStripComponent;
35

36
    /**
37
     * @hidden
38
     * @internal
39
     */
40
    public get grid() {
UNCOV
41
        return this.strip.context.grid;
×
42
    }
43

44
    /**
45
     * Getter to be used in template
46
     *
47
     * @hidden
48
     * @internal
49
     */
50
    public get isRowContext(): boolean {
UNCOV
51
        return this.isRow(this.strip?.context) && !this.strip.context.inEditMode;
×
52
    }
53

UNCOV
54
    constructor(protected iconService: IgxIconService,
×
UNCOV
55
        protected differs: IterableDiffers) { }
×
56

57
    /**
58
     * @hidden
59
     * @internal
60
     */
61
    public ngAfterViewInit() {
UNCOV
62
        if (this.asMenuItems) {
×
UNCOV
63
            this.buttons.changes.subscribe(() => {
×
UNCOV
64
                this.strip.cdr.detectChanges();
×
65
            });
66
        }
67
    }
68

69
    /**
70
     * Check if the param is a row from a grid
71
     *
72
     * @hidden
73
     * @internal
74
     * @param context
75
     */
76
    protected isRow(context): context is IgxRowDirective {
UNCOV
77
        return context && context instanceof IgxRowDirective;
×
78
    }
79
}
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