Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValueColumn<T>

a column having an accessor to get the cell value

Type parameters

  • T

Hierarchy

Index

Constructors

Properties

desc: Readonly<IColumnDesc>
parent: Readonly<IColumnParent> = null

parent column of this column, set when added to a ranking or combined column

EVENT_DATA_LOADED: "dataLoaded" = 'dataLoaded'
EVENT_DIRTY: "dirty" = 'dirty'
EVENT_DIRTY_CACHES: "dirtyCaches" = 'dirtyCaches'
EVENT_DIRTY_HEADER: "dirtyHeader" = 'dirtyHeader'
EVENT_DIRTY_VALUES: "dirtyValues" = 'dirtyValues'
EVENT_GROUP_RENDERER_TYPE_CHANGED: "groupRendererChanged" = 'groupRendererChanged'
EVENT_LABEL_CHANGED: "labelChanged" = 'labelChanged'
EVENT_METADATA_CHANGED: "metaDataChanged" = 'metaDataChanged'
EVENT_RENDERER_TYPE_CHANGED: "rendererTypeChanged" = 'rendererTypeChanged'
EVENT_SUMMARY_RENDERER_TYPE_CHANGED: "summaryRendererChanged" = 'summaryRendererChanged'
EVENT_VISIBILITY_CHANGED: "visibilityChanged" = 'visibilityChanged'
EVENT_WIDTH_CHANGED: "widthChanged" = 'widthChanged'
FLAT_ALL_COLUMNS: -1 = -1

magic variable for showing all columns

RENDERER_LOADING: "loading" = 'loading'

Accessors

  • get description(): string
  • get fixed(): boolean
  • get fqid(): string
  • returns the fully qualified id i.e. path the parent

    Returns string

  • get fqpath(): string
  • get frozen(): boolean
  • get id(): string
  • get label(): string

