frontend
Interfaces
CanvasWidgetState
Defined in: types/frontend.ts:37
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? | string | The URL of the blob of the widget module. | types/frontend.ts:49 |
settings | WidgetSettings | Settings 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
Defined in: types/frontend.ts:27
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 |
settings | WidgetSettings | Settings of the widget. | types/frontend.ts:31 |
RemoveWidgetsPayload
Defined in: types/frontend.ts:75
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
Defined in: types/frontend.ts:63
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 |
settings | WidgetSettings | The widget-specific settings. | types/frontend.ts:69 |
widgetId | string | The widget ID. | types/frontend.ts:65 |
UpdateSettingsPayload
Defined in: types/frontend.ts:83
The payload of the "update-settings" event.
Properties
Property | Type | Description | Defined in |
---|---|---|---|
settings | WidgetSettings | The widget-specific settings to update. | types/frontend.ts:87 |
widgetId | string | The 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
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
Defined in: types/frontend.ts:55
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 |