Basic interfaces
Connection parameters
- interface ConnectionOptions
Options to create a websocket connection to a DASF backend module
This interface holds the options for the
getConnection()function to create a newDASFConnection.exported from
resources.connection- ConnectionOptions.connection?
type: DASFConnection | () => DASFConnection
A
DASFConnectionto a backend module or a callable that creates one.Provide a
DASFConnectionto a DASF backend module, or a function that creates one. If not provided, we will create one from the givenwebsocketUrlandtopic.
- ConnectionOptions.topic?
type: string
The topic for a DASF backend module
If no
connectionis provided, this will be used to create a connection to a DASF backend module.websocketUrlis required as well, seeWebsocketUrlBuilder.
- ConnectionOptions.websocketUrl?
type: string
The websocket url to a DASF backend module
If no
connectionis provided, this will be used to create a connection to a DASF backend module.topicis required as well, seeWebsocketUrlBuilder.
- getConnection(options)
Create a websocket connection to a DASF backend module
This function creates a new
DASFConnectionto a backend module. When aconnectionis provided,websocketUrlandtopicare ignored.- Arguments:
options (ConnectionOptions) – The
ConnectionOptionsto get the connection.
- Returns:
DASFConnection
Container Base Options
- interface ContainerBaseOptions
Base options for creating a container for a DASF module, class or function
This interface holds the options for handling responses, errors and progress reports of the DASF backend module and serves as a basis for the
FunctionContainerOptions,ClassContainerOptionsandModuleContainerOptions.See also
ConnectionOptionsfor further options.exported from
resources.ContainerBaseOptions- Extends:
ConnectionOptions
- ContainerBaseOptions.fields?
type: RegistryFieldsType
Dictionary of registered fields in the form.
See Custom Widgets and Fields in the RJSF docs for more information.
- ContainerBaseOptions.layout?
type: LayoutOption
Layout option for the container
Can be
'rows'such that the content is organized in rows, or'columns'such that the content is organized in 2 columns (on large screens).
- ContainerBaseOptions.renderStringAsHtml?
type: boolean
Option to check if html output from the backend module should be rendered
This option can be used to check, if strings returned by the DASF backend module should be interpreted as HTML, or not. Note that option can be dangerous if you cannot trust the backend module entirely!
- ContainerBaseOptions.skipDefaultErrorHandler
type: boolean
Prevent the default handling of errors
This option can be used to prevent the default error handler in favor of the given
onErrorhandler (in caseskipDefaultErrorHandlerCheckisundefined). Setting this totruemeans that the default error handler should be skipped.
- ContainerBaseOptions.skipDefaultProgressHandler?
type: boolean
Prevent the default handling of progress reports
This option can be used to prevent the default progress report handler in favor of the given
onProgresshandler (in caseskipDefaultProgressHandlerCheckisundefined). Setting this totruemeans that the default progress report handler should be skipped.
- ContainerBaseOptions.skipDefaultResponseHandler
type: boolean
Prevent the default handling of responses
This option can be used to prevent the default response handler in favor of the given
onResponsehandler (in caseskipDefaultResponseHandlerCheckisundefined). Setting this totruemeans that the default response handler should be skipped.
- ContainerBaseOptions.widgets?
type: RegistryWidgetsType
Dictionary of registered widgets in the form.
See Custom Widgets and Fields in the RJSF docs for more information.
- ContainerBaseOptions.onError(error)
- Arguments:
error (Error)
- ContainerBaseOptions.onProgress(value)
- Arguments:
value ({ message: DASFProgressReport; props?: object; })
- ContainerBaseOptions.onResponse(responseData)
- Arguments:
responseData (unknown)
- ContainerBaseOptions.skipDefaultErrorHandlerCheck(error)
- Arguments:
error (Error)
- Returns:
boolean
- ContainerBaseOptions.skipDefaultProgressHandlerCheck(value)
- Arguments:
value ({ message: DASFProgressReport; props?: object; })
- Returns:
boolean
- ContainerBaseOptions.skipDefaultResponseHandlerCheck(responseData)
- Arguments:
responseData (unknown)
- Returns:
boolean