Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataProvider Abstract

a basic data provider holding the data and rankings

Hierarchy

  • default
    • DataProvider

Implements

Index

Constructors

Properties

colorMappingFunctionTypes: {}

Type declaration

columnTypes: {}

lookup map of a column type to its column implementation

Type declaration

mappingFunctionTypes: {}

Type declaration

EVENT_ADD_COLUMN: "addColumn" = Ranking.EVENT_ADD_COLUMN
EVENT_ADD_DESC: "addDesc" = 'addDesc'
EVENT_ADD_RANKING: "addRanking" = 'addRanking'
EVENT_BUSY: "busy" = 'busy'
EVENT_CLEAR_DESC: "clearDesc" = 'clearDesc'
EVENT_DATA_CHANGED: "dataChanged" = 'dataChanged'
EVENT_DIRTY: "dirty" = Ranking.EVENT_DIRTY
EVENT_DIRTY_CACHES: "dirtyCaches" = Ranking.EVENT_DIRTY_CACHES
EVENT_DIRTY_HEADER: "dirtyHeader" = Ranking.EVENT_DIRTY_HEADER
EVENT_DIRTY_VALUES: "dirtyValues" = Ranking.EVENT_DIRTY_VALUES
EVENT_GROUP_AGGREGATION_CHANGED: "aggregate" = AggregateGroupColumn.EVENT_AGGREGATE
EVENT_JUMP_TO_NEAREST: "jumpToNearest" = 'jumpToNearest'
EVENT_MOVE_COLUMN: "moveColumn" = Ranking.EVENT_MOVE_COLUMN
EVENT_ORDER_CHANGED: "orderChanged" = Ranking.EVENT_ORDER_CHANGED
EVENT_REMOVE_COLUMN: "removeColumn" = Ranking.EVENT_REMOVE_COLUMN
EVENT_REMOVE_DESC: "removeDesc" = 'removeDesc'
EVENT_REMOVE_RANKING: "removeRanking" = 'removeRanking'
EVENT_SELECTION_CHANGED: "selectionChanged" = 'selectionChanged'
EVENT_SHOWTOPN_CHANGED: "showTopNChanged" = 'showTopNChanged'

