All files / Scripts/row Row.ts

100% Statements 11/11
100% Branches 2/2
100% Functions 6/6
100% Lines 11/11

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 2510x   588x 588x 588x 588x 588x                     60x 1156x 43x 640x   11x    
export class Row {
    constructor(header: string, label: string, headerName: string) {
        this.header = header;
        this.label = label;
        this.headerName = headerName;
        this.url = "";
        this.valueInternal = "";
    }
 
    [index: string]: unknown;
    protected valueInternal: string;
    header: string;
    label: string;
    headerName: string;
    url: string;
    onGetUrl?: (headerName: string, value: string) => string;
 
    public set value(value: string) { this.valueInternal = value; }
    get value(): string { return this.valueInternal; }
    get valueUrl(): string { return this.onGetUrl ? this.onGetUrl(this.headerName, this.valueInternal) : ""; }
    get id(): string { return this.header + "_id"; }
 
    toString(): string { return this.label + ": " + this.value; }
}