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

IgniteUI / igniteui-angular / 12667699604

08 Jan 2025 09:26AM CUT coverage: 91.596%. Remained the same
12667699604

Pull #14587

github

web-flow
Merge 5282883c3 into 65dd16203
Pull Request #14587: chore(demos): strict templates, import warnings, update dock manager demo

12985 of 15225 branches covered (85.29%)

26321 of 28736 relevant lines covered (91.6%)

34021.18 hits per line

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

60.61
/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>();
509✔
10
    protected state: Map<string, IgxRowIslandComponent> = new Map<string, IgxRowIslandComponent>();
509✔
11
    protected destroyMap: Map<string, Subject<boolean>> = new Map<string, Subject<boolean>>();
509✔
12

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

16
    public register(rowIsland: IgxRowIslandComponent) {
17
        this.state.set(rowIsland.id, rowIsland);
509✔
18
        this.destroyMap.set(rowIsland.id, new Subject<boolean>());
509✔
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);
509✔
31
        this.destroyMap.delete(id);
509✔
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);
213✔
51
        this.destroyMap.set(rowIsland.key, new Subject<boolean>());
213✔
52
    }
53

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

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

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

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

78
        return allChildren;
213✔
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