Methods

  • cleanUpRanking(_ranking: Ranking): void
  • clearFilters(): void
  • clearRankings(): void
  • clearSelection(): void
  • createEventList(): string[]
  • deriveDefault(addSupportType?: boolean): Ranking
  • deselect(index: number): void
  • destroy(): void
  • ensureOneRanking(): void
  • find(idOrFilter: string | ((col: Column) => boolean)): Column
  • fire(type: string | string[], ...args: any[]): void
  • fireBusy(busy: boolean): void
  • 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

  • fromDescRef(descRef: any): any
  • getAggregationState(ranking: Ranking, group: IGroup): EAggregationState
  • getSelection(): number[]
  • getShowTopN(): number
  • getTotalNumberOfRows(): number
  • adds a column to a ranking described by its column description

    Parameters

    • ranking: Ranking

      the ranking to add the column to

    • index: number

      the position to insert the column

    • desc: IColumnDesc

      the description of the column

    Returns Column

    the newly created column or null

  • insertRanking(r: Ranking, index?: number): void
  • isSelected(index: number): boolean
  • jumpToNearest(indices: number[]): void
  • listenersChanged(_type: string, _active: boolean): void
  • mappingSample(col: Column): ISequence<number> | Promise<ISequence<number>>
  • Parameters

    • type: "busy"
    • listener: (busy: boolean) => void
        • (busy: boolean): void
        • asmemberof

          ADataProvider

          Parameters

          • busy: boolean

          Returns void

    Returns DataProvider

  • Parameters

    • type: "dataChanged"
    • listener: (rows: IDataRow[]) => void
        • emitted when the data changes

          asmemberof

          ADataProvider

          Parameters

          Returns void

    Returns DataProvider

  • Parameters

    • type: "showTopNChanged"
    • listener: (previous: number, current: number) => void
        • (previous: number, current: number): void
        • asmemberof

          ADataProvider

          Parameters

          • previous: number
          • current: number

          Returns void

    Returns DataProvider

  • Parameters

    • type: "addColumn"
    • listener: (col: Column, index: number) => void
        • (col: Column, index: number): void
        • emitted when a column has been added

          asmemberof

          ADataProvider

          Parameters

          Returns void

    Returns DataProvider

  • Parameters

    • type: "moveColumn"
    • listener: (col: Column, index: number, oldIndex: number) => void
        • (col: Column, index: number, oldIndex: number): void
        • emitted when a column has been moved within this composite column

          asmemberof

          ADataProvider

          Parameters

          • col: Column
          • index: number
          • oldIndex: number

          Returns void

    Returns DataProvider

  • Parameters

    • type: "removeColumn"
    • listener: (col: Column, index: number) => void
        • (col: Column, index: number): void
        • emitted when a column has been removed

          asmemberof

          ADataProvider

          Parameters

          Returns void

    Returns DataProvider

  • Parameters

    • type: "addRanking"
    • listener: (ranking: Ranking, index: number) => void
        • (ranking: Ranking, index: number): void
        • asmemberof

          ADataProvider

          Parameters

          Returns void

    Returns DataProvider

  • Parameters

    • type: "removeRanking"
    • listener: (ranking: Ranking, index: number) => void
        • (ranking: Ranking, index: number): void
        • asmemberof

          ADataProvider

          Parameters

          • ranking: Ranking

            if null all rankings are removed else just the specific one

          • index: number

          Returns void

    Returns DataProvider

  • Parameters

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

          asmemberof

          ADataProvider

          Returns void

    Returns DataProvider

  • Parameters

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

          asmemberof

          ADataProvider

          Returns void

    Returns DataProvider

  • Parameters

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

          asmemberof

          ADataProvider

          Returns void

    Returns DataProvider

  • Parameters

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

          asmemberof

          ADataProvider

          Returns void

    Returns DataProvider

  • Parameters

    Returns DataProvider

  • Parameters

    Returns DataProvider

  • Parameters

    Returns DataProvider

  • Parameters

    • type: "clearDesc"
    • listener: () => void
        • (): void
        • asmemberof

          ADataProvider

          Returns void

    Returns DataProvider

  • Parameters

    • type: "jumpToNearest"
    • listener: (dataIndices: number[]) => void
        • (dataIndices: number[]): void
        • emitted when the selection changes

          asmemberof

          ADataProvider

          Parameters

          • dataIndices: number[]

            the selected data indices

          Returns void

    Returns DataProvider

  • Parameters

    • type: "aggregate"
    • listener: (ranking: Ranking, group: IGroup | IGroup[], previousTopN: number | number[], currentTopN: number | number[]) => void
        • (ranking: Ranking, group: IGroup | IGroup[], previousTopN: number | number[], currentTopN: number | number[]): void
        • asmemberof

          ADataProvider

          Parameters

          • ranking: Ranking
          • group: IGroup | IGroup[]
          • previousTopN: number | number[]
          • currentTopN: number | number[]

          Returns void

    Returns DataProvider

  • Parameters

    • type: "selectionChanged"
    • listener: (dataIndices: number[]) => void
        • (dataIndices: number[]): void
        • emitted when the selection changes

          asmemberof

          ADataProvider

          Parameters

          • dataIndices: number[]

            the selected data indices

          Returns void

    Returns DataProvider

  • Parameters

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

    Returns DataProvider

  • removeRanking(ranking: Ranking): boolean
  • restoreColumn(dump: any): Column
  • searchAndJump(search: string | RegExp, col: Column): void
  • select(index: number): void
  • selectAllOf(ranking: Ranking): void
  • selectedRows(): any[] | Promise<any[]>
  • setSelection(indices: number[]): void
  • setShowTopN(value: number): void
  • toDescRef(desc: any): any
  • toggleSelection(index: number, additional?: boolean): boolean
  • unforward(from: IEventHandler, ...types: string[]): void
  • view(indices: ArrayLike<number>): any[] | Promise<any[]>