Class RemoteDataProvider

a remote implementation of the data provider

Hierarchy

  • ACommonDataProvider
    • RemoteDataProvider

Constructors

Properties

colorMappingFunctionTypes: {
    [colorMappingFunctionType: string]: IColorMappingFunctionConstructor;
}

Type declaration

columnTypes: {
    [columnType: string]: IColumnConstructor;
}

lookup map of a column type to its column implementation

Type declaration

mappingFunctionTypes: {
    [mappingFunctionType: string]: IMappingFunctionConstructor;
}

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

  • hook method for cleaning up a ranking

    Parameters

    Returns void

  • events:

    • column changes: addColumn, removeColumn
    • ranking changes: addRanking, removeRanking
    • dirty: dirty, dirtyHeder, dirtyValues
    • selectionChanged

    Returns string[]

  • generates a default ranking by using all column descriptions ones

    Parameters

    • addSupportType: boolean = true

    Returns Ranking

  • deselect the given row

    Parameters

    • index: number

    Returns void

  • utility to export the selection within the given ranking to a table with the given separator

    Parameters

    Returns string | Promise<string>

  • utility to export a ranking to a table with the given separator

    Parameters

    Returns string | Promise<string>

  • finds a column in all rankings returning the first match

    Parameters

    • idOrFilter: string | ((col) => boolean)

      by id or by a filter function

    Returns Column

  • Parameters

    • type: string | string[]
    • Rest ...args: any[]

    Returns 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

  • returns the currently selected indices

    Returns 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

  • is the given row selected

    Parameters

    • index: number

    Returns boolean

  • Parameters

    • indices: number[]

    Returns void

  • helper function that will be called upon a listener has changed

    Parameters

    • _type: string

      event type

    • _active: boolean

      registered or de registered

    Returns void

  • Parameters

    • type: "busy"
    • listener: ((busy) => void)
        • (busy): void
        • Parameters

          • busy: boolean

          Returns void

    Returns this

  • Parameters

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

          Parameters

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

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

          • previous: number
          • current: number

          Returns void

    Returns this

  • Parameters

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

          Parameters

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

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

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

    • type: "addRanking"
    • listener: ((ranking, index) => void)
        • (ranking, index): void
        • Parameters

          Returns void

    Returns this

  • Parameters

    • type: "removeRanking"
    • listener: ((ranking, index) => void)
        • (ranking, index): void
        • Parameters

          • ranking: Ranking

            if null all rankings are removed else just the specific one

          • index: number

          Returns void

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

    • type: "orderChanged"
    • listener: ((previous, current, previousGroups, currentGroups, dirtyReason) => void)
        • (previous, current, previousGroups, currentGroups, dirtyReason): void
        • Parameters

          Returns void

    Returns this

  • Parameters

    • type: "addDesc"
    • listener: ((desc) => void)

    Returns this

  • Parameters

    • type: "removeDesc"
    • listener: ((desc) => void)

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          Parameters

          • dataIndices: number[]

            the selected data indices

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

    • type: "aggregate"
    • listener: ((ranking, group, previousTopN, currentTopN) => void)
        • (ranking, group, previousTopN, currentTopN): void
        • Parameters

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

          Returns void

    Returns this

  • Parameters

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

          Parameters

          • dataIndices: number[]

            the selected data indices

          Returns void

          As Member Of

          ADataProvider

          Group

          Events

    Returns this

  • Parameters

    Returns this

  • adds a column to a ranking described by its column description

    Parameters

    • ranking: Ranking

      the ranking to add the column to

    • desc: IColumnDesc

      the description of the column

    Returns Column

    the newly created column or null

  • Remove the given column description from the data provider. Column descriptions that are in use (i.e., has column instances in a ranking) cannot be removed by default. Skip the check by setting the ignoreBeingUsed parameter to true.

    Parameters

    • column: IColumnDesc

      Column description

    • ignoreBeingUsed: boolean = false

      Flag whether to ignore the usage of the column descriptions in rankings

    Returns boolean

  • removes a ranking from this data provider

    Parameters

    Returns boolean

  • Parameters

    • search: string | RegExp
    • col: Column
    • Optional first: boolean

    Returns void

  • also select the given row

    Parameters

    • index: number

    Returns void

  • returns a promise containing the selected rows

    Returns any[] | Promise<any[]>

  • set the selection to the given rows

    Parameters

    • indices: number[]

    Returns void

  • Parameters

    • value: number

    Returns void

  • identify by the tuple type@columnname

    Parameters

    • desc: any

    Returns any

  • toggles the selection of the given data index

    Parameters

    • index: number
    • additional: boolean = false

      just this element or all

    Returns boolean

    whether the index is currently selected

  • removes the forwarding declarations

    Parameters

    • from: IEventHandler

      the originated dispatcher

    • Rest ...types: string[]

      event types to forward

    Returns void