frontend
Interfaces
CanvasWidgetState
The state of a widget on the canvas.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
apisBlobUrl | string | The URL of the blob of widget APIs. | types/frontend.ts:47 |
display | ReactNode | The rendered widget component or the error component to display. | types/frontend.ts:39 |
height | string | The height of the widget container, as exported from the widget module. | types/frontend.ts:43 |
moduleBlobUrl | null | string | The URL of the blob of the widget module. | types/frontend.ts:49 |
setting | WidgetSetting | Setting of the widget. | types/frontend.ts:45 |
width | string | The 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
Property | Type | Description | Defined in |
---|---|---|---|
config | Result <WidgetConfig , string > | Configuration or configuration error of the widget. | types/frontend.ts:29 |
setting | WidgetSetting | Setting of the widget. | types/frontend.ts:31 |
RemoveWidgetsPayload
The payload of the "remove-widgets" event.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
removedIds | string [] | The widget IDs to remove. | types/frontend.ts:77 |
RenderWidgetPayload
The payload of the "render-widget" event.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
bundle | boolean | Whether to call the backend to bundle the widget. | types/frontend.ts:67 |
setting | WidgetSetting | The widget-specific setting. | types/frontend.ts:69 |
widgetId | string | The widget ID. | types/frontend.ts:65 |
UpdateSettingPayload
The payload of the "update-setting" event.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
setting | WidgetSetting | The widget-specific settting to update. | types/frontend.ts:87 |
widgetId | string | The 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
Property | Type | Description | Defined in |
---|---|---|---|
height | string | Widget height as accepted in CSS. | types/frontend.ts:21 |
render | () => ReactNode | Function that returns the React component to render. | types/frontend.ts:17 |
width | string | Widget widget as accepted in CSS. | types/frontend.ts:19 |
WidgetModule
The module obtained by dynamically importing the bundle of widget source code.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
default | Widget | The default export of the entry file of a user-defined widget. | types/frontend.ts:57 |