Skip to content

WidgetGridRegistry

injectable

This service provides the list of widgets that could be added to a widget grid. You could use it to register your own widgets.

Type: unknown

Default Value: inject(TranslateService)

clearRegisteredWidget(): void

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>

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>>
NameTypeDescription
bucketsstring[]

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>
NameTypeDescription
widgetNamestring

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 | undefined
NameTypeDescription
widgetNamestring

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[]): void
NameTypeDescription
widgetGridWidget<any>
bucketsstring[]

Register a collection of widgets not exist it’ll be created.

registerGridWidgets(widgets: GridWidget<any>[], buckets?: string[]): void
NameTypeDescription
widgetsGridWidget<any>[]
bucketsstring[]
removeRegisteredWidget(id: string): void
NameTypeDescription
idstring