Methods

  • assignNewId(idGenerator: () => string): void
  • clearFilter(): boolean
  • createEventList(): string[]
  • detach(): void
  • dump(toDescRef: (desc: any) => any): any
  • patch the dump such that the loaded attribute is defined (for lazy loading columns)

    Parameters

    • toDescRef: (desc: any) => any
        • (desc: any): any
        • Parameters

          • desc: any

          Returns any

    Returns any

  • filter(row: IDataRow, _valueCache?: any): boolean
  • fire(type: string | string[], ...args: any[]): void
  • flatten(r: IFlatColumn[], offset: number, _levelsToGo?: number, _padding?: number): number
  • visitor pattern for flattening the columns

    Parameters

    • r: IFlatColumn[]

      the result array

    • offset: number

      left offset

    • _levelsToGo: number = 0

      how many levels down

    • _padding: number = 0

      padding between columns

    Returns number

    the used width by this column

  • forward(from: IEventHandler, ...types: string[]): void
  • forwards one or more events from a given dispatcher to the current one i.e. when one of the given events is fired in 'from' it will be forwarded to all my listeners

    Parameters

    • from: IEventHandler

      the event dispatcher to forward from

    • Rest ...types: string[]

      the event types to forward

    Returns void

  • getExportValue(row: IDataRow, format: "text" | "json"): any
  • getGroupRenderer(): string
  • getRenderer(): string
  • getSummaryRenderer(): string
  • getVisible(): boolean
  • getWidth(): number
  • groupByMe(): boolean
  • groupSortByMe(ascending?: boolean, priority?: number): boolean
  • hide(): void
  • insertAfterMe(col: Column): boolean
  • insertBeforeMe(col: Column): boolean
  • isFiltered(): boolean
  • isGroupSortedByMe(): { asc: "asc" | "desc"; priority: number }
  • isGroupedBy(): number
  • isLoaded(): boolean
  • isSortedByMe(): { asc: "asc" | "desc"; priority: number }
  • isVisible(): boolean
  • listenersChanged(_type: string, _active: boolean): void
  • markDirty(type?: "header" | "values" | "all"): void
  • marks the header, values, or both as dirty such that the values are reevaluated

    Parameters

    • type: "header" | "values" | "all" = 'all'

      specify in more detail what is dirty, by default whole column

    Returns void

  • on(type: "dataLoaded", listener: (previous: boolean, current: boolean) => void): ValueColumn<T>
  • on(type: "widthChanged", listener: (previous: number, current: number) => void): ValueColumn<T>
  • on(type: "labelChanged", listener: (previous: string, current: string) => void): ValueColumn<T>
  • on(type: "metaDataChanged", listener: (previous: IColumnMetaData, current: IColumnMetaData) => void): ValueColumn<T>
  • on(type: "dirty", listener: () => void): ValueColumn<T>
  • on(type: "dirtyHeader", listener: () => void): ValueColumn<T>
  • on(type: "dirtyValues", listener: () => void): ValueColumn<T>
  • on(type: "dirtyCaches", listener: () => void): ValueColumn<T>
  • on(type: "rendererTypeChanged", listener: (previous: string, current: string) => void): ValueColumn<T>
  • on(type: "groupRendererChanged", listener: (previous: string, current: string) => void): ValueColumn<T>
  • on(type: "summaryRendererChanged", listener: (previous: string, current: string) => void): ValueColumn<T>
  • on(type: "visibilityChanged", listener: (previous: boolean, current: boolean) => void): ValueColumn<T>
  • on(type: string | string[], listener: IEventListener): ValueColumn<T>
  • Parameters

    • type: "dataLoaded"
    • listener: (previous: boolean, current: boolean) => void
        • (previous: boolean, current: boolean): void
        • emitted when the data of this column has been loaded

          asmemberof

          ValueColumn

          Parameters

          • previous: boolean
          • current: boolean

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "widthChanged"
    • listener: (previous: number, current: number) => void
        • (previous: number, current: number): void
        • emitted when the width property changes

          asmemberof

          Column

          Parameters

          • previous: number
          • current: number

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "labelChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the label property changes

          asmemberof

          Column

          Parameters

          • previous: string
          • current: string

          Returns void

    Returns ValueColumn<T>

  • Parameters

    Returns ValueColumn<T>

  • Parameters

    • type: "dirty"
    • listener: () => void
        • (): void
        • emitted when state of the column is dirty

          asmemberof

          Column

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "dirtyHeader"
    • listener: () => void
        • (): void
        • emitted when state of the column related to its header is dirty

          asmemberof

          Column

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "dirtyValues"
    • listener: () => void
        • (): void
        • emitted when state of the column related to its values is dirty

          asmemberof

          Column

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "dirtyCaches"
    • listener: () => void
        • (): void
        • emitted when state of the column related to cached values (hist, compare, ...) is dirty

          asmemberof

          Column

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "rendererTypeChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the renderer type property changes

          asmemberof

          Column

          Parameters

          • previous: string
          • current: string

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "groupRendererChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the group renderer property changes

          asmemberof

          Column

          Parameters

          • previous: string
          • current: string

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "summaryRendererChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the pattern property changes

          asmemberof

          Column

          Parameters

          • previous: string
          • current: string

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: "visibilityChanged"
    • listener: (previous: boolean, current: boolean) => void
        • (previous: boolean, current: boolean): void
        • emitted when the visibility of this column changes

          asmemberof

          Column

          Parameters

          • previous: boolean
          • current: boolean

          Returns void

    Returns ValueColumn<T>

  • Parameters

    • type: string | string[]
    • listener: IEventListener

    Returns ValueColumn<T>

  • onDataUpdate(_rows: ISequence<IDataRow>): void
  • removeMe(): boolean
  • setGroupRenderer(renderer: string): void
  • setLoaded(loaded: boolean): void
  • setRenderer(renderer: string): void
  • setSummaryRenderer(renderer: string): void
  • setVisible(value: boolean): void
  • setWidth(value: number): void
  • setWidthImpl(value: number): void
  • show(): void
  • sortByMe(ascending?: boolean, priority?: number): boolean
  • triggers that the ranking is sorted by this column

    Parameters

    • ascending: boolean = ...

      ascending order?

    • priority: number = 0

      sorting priority

    Returns boolean

    was successful

  • toggleMyGroupSorting(): boolean
  • toggleMySorting(): boolean
  • unforward(from: IEventHandler, ...types: string[]): void