Skip to main content

frontend

Interfaces

CanvasWidgetState

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
moduleBlobUrlnull | stringThe URL of the blob of the widget module.types/frontend.ts:49
settingWidgetSettingSetting of the widget.types/frontend.ts:45
widthstringThe width of the widget container, as exported from the widget module.types/frontend.ts:41

ManagerWidgetState

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
settingWidgetSettingSetting of the widget.types/frontend.ts:31

RemoveWidgetsPayload

The payload of the "remove-widgets" event.

Properties

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

RenderWidgetPayload

The payload of the "render-widget" event.

Properties

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

UpdateSettingPayload

The payload of the "update-setting" event.

Properties

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

Widget

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

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