Flashing Cell Technical Reference

Summary

  • Flashing Cells can be defined in Initial Adaptable State and also configured in Adaptable Options
  • Run-time access is provided through Flashing Cell API
  • The Flashing Cell Displayed Event fires when a cell or row flashes

Flashing Cell State

The Flashing Cell section of Initial State contains a collection of FlashingCellDefinition objects:

PropertyTypeDescription
FlashingCellDefinitionsFlashingCellDefinition[]Flashing Cell Definitions - will flash cells/rows when rule is met

Flashing Cell Definition

Each Flashing Cell Definition is defined as follows:

PropertyTypeDescriptionDefault
DownChangeStyleAdaptableStyleStyle for 'Down' value changesRed BackColour
FlashDurationnumber | 'always'Duration of Flash - can be number (in ms) or 'always'500ms
FlashTargetFlashTargetTypes | FlashTargetTypes[]Should a cell or whole row flash'cell'
NamestringName of the Flashing Cell Definition
NeutralChangeStyleAdaptableStyleStyle for 'Neutral' value changesGray BackColour
RuleFlashingCellRuleWhen Flashing Cell should be triggered
ScopeColumnScopeWhich Columns, DataTypes or Column Types can Flash
UpChangeStyleAdaptableStyleStyle for 'Up' value changesGreen BackColour
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object

Flashing Cell Options

The Flashing Cell Options section of Adaptable Options contains Flashing Cell properties:

PropertyTypeDescriptionDefault
defaultDownChangeStyleAdaptableStyleStyle for 'Down' value changesRed BackColour
defaultFlashDurationnumber | 'always'Duration of Flash - can be number (in ms) or 'always'500ms
defaultFlashTargetFlashTargetShould a cell or whole row flash'cell'
defaultNeutralChangeStyleAdaptableStyleStyle for 'Neutral' value changesGray BackColour
defaultUpChangeStyleAdaptableStyleStyle for 'Up' value changesGreen BackColour

Flashing Cell API

The Flashing Cell API section of Adaptable API contains numerous functions.

They include functions to turn Cell Flashing off and on programmatically, and for Rules to be accessed, created, edited, deleted, suspended and shared.

MethodReturnsDescription
addFlashingCellDefinition(flashingCellDefinition)FlashingCellDefinitionAdds a Flashing Cell Definition to State
addFlashingCellDefinitions(flashingCellDefinitions)FlashingCellDefinition[]Adds provided Flashing Cell Definitions
clearAllFlashingCells()voidClears all Cells and Rows which have been flashed (primarily used if duration is 'Always')
deleteFlashingCellDefinition(flashingCellDefinition)voidDeletes a Flashing Cell
editFlashingCellDefinition(flashingCellDefinition)FlashingCellDefinitionEdits Flashing Cell Definition in State with given one
editFlashingCellDefinitions(flashingCellDefinitions)FlashingCellDefinition[]Edits provided Flashing Cell Definitions
findFlashingCellDefinitions(flashingCellLookupCriteria)FlashingCellDefinition[]Find all Flashing Cell Definitions which match the given criteria
getActiveFlashingCellDefinitions(config)FlashingCellDefinition[]Retrieves all active (non-suspended) cell Definitions in Flashing Cell State
getFlashingCellDefinitionById(id, config)FlashingCellDefinitionRetrieves Flashing Cell Definition by the technical ID (from FlashingCellState)
getFlashingCellDefinitionByName(name)FlashingCellDefinition | undefinedRetrieves a Flashing Cell Definition by its Name
getFlashingCellDefinitions(config)FlashingCellDefinition[]Retrieves all Flashing Cell Definitions in Flashing Cell State
getFlashingCellFlashTarget(flashingCellDefinition)FlashingCellDefinition['FlashTarget']Returns FlashTarget of the given Flashing Cell Definition
getFlashingCellPredicateDefsForScope(scope)AdaptablePredicateDef[]Retrieves all Predicate Defs that match given Scope
getFlashingCellState()FlashingCellStateRetrieves Flashing Cell section from Adaptable State
getSuspendedFlashingCellDefinitions(config)FlashingCellDefinition[]Retrieves all suspended Cell Definitions in Flashing Cell State
isAnyFlashingCellActive()booleanIs there any cells/rows currently being flashed
setFlashingCellDefinitions(flashingCellDefinitions)voidSets a collection of Flashing Cell Definitions into State
showFlashingCell(flashingCellToShow)voidEvaluates the given Flashing Cell Definition and flashes the correspondent cells/rows
suspendAllFlashingCellDefinition()voidSuspends all FlashingCell Definitions
suspendFlashingCellDefinition(flashingCellDefinition)FlashingCellDefinitionSuspends a Flashing Cell Definition
unSuspendAllFlashingCellDefinition()voidActivates all suspended Flashing Cell Definition
unSuspendFlashingCellDefinition(flashingCellDefinition)FlashingCellDefinitionActivates a suspended Flashing Cell Definition

Flashing Cell Displayed Event

The FlashingCellDisplayedEvent fires when a Cell or Row has flashed.

EventInfo

The Flashing Cell Displayed Event has a FlashingCellDisplayedInfo object which contains one property:

PropertyTypeDescription
flashingCellAdaptableFlashingCellDetails of the Cell (or row) which has just flashed
adaptableContextanyCustom application Context provided in AdaptableOptions.adaptableContext

This flashingCell property is of type AdaptableFlashingCell defined as follows:

PropertyTypeDescription
cellDataChangedInfoCellDataChangedInfoData change which triggered the FlashingCell
direction'up' | 'down' | 'neutral'Direction of the change: 'up', 'down' or 'neutral'
flashColumnIdsRecord<string, boolean>Column Ids that are flashing
flashingCellDefinitionFlashingCellDefinitionRule that caused the FlashingCell to fire
flashTargetFlashingCellDefinition['FlashTarget']What will flash (e.g. Cell, Row)
rowPrimaryKeystringPrimary Key Value of Row which is flashing

Event Subscription

Subscribing to the Events is done the same as with all Adaptable Events:

api.eventApi.on('FlashingCellDisplayed', (eventInfo: FlashingCellDisplayedInfo) => {
    // do something with the info
});