Skip to content

AbstractDataAction

Class

The abstract class for data action.

Implements

Properties

PropertyTypeNotes
iconstring | IconResult

The action icon.

idstring

The unique ID

intlIntlShape

The Intl object for i18n.

isWatchingDataSetsChangeboolean

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.

labelstring

The user readable-label for the action.

namestring

The action name.

widgetIdstring

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
destroy()any

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(): any

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

Returns 
any

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
dataSetsDataRecordSet[]

The data sets that will be processed.

dataLevelDataLevel

The data level that will be processed.

widgetIdstring

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
dataSetsDataRecordSet[]

The data sets that will be processed.

dataLevelDataLevel

The data level that will be processed.

widgetIdstring

The widget id that use the data actions.

actionConfigany

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.