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 new DASFConnection.

exported from resources.connection

ConnectionOptions.connection?

type: DASFConnection | () => DASFConnection

A DASFConnection to a backend module or a callable that creates one.

Provide a DASFConnection to a DASF backend module, or a function that creates one. If not provided, we will create one from the given websocketUrl and topic.

ConnectionOptions.topic?

type: string

The topic for a DASF backend module

If no connection is provided, this will be used to create a connection to a DASF backend module. websocketUrl is required as well, see WebsocketUrlBuilder.

ConnectionOptions.websocketUrl?

type: string

The websocket url to a DASF backend module

If no connection is provided, this will be used to create a connection to a DASF backend module. topic is required as well, see WebsocketUrlBuilder.

getConnection(options)

Create a websocket connection to a DASF backend module

This function creates a new DASFConnection to a backend module. When a connection is provided, websocketUrl and topic are ignored.

Arguments:
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, ClassContainerOptions and ModuleContainerOptions.

See also ConnectionOptions for 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 onError handler (in case skipDefaultErrorHandlerCheck is undefined). Setting this to true means 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 onProgress handler (in case skipDefaultProgressHandlerCheck is undefined). Setting this to true means 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 onResponse handler (in case skipDefaultResponseHandlerCheck is undefined). Setting this to true means 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