WidgetGridService
service
Service managing a widget grid. Also includes a set of labels that will be used by the grid and its widgets. Default labels are provided out of the box. But if you want to use custom ones or add i18n you could overwrite them. The grid as well as the widgets will use those labels or fall back to their default ones. If you are developing own widgets you should consider using those labels as well.
Properties
Section titled “Properties”addItemSize
Section titled “addItemSize”Type: literal type
Default Value: \{ rows: 2, cols: 3, \}
widgetGrid$
Section titled “widgetGrid$”Type: Observable<WidgetGridItem[]>
Default Value: this.widgetGridSource.asObservable()
widgetGridUpdate$
Section titled “widgetGridUpdate$”Type: Observable<string>
Default Value: this.widgetGridUpdateSource.asObservable()
Emitted when the widget grid has been updated
Methods
Section titled “Methods”addWidget
Section titled “addWidget”Add a new grid item to the widget grid.
addWidget(widgetName: string, setupWidgetConfig?: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widgetName | string | |
| setupWidgetConfig | any |
removeWidget
Section titled “removeWidget”removeWidget(gridItemId: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| gridItemId | string |
replaceWidget
Section titled “replaceWidget”replaceWidget(widgetId: string, widgetName: string, setupWidgetConfig?: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widgetId | string | |
| widgetName | string | |
| setupWidgetConfig | any |
setWidgetGrid
Section titled “setWidgetGrid”setWidgetGrid(gridItemConfig: Array<WidgetGridItemConfig> | undefined): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| gridItemConfig | Array<WidgetGridItemConfig> | undefined |
updateWidget
Section titled “updateWidget”Update config of an existing widget
updateWidget(widgetId: string, setupWidgetConfig: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widgetId | string | |
| setupWidgetConfig | any |