WidgetGridRegistry
This service provides the list of widgets that could be added to a widget grid. You could use it to register your own widgets.
Properties
Section titled “Properties”translate
Section titled “translate”Type: unknown
Default Value: inject(TranslateService)
Methods
Section titled “Methods”clearRegisteredWidget
Section titled “clearRegisteredWidget”clearRegisteredWidget(): voidgetNoopWidget
Section titled “getNoopWidget”Get the noop component. This component will be rendered in the grid tile if not matching widget could be found in the list of registered widgets. It will show some kind of ‘not found’ message and provide the controls to remove that none existing component from the widget grid.
getNoopWidget(): GridWidget<any>getRegisteredWidgets
Section titled “getRegisteredWidgets”Get registered widgets. This list could be narrowed down by a list of buckets. Buckets are lists of registered widgets registered for a certain key (the buckets name).
getRegisteredWidgets(buckets?: string[]): Array<GridWidget<any>>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| buckets | string[] |
getWidgetComponent
Section titled “getWidgetComponent”Get the component for a widget. This is the component that will be rendered in a grid tile. no component registered with the given name
getWidgetComponent(widgetName: string): Type<any>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widgetName | string |
getWidgetSetupComponent
Section titled “getWidgetSetupComponent”Setup components are the administrative part of a widget. They are used to set up a widget. Not all the widgets will have a setup component. is not widget registered with the given name
getWidgetSetupComponent(widgetName: string): Type | undefinedArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widgetName | string |
registerGridWidget
Section titled “registerGridWidget”Adds a new widget to the list of registered widgets. That way you can create custom widgets that are then available to be added to a users widget grid. not exist it’ll be created.
registerGridWidget(widget: GridWidget<any>, buckets?: string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widget | GridWidget<any> | |
| buckets | string[] |
registerGridWidgets
Section titled “registerGridWidgets”Register a collection of widgets not exist it’ll be created.
registerGridWidgets(widgets: GridWidget<any>[], buckets?: string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| widgets | GridWidget<any>[] | |
| buckets | string[] |
removeRegisteredWidget
Section titled “removeRegisteredWidget”removeRegisteredWidget(id: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| id | string |