• 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

42.42
/projects/igniteui-angular/src/lib/grids/hierarchical-grid/row-island-api.service.ts
1
import { IgxHierarchicalGridComponent } from './hierarchical-grid.component';
2
import { IgxRowIslandComponent } from './row-island.component';
3
import { Subject } from 'rxjs';
4
import { Injectable } from '@angular/core';
5

6
@Injectable()
7
export class IgxRowIslandAPIService {
2✔
8
    public rowIsland: IgxRowIslandComponent;
9
    public change: Subject<any> = new Subject<any>();
2✔
10
    protected state: Map<string, IgxRowIslandComponent> = new Map<string, IgxRowIslandComponent>();
2✔
11
    protected destroyMap: Map<string, Subject<boolean>> = new Map<string, Subject<boolean>>();
2✔
12

13
    protected childRowIslands: Map<string, IgxRowIslandComponent> = new Map<string, IgxRowIslandComponent>();
2✔
14
    protected childGrids:  Map<any, IgxHierarchicalGridComponent> = new Map<any, IgxHierarchicalGridComponent>();
2✔
15

16
    public register(rowIsland: IgxRowIslandComponent) {
17
        this.state.set(rowIsland.id, rowIsland);
2✔
18
        this.destroyMap.set(rowIsland.id, new Subject<boolean>());
2✔
19
    }
20

21
    public unsubscribe(rowIsland: IgxRowIslandComponent) {
22
        this.state.delete(rowIsland.id);
×
23
    }
24

25
    public get(id: string): IgxRowIslandComponent {
26
        return this.state.get(id);
×
27
    }
28

29
    public unset(id: string) {
30
        this.state.delete(id);
2✔
31
        this.destroyMap.delete(id);
2✔
32
    }
33

34
    public reset(oldId: string, newId: string) {
35
        const destroy = this.destroyMap.get(oldId);
×
36
        const rowIsland = this.get(oldId);
×
37

38
        this.unset(oldId);
×
39

40
        if (rowIsland) {
×
41
            this.state.set(newId, rowIsland);
×
42
        }
43

44
        if (destroy) {
×
45
            this.destroyMap.set(newId, destroy);
×
46
        }
47
    }
48

49
    public registerChildRowIsland(rowIsland: IgxRowIslandComponent) {
50
        this.childRowIslands.set(rowIsland.key, rowIsland);
1✔
51
        this.destroyMap.set(rowIsland.key, new Subject<boolean>());
1✔
52
    }
53

54
    public unsetChildRowIsland(rowIsland: IgxRowIslandComponent) {
55
        this.childRowIslands.delete(rowIsland.key);
1✔
56
        this.destroyMap.delete(rowIsland.key);
1✔
57
    }
58

59
    public getChildRowIsland(rowIslandKey: string) {
60
        return this.childRowIslands.get(rowIslandKey);
×
61
    }
62

63
    public registerChildGrid(parentRowID: any, grid: IgxHierarchicalGridComponent) {
UNCOV
64
        this.childGrids.set(parentRowID, grid);
×
65
    }
66

67
    public getChildGrids(inDepth?: boolean) {
UNCOV
68
        let allChildren = [];
×
UNCOV
69
        this.childGrids.forEach((grid) => {
×
UNCOV
70
            allChildren.push(grid);
×
71
        });
UNCOV
72
        if (inDepth) {
×
73
            this.childRowIslands.forEach((layout) => {
×
74
                allChildren = allChildren.concat(layout.rowIslandAPI.getChildGrids(inDepth));
×
75
            });
76
        }
77

UNCOV
78
        return allChildren;
×
79
    }
80

81
    public getChildGridByID(rowID) {
82
        return this.childGrids.get(rowID);
×
83
    }
84
}
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