All files / app/codeCharta/ui/ribbonBar/searchPanel/mapTreeView/mapTreeViewItemName mapTreeViewItemName.component.ts

100% Statements 13/13
100% Branches 0/0
100% Functions 1/1
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 365x 5x       5x 5x 5x 5x 5x 5x                 5x                     64x 64x 64x      
import { Component, Input } from "@angular/core"
import { Store } from "@ngrx/store"
import { Observable } from "rxjs"
 
import { CcState, CodeMapNode } from "../../../../../codeCharta.model"
import { rootUnarySelector } from "../../../../../state/selectors/accumulatedData/rootUnary.selector"
import { searchedNodePathsSelector } from "../../../../../state/selectors/searchedNodes/searchedNodePaths.selector"
import { areaMetricSelector } from "../../../../../state/store/dynamicSettings/areaMetric/areaMetric.selector"
import { NgPlural, NgPluralCase, AsyncPipe } from "@angular/common"
import { AreaMetricValidPipe } from "../areaMetricValidPipe.pipe"
import { IsNodeLeafPipe } from "../isNodeLeaf.pipe"
 
@Component({
    selector: "cc-map-tree-view-item-name",
    templateUrl: "./mapTreeViewItemName.component.html",
    styleUrls: ["./mapTreeViewItemName.component.scss"],
    standalone: true,
    imports: [NgPlural, NgPluralCase, AsyncPipe, AreaMetricValidPipe, IsNodeLeafPipe]
})
export class MapTreeViewItemNameComponent {
    @Input() node: CodeMapNode
    @Input() isHovered: boolean
    @Input() unaryValue: number
    @Input() unaryPercentage: number
 
    searchedNodePaths$: Observable<Set<string>>
    rootUnary$: Observable<number>
    areaMetric$: Observable<string>
 
    constructor(store: Store<CcState>) {
        this.searchedNodePaths$ = store.select(searchedNodePathsSelector)
        this.rootUnary$ = store.select(rootUnarySelector)
        this.areaMetric$ = store.select(areaMetricSelector)
    }
}