AbstractDataAction

Class

The abstract class for data action.

Implements

Properties

PropertyTypeNotes
string | IconResult

The action icon.

string

The unique ID

IntlShape

The Intl object for i18n.

boolean

Whether the action is watching the data sets change. If the action is watching the data sets change, the onDataSetsChange method will be invoked when the data sets change.

string

The user readable-label for the action.

string

The action name.

string

The widget ID that provides the action

icon

optional
Class Property
icon: string | IconResult

The action icon.

id

Class Property
id: string

The unique ID

intl

Class Property
intl: IntlShape

The Intl object for i18n.

isWatchingDataSetsChange

optional
Class Property
isWatchingDataSetsChange: boolean

Whether the action is watching the data sets change. If the action is watching the data sets change, the onDataSetsChange method will be invoked when the data sets change.

label

Class Property
label: string

The user readable-label for the action.

name

Class Property
name: string

The action name.

widgetId

Class Property
widgetId: string

The widget ID that provides the action

Methods

MethodReturnsNotes
void

This method will be invoked when the widget that provides the action is removed.

isSupported(dataSets, dataLevel, widgetId)
Promise<boolean>

Will be invoked to determine whether the data action can process the data.

onExecute(dataSets, dataLevel, widgetId, actionConfig?)
Promise<boolean | ReactElement<anystring | JSXElementConstructor<any>>>

This is the action logic.

destroy

Class Method
destroy(): void

This method will be invoked when the widget that provides the action is removed.

Returns 
void

isSupported

abstract
Class Method
isSupported(dataSetsDataRecordSet[], dataLevelDataLevel, widgetIdstring): Promise<boolean>

Will be invoked to determine whether the data action can process the data.

Parameters
ParameterTypeNotes
dataSets
DataRecordSet[]

The data sets that will be processed.

dataLevel
DataLevel

The data level that will be processed.

widgetId
string

The widget id that use the data actions.

Returns 
Promise<boolean>

true if the data action can process the data.

onExecute

abstract
Class Method
onExecute(dataSetsDataRecordSet[], dataLevelDataLevel, widgetIdstring, actionConfig?any): Promise<boolean | ReactElement<anystring | JSXElementConstructor<any>>>

This is the action logic.

Parameters
ParameterTypeNotes
dataSets
DataRecordSet[]

The data sets that will be processed.

dataLevel
DataLevel

The data level that will be processed.

widgetId
string

The widget id that use the data actions.

actionConfig
any

The action config that is set by the user. Not all actions have the config.

Returns 
Promise<boolean | ReactElement<anystring | JSXElementConstructor<any>>>

true if the action is executed successfully. If the action needs to show a dialog, return the dialog content.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.