Skip to main content

frontend

Interfaces

CanvasWidgetState

Defined in: types/frontend.ts:37

The state of a widget on the canvas.

Properties

PropertyTypeDescriptionDefined in
apisBlobUrlstringThe URL of the blob of widget APIs.types/frontend.ts:47
displayReactNodeThe rendered widget component or the error component to display.types/frontend.ts:39
heightstringThe height of the widget container, as exported from the widget module.types/frontend.ts:43
moduleBlobUrl?stringThe URL of the blob of the widget module.types/frontend.ts:49
settingsWidgetSettingsSettings of the widget.types/frontend.ts:45
widthstringThe width of the widget container, as exported from the widget module.types/frontend.ts:41

ManagerWidgetState

Defined in: types/frontend.ts:27

The state of a widget in the manager.

Properties

PropertyTypeDescriptionDefined in
configResult<WidgetConfig, string>Configuration or configuration error of the widget.types/frontend.ts:29
settingsWidgetSettingsSettings of the widget.types/frontend.ts:31

RemoveWidgetsPayload

Defined in: types/frontend.ts:75

The payload of the "remove-widgets" event.

Properties

PropertyTypeDescriptionDefined in
removedIdsstring[]The widget IDs to remove.types/frontend.ts:77

RenderWidgetPayload

Defined in: types/frontend.ts:63

The payload of the "render-widget" event.

Properties

PropertyTypeDescriptionDefined in
bundlebooleanWhether to call the backend to bundle the widget.types/frontend.ts:67
settingsWidgetSettingsThe widget-specific settings.types/frontend.ts:69
widgetIdstringThe widget ID.types/frontend.ts:65

UpdateSettingsPayload

Defined in: types/frontend.ts:83

The payload of the "update-settings" event.

Properties

PropertyTypeDescriptionDefined in
settingsWidgetSettingsThe widget-specific settings to update.types/frontend.ts:87
widgetIdstringThe widget ID.types/frontend.ts:85

Widget

Defined in: types/frontend.ts:15

The user-defined widget interface.

The entry file of each user-defined widget should export an object that fulfills this interface as default.

Properties

PropertyTypeDescriptionDefined in
heightstringWidget height as accepted in CSS.types/frontend.ts:21
render() => ReactNodeFunction that returns the React component to render.types/frontend.ts:17
widthstringWidget widget as accepted in CSS.types/frontend.ts:19

WidgetModule

Defined in: types/frontend.ts:55

The module obtained by dynamically importing the bundle of widget source code.

Properties

PropertyTypeDescriptionDefined in
defaultWidgetThe default export of the entry file of a user-defined widget.types/frontend.ts:57