Skip to content

Flexible dashboard

Flexible dashboards are an extension of static dashboards that allow users to customize the content according to their specific needs.

Usage

Flexible dashboards offers a personalized experience by enabling users to tailor the dashboards content itself.

Users can enter the edit mode to add, move and remove widgets, as well as restoring the dashboard to its default settings.

Flexible dashboard

When to use

  • Use it when there is a large amount of widgets that users can choose from.
  • Use it if the application is used by a diverse group of users with different needs and goals.
  • Use it if users may need to prioritize certain types of information over others based on their current tasks or goals.
  • Be mindful about its use. Providing too many customization options can overwhelm users and make the dashboard more difficult to use.

Design

Default mode

In default mode, the dashboard displays a pre-defined set of widgets, providing users with a view of the data and insights based on their chosen configuration.

Flexible dashboard default

  1. Title (optional), 2. Dashboard options (optional), 3. Content area 4. Edit mode button

The dashboard options area on top of the widgets can be used for actions such as filtering, which affect the whole dashboard.

Edit mode

In edit mode, users can customize the dashboard to fit their specific needs. The dashboard options area is replaced by editing options that allow users to add widgets and perform other actions.

Flexible dashboard edit

  1. Title (optional), 2. Editing options (optional), 3. Content area, 4. Save and cancel button

Add widget

  1. Select Add widget to open the widget library.
  2. Select the desired widget.
  3. Click Add. The library will be closed and the new widget will be added at the bottom of the page.

Flexible dashboard add

Resize

Users can use the resize handler at the bottom right corner and drag horizontally to change the width, vertically to change the height, or diagonally to change both dimensions. A light blue box appears to indicate the area a widget will snap to, once the user releases the resize handle.

Flexible dashboard resize

Move

Users can select a widget within the content area and drag it to the desired location. As with resizing, a light blue box appears to indicate where the widget will be positioned upon letting it go.

Flexible dashboard move

Code

The flexible dashboards are based on gridstack.js.

See README for details about including to your app.

Direct Link to dashboard demo.

SiFlexibleDashboardComponent API Documentation

selector
si-flexible-dashboard

The component implements a dashboard with adding, removing and resizing widgets. It consists and connects a toolbar, a grid with widgets, and a widget catalog.

Input Properties

Name Type Default Description
config
Config inject(SI_DASHBOARD_CONFIGURATION) Option to configure a dashboard instance. Default is the optional value from the SI_DASHBOARD_CONFIGURATION .
dashboardId
string Optionally, but it is recommended to include an id for a dashboard. The id is utilized in the persistence calls on the SiWidgetStorage .
editable
boolean false Input to change the dashboard editable state.
heading
string Heading for the dashboard.

To show a custom header instead, e.g. with a description or page actions, project it using the header attribute. The heading is ignored in that case. While adding or editing widgets, the respective title is shown instead.
hideAddWidgetInstanceButton
boolean false Option to remove the add widget instance button from the primary toolbar.
hideEditButton
boolean false Option to hide the dashboard edit button.
hideProgressIndicator
boolean false Option to turn off the loading spinner on save and load operations.
multiSelect
boolean false Option to enable multi-select in the widget catalog. When enabled, the user can select multiple widgets to add to the dashboard at once.
primaryEditActions
DashboardToolbarItem[] [] Primary action menu items shown in the edit mode of the dashboard.
searchPlaceholder
TranslatableString $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search…` Placeholder text for the search input field in the widget catalog.
secondaryEditActions
DashboardToolbarItem[] [] Secondary action menu items shown in the edit mode of the dashboard.
showEditButtonLabel
boolean false Option to display the edit button as a text button instead, only if the window is larger than xs SiResponsiveContainerDirective .
widgetCatalog
Widget[] [] Sets the available widgets for the widget catalog to the dashboard.
widgetCatalogComponent
Type<SiWidgetCatalogComponent> Optionally, provide a custom subclass of the SiWidgetCatalogComponent to use your own catalog component.
widgetInstanceEditorDialogComponent
Type<SiWidgetInstanceEditorDialogComponent> Optionally, provide a custom subclass of the SiWidgetInstanceEditorDialogComponent to use your own implementation.

Output Properties

Name Type Description
editableChange
boolean Input to change the dashboard editable state.
isModified
boolean Emits the modification state of the grid. It is unmodified when the visible state is equal to the loaded state from the widget storage. When the user modifies the dashboard by e.g. while moving the widgets, the dashboard is marked as modified and emits true and when the user persists the change by saving, or reverts the state by canceling, the state is unmodified again and emits false .

SiGridComponent API Documentation

selector
si-grid

The grid component is the actual component on which the widget instances are placed and visualized. You can think of a headless dashboard, without a title, toolbar or edit buttons.

Input Properties

Name Type Default Description
dashboardId
string An optional, but recommended dashboard id that is used in persistence and passed to the widget store for saving and loading data.
editable
boolean false Sets the grid into editable mode, in which the widget instances can be moved, resized, removed or new ones added.
emitWidgetInstanceEditEvents
boolean false When the user clicks edit on a widget instance, an editor need to appear and the widget editor component need to be loaded. When the grid is used standalone, it takes care and opens a modal dialog and loads the configured widget editor component. When the grid is used in a container like the flexible dashboard, the container manages where the widget instance editor is displayed. In this case this options prevents the grid from showing the editor in the dialog, and emits on widgetInstanceEdit on clicking the widget edit action.
gridConfig
(GridConfig | undefined) inject(SI_DASHBOARD_CONFIGURATION)?.grid Configuration options for a grid instance. Default is the optional value from the SI_DASHBOARD_CONFIGURATION .
hideProgressIndicator
boolean false Option to turn off the loading spinner on save and load operations.
widgetCatalog
Widget[] [] Provides the available widgets to the grid. When loading the widget configurations from the storage, we need to have the widget definition available to be able to create the widget instances on the grid.
widgetInstanceEditorDialogComponent
Type<SiWidgetInstanceEditorDialogComponent> Option to configure a custom widget instance editor dialog component. The component provides the editor hosting and the buttons to save and cancel.

Output Properties

Name Type Description
editableChange
boolean Sets the grid into editable mode, in which the widget instances can be moved, resized, removed or new ones added.
isModified
boolean Emits the modification state of the grid. It is unmodified when the visible state is equal to the loaded state from the widget storage. When the user modifies the dashboard by e.g. while moving the widgets, the dashboard is marked as modified and emits true and when the user persists the change by saving, or reverts the state by canceling, the state is unmodified again and emits false .
widgetInstanceEdit
WidgetConfig Emits to notify about edit events of widget instances. Only emits if emitWidgetInstanceEditEvents is set to true .

Attributes and Methods

Name Type Default Description
addWidgetInstance(...)
(widgetInstanceConfig: Omit<WidgetConfig, "id">) => void Adds a new widget instance configuration to the dashboard grid. It is not persisted yet and is added to the transient widget instances.

Parameters
cancel()
() => void Cancel current changes and restore last saved state.
edit()
() => void Set dashboard grid in editable mode to modify widget instances.
editWidgetInstance(...)
(widgetInstanceConfig: WidgetConfig) => void Opens the provided widget configuration in the related editor or emits on widgetInstanceEdit , if emitWidgetInstanceEditEvents is true.

Parameters
  • widgetInstanceConfig: WidgetConfig  The config of the widget instance to edit.
(readonly) gridStackWrapper
Signal<SiGridstackWrapperComponent> viewChild.required(SiGridstackWrapperComponent)
(readonly) isLoading
BehaviorSubject<boolean> ... Indication for load and save operations.
removeWidgetInstance(...)
(widgetInstanceId: string) => void Removes a widget instance from the visible widgets and puts it in the markedForRemoval array.

Parameters
  • widgetInstanceId: string  The id of the widget instance to be removed.
save()
() => void Persists the current widget instances to the widget storage and changes the editable and isModified modes.
updateWidgetInstance(...)
(editedWidgetConfig: WidgetConfig) => void Updates the visible widgets with an updated configuration. Will update the user interface and emit on isModified .

Parameters
  • editedWidgetConfig: WidgetConfig  The config of the widget instance that was updated.

Custom header

Like the dashboard, the flexible dashboard supports a custom header, e.g. with a description or page actions. Project it using the header attribute and follow the page header guidelines. The custom header replaces the heading in the dashboard view. While adding or editing widgets, the respective title is shown instead.

<si-flexible-dashboard [dashboardId]="dashboardId" [widgetCatalog]="widgetCatalog">
  <div class="si-layout-header" header>
    <h2 class="si-layout-title si-layout-top-element">Dashboard</h2>
    <p class="si-layout-subtitle">Description</p>
  </div>
</si-flexible-dashboard>

Persistence of dashboard configuration

Widget storage api to provide the persistence layer of the widgets of a dashboard (typically from a web service). The dashboard grid uses this API to load and save the widget configurations. Applications using siemens-dashboard needs to implement this abstract class and provide it in the module configuration.
Constructor
() => {}
Properties
Optional method to provide primary and secondary toolbar menu items.
Deprecated: use provideDashboardToolbarItems to provide common toolbar items. Additionally configure individual dashboard actions via SiFlexibleDashboardComponent.primaryEditActions and SiFlexibleDashboardComponent.secondaryEditActions respectively.

getToolbarMenuItems?: (dashboardId: string) => { primary: Observable<(MenuItem | DashboardToolbarItem)[]>, secondary: Observable<(MenuItem | DashboardToolbarItem)[]> }
Methods
(dashboardId: string) => Observable<WidgetConfig[]>
Returns an observable with the dashboard widget configuration. The dashboard subscribes to the observable and updates when a new value emits.
Parameters
dashboardId?: string
(modifiedWidgets: WidgetConfig[], addedWidgets: WidgetConfig[], removedWidgets: WidgetConfig[], dashboardId: string) => Observable<WidgetConfig[]>
Saves the given widget configuration. New widgets have id generated through the SiWidgetIdProvider.generateWidgetId implementation and if ids comes from backend then it is in the responsibility of the implementor to update the ids of the new widgets with the ids returned from backend upon save. In addition, the implementor needs to check if objects that have been available before are missing. These widgets have been removed by the user. As a result of this method, the observables returned by the load() method should emit the new widget config objects, before also returning them.
Returns An observable that emits the saved widget config objects with their ids.
Parameters
The existing widget config objects to be saved.
modifiedWidgets: WidgetConfig[]
The new widget config objects to be saved.
addedWidgets: WidgetConfig[]
The widget config objects that have been removed.
removedWidgets?: WidgetConfig[]
The id of the dashboard if present to allow dashboard specific storage.
dashboardId?: string

SiWidgetCatalogComponent API Documentation

selector
si-widget-catalog

Default widget catalog implementation to show all available widgets that can be added to a dashboard. It consists of a list view, that lists all available widgets and after selection, a host in which the widget specific editor is loaded. Applications can either stay with the default catalog or implement their own by extending this class.

Input Properties

Name Type Default Description
multiSelect
boolean false Option to enable multi-select in the widget catalog. When enabled, the user can select multiple widgets to add to the dashboard at once.
searchPlaceholder
TranslatableString $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search…` Placeholder text for the search input field in the widget catalog.

Output Properties

Name Type Description
closed
(Omit<WidgetConfig, "id">[] | undefined) Emits when the catalog is closed , either by canceling or by adding or saving widget configurations. On cancel undefined is emitted, otherwise an array of the related widget configurations is emitted. In single-select mode the array always contains exactly one entry.

Attributes and Methods

Name Type Default Description
ngOnDestroy()
() => void A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
(readonly) widgetList
WritableSignal<Widget[]> [] Property to provide the available widgets to the catalog. The flexible dashboard creates the catalog by Angular's createComponent() method and sets the available widgets to this attribute.
widgetCatalog
Deprecated
Widget[] [] Property to provide the available widgets to the catalog. The flexible dashboard creates the catalog by Angular's createComponent() method and sets the available widgets to this attribute.
Deprecated: This property will be removed in v52. Use the signal widgetList instead.

SiWidgetInstanceEditorDialogComponent API Documentation

selector
si-widget-instance-editor-dialog

The Dialog component is utilized when editing a widget instance within a dashboard. It dynamically loads and creates the associated widget editor and incorporates it into its content. The dialog component is accountable for interacting with the dashboard and offers options for saving changes or terminating the editing process.

Input Properties

Name Type Default Description
widget
Required
Widget Input for the widget definition. It is required to retrieve the component factory to instantiate the widget editor.
widgetConfig
Required
WidgetConfig Input for the widget instance configuration. It is used to populate the widget editor.

Output Properties

Name Type Description
closed
(WidgetConfig | undefined) Emits the edited widget instance configuration if the user confirms by saving, or undefined if the user cancels the dialog.
editorSetupCompleted
void Emits when the editor instantiation is completed.
widgetConfigChange
WidgetConfig Input for the widget instance configuration. It is used to populate the widget editor.

Attributes and Methods

Name Type Default Description
ngOnDestroy()
() => void A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

Widget renderer

The SiWidgetRendererComponent is a presentational (dumb) component that renders a single widget instance from a WidgetConfig, without the surrounding dashboard or grid infrastructure. It takes the exact Widget definition to render and delegates the actual rendering to the widget host.

Use it to display an individual widget outside of a flexible dashboard, for example in kiosk mode or within a custom layout such as a carousel. The component is a self-contained widget cell that can be placed anywhere a single widget needs to be shown.

It requires two inputs: the widgetConfig describing the widget instance to render and the matching widget definition. The widget must match the config's widgetId.

<!-- Render a single widget instance -->
<si-widget-renderer [widgetConfig]="widgetConfig" [widget]="widget" />

SiWidgetRendererComponent API Documentation

selector
si-widget-renderer

A presentational (dumb) component that renders a single widget instance from a WidgetConfig using the provided Widget definition. It delegates the actual rendering to the SiWidgetHostComponent .

Intended Usage

This component renders an individual widget outside of a dashboard or grid, without requiring manual host wiring. It is a self-contained widget cell that can be placed anywhere a single widget needs to be shown, for example in kiosk mode or within a custom layout such as a carousel.

Example

<!-- Render a single widget instance -->
<si-widget-renderer [widgetConfig]="widgetConfig" [widget]="widget" />

Input Properties

Name Type Default Description
widget
Required
Widget The Widget definition used to render the given widgetConfig . It must match the config's widgetId .
widgetConfig
Required
WidgetConfig The configuration of the widget instance to render.

Security considerations

Widgets can be loaded via Module Federation, Native Federation or as web components from a URL. The loaded code is executed in your application. Only register widget factories that point to trusted sources.

Types Documentation

Dashboard configuration object. Inject globally using the SI_DASHBOARD_CONFIGURATION or configure individual dashboard instances.
Injection token to configure dashboards. Use { provide: SI_DASHBOARD_CONFIGURATION, useValue: config } in your app configuration.
Union type for all possible items in the dashboard toolbar.
Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit . Equivalent to a normal string in usage and functionality.
Widgets describe the entries within the widget catalog and holds all default configuration and factory functionality to instantiate a widget instance, represented as WidgetConfig objects.
Properties
The factory to instantiate a widget instance component that is added to the dashboard.
componentFactory: WidgetComponentFactory
Optional default values that can be set to widget instances.
defaults?: Pick<WidgetConfig, ("height" | "width" | "minHeight" | "minWidth" | "image" | "heading" | "accentLine" | "headingIcon" | "expandable" | "immutable")>
An optional description that is visible in the widget catalog.
description?: TranslatableString
A CSS icon class that specifies the widget icon, displayed in the catalog.
iconClass?: string
A unique id of the widget.
id: string
The name of the widget that is presented in the widget catalog.
name: TranslatableString
Optional default payload object that is copied into every widget instance WidgetConfig .
payload?: any
An optional version string.
version?: string
Interface representing an action item in the dashboard toolbar.
Properties
Action that called when the item is triggered.
action: (grid: SiGridComponent) => void
Label that is shown to the user.
label: TranslatableString
type: "action"
A WidgetConfig holds the configuration of a widget instance component that is visible on a dashboard. It can be persisted and used to restore a dashboards state.
Properties
Optional type of the accent line.
accentLine?: AccentLineType
actionBarViewType?: ViewType
Defines whether the widget instance component can be expanded and enlarged over the dashboard.
expandable?: boolean
grid item header text.
heading?: TranslatableString
Icon name or a single-entry map of camelCase icon name to SVG data URI.
headingIcon?: (string | Record<string, string>)
Height of the grid item, where number represents how many rows it takes. (default?: 1)
height?: number
A unique id of a widget instance
id: string
Optional configuration for an image to be displayed on the widget instance.
image?: WidgetImage
immutable?: boolean
isNotRemovable?: boolean
minimum height allowed during resize/creation (default?: undefined = un-constrained)
minHeight?: number
minimum width allowed during resize/creation (default?: undefined = un-constrained)
minWidth?: number
A widget specific payload object. Placeholder to pass in additional configuration.
payload?: any
If true, the widget host renders a placeholder and waits for explicit configuration before instantiating the widget instance component.

Indicates that initial setup by the user is still pending. The flag flips to false once the setup has been completed.

setupPending?: boolean
Optionally, the version widget description that was used to create the widget config.
version?: string
The id of the widget descriptor that was used to instantiate the WidgetConfig and the widget instance component.
widgetId: string
Width of the grid item, where number represents how many columns it spans (default?: 1)
width?: number
Grid item position on x axis of the grid (default?: 0)
x?: number
Grid item position on y axis of the grid (default?: 0)
y?: number
(toolbarItems: { primary: DashboardToolbarItem[], secondary: DashboardToolbarItem[] }) => Provider
Function
provider function to configure global toolbar menu items.
Parameters
primary and secondary edit actions which are common to all dashboard instances on application.
toolbarItems?: { primary: DashboardToolbarItem[], secondary: DashboardToolbarItem[] }

State to control the behavior of a widget instance editor wizard. The wizard state is used to control the behavior of the dialog buttons provided by the catalog and editor components.
Properties
disableNext?: boolean
hasNext: boolean
hasPrevious: boolean
An editor component for a widget instance need to implement this interface. After initializing the instance editor component, with widget configuration is set. Optionally, the component can emit changes during editing to control e.g. the dialog behavior like disabling the save button.
Properties
The hosting component of the widget instance editor sets the configuration after initialization. The editor component should use the configuration as input and persist all relevant changes within the config. The hosting component takes the config after adding of saving the widget instance and updates the dashboard.
config: (WidgetConfig | Omit<WidgetConfig, "id"> | InputSignal<(WidgetConfig | Omit<WidgetConfig, "id">)>)
Optionally, emit updated widget configuration using an event emitter.
configChange?: (Subject<(WidgetConfig | Omit<WidgetConfig, "id">)> | OutputEmitterRef<(WidgetConfig | Omit<WidgetConfig, "id">)>)
Optionally, inform the hosting component about widget configuration status changes.
statusChanges?: (Subject<Partial<WidgetConfigStatus>> | OutputEmitterRef<Partial<WidgetConfigStatus>>)
(CommonFactoryFields & (ModuleOptions | StandaloneOptions))
(CommonFactoryFields & LoadRemoteModuleOptions & { [ index: string ]: any } })
Factory configuration for loading widget components from a federated module. Supports both Module Federation and Native Federation patterns for micro-frontend architectures. Use this when the widget component is hosted in a separate, independently deployed application.
(CommonFactoryFields & { [ index: string ]: any } })
(CommonFactoryFields & LoadRemoteBridgeOptions & { [ index: string ]: any } })
Use this when having native federation shell and remote module is using module federation.
(StatusType | "caution" | "primary" | "inactive")
("collapsible" | "expanded" | "mobile")
Image is used to configure an image to be displayed on a widget instance.
Properties
The HTMLImageElement property alt provides fallback (alternate) text to display when the image specified by the element is not loaded.
alt: string
Defines if an image is placed on top or start (left) of the card.
dir?: ("horizontal" | "vertical")
Sets the image object-fit CSS property.
objectFit?: ObjectFit
Sets the image object-position CSS property.
objectPosition?: string
The image URL (See ).
src: string

A widget instance editor component that shall support a multi-page widget configuration can implement this interface. The wizard-like page state WidgetInstanceEditorWizardState needs to be managed by the editor itself and is used to control wizard dialog buttons that are provided by the catalog and editor component.
Properties
The hosting component of the widget instance editor sets the configuration after initialization. The editor component should use the configuration as input and persist all relevant changes within the config. The hosting component takes the config after adding of saving the widget instance and updates the dashboard.
config: (WidgetConfig | Omit<WidgetConfig, "id"> | InputSignal<(WidgetConfig | Omit<WidgetConfig, "id">)>) from config
Optionally, emit updated widget configuration using an event emitter.
configChange?: (Subject<(WidgetConfig | Omit<WidgetConfig, "id">)> | OutputEmitterRef<(WidgetConfig | Omit<WidgetConfig, "id">)>) from configChange
The current state of the multi-page widget instance editor. The state is access after #next() or #previous() is invoked.
state: WidgetInstanceEditorWizardState
Emit changes as needed during the user interaction with the editor.
stateChange?: (Subject<WidgetInstanceEditorWizardState> | OutputEmitterRef<WidgetInstanceEditorWizardState>)
Optionally, inform the hosting component about widget configuration status changes.
statusChanges?: (Subject<Partial<WidgetConfigStatus>> | OutputEmitterRef<Partial<WidgetConfigStatus>>) from statusChanges
Methods
Is invoked from the next button. Display next page as consequence. For web components, implementing next() requires adding an event listener for the next event on the element.
next: () => void
Is invoked from the previous button. Display previous page as consequence. For web components, implementing previous() requires adding an event listener for the previous event on the element.
previous: () => void
The Remote Module definition is based on @angular-architects . We take it over into this file to prevent adding a hard dependency.
Definition is based on @module-federation/enhanced loadRemote options. We take it over into this file to prevent adding a hard dependency.
("success" | "info" | "warning" | "danger" | "caution" | "critical")
Object is used to inform the editor hosting component about configuration changes to configure (e.g. enable/disable) the control buttons accordingly.
Properties
If true, save or add button will be disabled.
invalid: boolean
Indicates that the configuration was changed. If true, canceling the editor will first show a dialog to confirm the discard.
modified: boolean
("contain" | "cover" | "fill" | "none" | "scale-down")
ObjectFit configuration options for a widget image.
See https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
Returns the return value type for the given action dialog type
The hosting component of the widget instance editor sets the configuration after initialization. The editor component should use the configuration as input and persist all relevant changes within the config. The hosting component takes the config after adding of saving the widget instance and updates the dashboard.
Optionally, emit updated widget configuration using an event emitter.
Optionally, inform the hosting component about widget configuration status changes.
All possible action dialogs.
extends ActionDialogBase<AlertDialogResult>
An action dialog showing an alert
Properties
Label of the confirmation button.
confirmBtnName?: TranslatableString
Callback for delaying dismiss with a progress indicator until the returned Observable: Observable emits.
delayDismiss?: (result: "confirm") => Observable<"confirm"> from ActionDialogBase.delayDismiss
The heading.
heading?: TranslatableString from ActionDialogBase.heading
Icon displayed in the heading.
icon?: string from ActionDialogBase.icon
The message.
message?: TranslatableString from ActionDialogBase.message
Parameters for the translate pipe.
translationParams?: Record<string, any> from ActionDialogBase.translationParams
type: "alert"
An action dialog for a confirmation.
Properties
Label of the confirmation button.
confirmBtnName?: TranslatableString
Label of the decline button.
declineBtnName?: TranslatableString
Callback for delaying dismiss with a progress indicator until the returned Observable: Observable emits.
delayDismiss?: (result: ConfirmationDialogResult) => Observable<ConfirmationDialogResult> from ActionDialogBase.delayDismiss
The heading.
heading?: TranslatableString from ActionDialogBase.heading
Icon displayed in the heading.
icon?: string from ActionDialogBase.icon
The message.
message?: TranslatableString from ActionDialogBase.message
Parameters for the translate pipe.
translationParams?: Record<string, any> from ActionDialogBase.translationParams
type: "confirmation"
("confirm" | "decline")
An action dialog for an edit/discard prompt.
Properties
Label of the cancel button.
cancelBtnName?: TranslatableString
Callback for delaying dismiss with a progress indicator until the returned Observable: Observable emits.
delayDismiss?: (result: EditDiscardDialogResult) => Observable<EditDiscardDialogResult> from ActionDialogBase.delayDismiss
Whether to disable the save button.
disableSave?: boolean
Label of the discard button when disableSave is set.
disableSaveDiscardBtnName?: TranslatableString
Message when disableSave is set.
disableSaveMessage?: TranslatableString
Label of the discard button.
discardBtnName?: TranslatableString
The heading.
heading?: TranslatableString from ActionDialogBase.heading
Icon displayed in the heading.
icon?: string from ActionDialogBase.icon
The message.
message?: TranslatableString from ActionDialogBase.message
Label of the save button.
saveBtnName?: TranslatableString
Parameters for the translate pipe.
translationParams?: Record<string, any> from ActionDialogBase.translationParams
type: "edit-discard"
("save" | "discard" | "cancel")
An action dialog for a delete confirmation.
Properties
Label of the cancel button.
cancelBtnName?: TranslatableString
Callback for delaying dismiss with a progress indicator until the returned Observable: Observable emits.
delayDismiss?: (result: DeleteConfirmationDialogResult) => Observable<DeleteConfirmationDialogResult> from ActionDialogBase.delayDismiss
Label of the delete button.
deleteBtnName?: TranslatableString
The heading.
heading?: TranslatableString from ActionDialogBase.heading
Icon displayed in the heading.
icon?: string from ActionDialogBase.icon
The message.
message?: TranslatableString from ActionDialogBase.message
Parameters for the translate pipe.
translationParams?: Record<string, any> from ActionDialogBase.translationParams
type: "delete-confirm"
Properties
Optional environment Injector.
environmentInjector?: EnvironmentInjector
Optional element Injector.
injector?: Injector
Additional providers for the modal.
providers?: StaticProvider[]
Properties
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Submenu items for this menu item.
children: MenuItem[]
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "group"
Properties
Action that called when the item is triggered. A function will be called, a string will be dispatched to the SiMenuActionService .
action: (string | (actionParam: any, source: this) => void)
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "action"
Properties
Items that are part of the radio group.
children: [ MenuItemHeader, ...(MenuItemRadio | MenuItemHeader | MenuDivider)[] ]
type: "radio-group"
Properties
Action that called when the item is triggered. A function will be called, a string will be dispatched to the SiMenuActionService .
action: (string | (actionParam: any, source: this) => void)
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Whether the checkbox is checked.
checked: boolean
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "checkbox"
Properties
Action that called when the item is triggered. A function will be called, a string will be dispatched to the SiMenuActionService .
action: (string | (actionParam: any, source: this) => void)
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Whether the radio is checked.
checked: boolean
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "radio"
Properties
The label of the header.
label: string
type: "header"
Properties
type: "divider"
Reference to a modal dialog
Constructor
() => {}
Properties
The default close value of the modal.
closeValue?: CT
The modal options passed during creation.
See SiModalService

data: ModalOptions = {}
detach: () => void = () =​> {}
Custom class for modal-dialog
dialogClass: string = ''
Emits the close value when the modal is hidden.
hidden: Subject<(CT | undefined)> = ...
Close the modal with a custom close value.
hide: (reason: CT) => void = () =​> {}
ignoreBackdropClick: boolean = true
isCurrent: () => boolean = () =​> false
The layer of the modal. The modal with the highest layer will be shown on top.
layer: number = 0
Allows messaging state to consumer w/o closing the dialog.
message: Subject<(CT | undefined)> = ...
Emits the modal element reference when it is shown.
shown: ReplaySubject<ElementRef<any>> = ...
Accessors
get content: T
Methods
(reason: CT) => void
When data.disableAutoHide is set, messages the reason , otherwise calls hide .
Parameters
reason?: CT
(input: string, value: unknown) => void
Set the input of a component shown in the modal.
Parameters
input: string
value: unknown
Properties
Badge that is rendered after the label.
badge?: (string | number)
Color of the badge (not iconBadge).
badgeColor?: string
Whether the menu item id disabled.
disabled?: boolean
Optional icon that will be rendered before the label.
icon?: string
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean)
ID that will be attached to the DOM node.
id?: string
Label that is shown to the user.
label: TranslatableString
Configuration object for the si-grid component, including the options of gridstack.
Properties
The configuration options of gridstack.
gridStackOptions?: GridStackOptions
Abstract class to provide widget id generation logic.
Constructor
() => {}
Methods
(widget: Omit<WidgetConfig, "id">, dashboardId: string) => string
Generates a transient widget id for newly added widgets in edit mode.
Returns A transient widget id as a string.
Parameters
The widget instance config without any id.
widget: Omit<WidgetConfig, "id">
The id of the dashboard where the widget is added.
dashboardId?: string
Properties
Whether to enable animation.
animated?: boolean
aria-labelled-by value.
ariaLabelledBy?: string
Angular bindings for component content, created with inputBinding , outputBinding , or twoWayBinding . Ignored for template content.
bindings?: Binding[]
Additional CSS class.
class?: string
Optional environment Injector.
environmentInjector?: EnvironmentInjector from environmentInjector
When set to true, clicking the backdrop has no effect.
ignoreBackdropClick?: boolean
Optional element Injector.
injector?: Injector from injector
Use this to assign values to either @Input() or input() fields of the provided component. If a template is used, the values are available in the template context.
inputValues?: Record<string, unknown>
Handle Esc to close/message.
keyboard?: boolean
When set to true, backdrop click or Esc don't close the modal. Instead a message will be sent.
messageInsteadOfAutoHide?: boolean
Additional providers for the modal.
providers?: StaticProvider[] from providers
Property
Badge that is rendered after the label.
Property
Color of the badge (not iconBadge).
Property
Whether the menu item id disabled.
Property
Optional icon that will be rendered before the label.
Property
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
Property
ID that will be attached to the DOM node.
Label that is shown to the user.
Implement and provide this to an SiMenuFactoryComponent to receive trigger events.
Constructor
() => {}
Methods
Will be called by SiMenuFactoryComponent if an action is defined with a string instead of a function.
Parameters
item: (MenuItemAction | MenuItemCheckbox | MenuItemRadio)
actionParam?: any
imported from gridstack
Optional environment Injector.
Property
Optional element Injector.
Additional providers for the modal.
Used in events emitted from SiLinkActionService
Properties
param: any
The grid component is the actual component on which the widget instances are placed and visualized. You can think of a headless dashboard, without a title, toolbar or edit buttons.
Constructor
() => {}
Properties
An optional, but recommended dashboard id that is used in persistence and passed to the widget store for saving and loading data.
dashboardId: InputSignal<(string | undefined)> = ...
Sets the grid into editable mode, in which the widget instances can be moved, resized, removed or new ones added.
editable: ModelSignal<boolean> = false
When the user clicks edit on a widget instance, an editor need to appear and the widget editor component need to be loaded. When the grid is used standalone, it takes care and opens a modal dialog and loads the configured widget editor component. When the grid is used in a container like the flexible dashboard, the container manages where the widget instance editor is displayed. In this case this options prevents the grid from showing the editor in the dialog, and emits on widgetInstanceEdit on clicking the widget edit action.
emitWidgetInstanceEditEvents: InputSignal<boolean> = false
Configuration options for a grid instance. Default is the optional value from the SI_DASHBOARD_CONFIGURATION .
gridConfig: InputSignal<(GridConfig | undefined)> = inject(SI_DASHBOARD_CONFIGURATION)?.grid
gridStackWrapper: Signal<SiGridstackWrapperComponent> = viewChild.required(SiGridstackWrapperComponent)
Option to turn off the loading spinner on save and load operations.
hideProgressIndicator: InputSignal<boolean> = false
initialLoad: boolean = true
Indication for load and save operations.
isLoading: BehaviorSubject<boolean> = ...
Emits the modification state of the grid. It is unmodified when the visible state is equal to the loaded state from the widget storage. When the user modifies the dashboard by e.g. while moving the widgets, the dashboard is marked as modified and emits true and when the user persists the change by saving, or reverts the state by canceling, the state is unmodified again and emits false .
isModified: OutputEmitterRef<boolean> = ...
All widget instance configurations that are removed from the grid in edit mode. These instances are persistently removed on save or re-added again on cancel.
markedForRemoval: WidgetConfig[] = []
modalService: SiModalService = ...
Modified state that is emitted in the isModified output. Should only be changed using the setModified method.
modified: boolean = false
All widget instance configs that are on the grid by loading from the widget storage. Thus, these widget are persisted.
persistedWidgetInstances: WidgetConfig[] = []
storeSubscription?: Subscription
Widget instance configs that are added to the grid in edit mode, but not persisted yet, as the user did not confirm the modification by save.
transientWidgetInstances: WidgetConfig[] = []
All widget configuration objects of the visible widget instances.
visibleWidgetInstances$: BehaviorSubject<WidgetConfig[]> = ...
Provides the available widgets to the grid. When loading the widget configurations from the storage, we need to have the widget definition available to be able to create the widget instances on the grid.
widgetCatalog: InputSignal<Widget[]> = []
widgetCatalogMap: Signal<Map<string, Widget>> = ...
widgetIdProvider: SiWidgetIdProvider = ...
Emits to notify about edit events of widget instances. Only emits if emitWidgetInstanceEditEvents is set to true .
widgetInstanceEdit: OutputEmitterRef<WidgetConfig> = ...
Option to configure a custom widget instance editor dialog component. The component provides the editor hosting and the buttons to save and cancel.
widgetInstanceEditorDialogComponent: InputSignal<(Type<SiWidgetInstanceEditorDialogComponent> | undefined)> = ...
widgetStorage: SiWidgetStorage = ...
Accessors
get showEmptyState: boolean
Methods
(widgetInstanceConfig: Omit<WidgetConfig, "id">) => void
Adds a new widget instance configuration to the dashboard grid. It is not persisted yet and is added to the transient widget instances.
Parameters
The new widget configuration.
widgetInstanceConfig: Omit<WidgetConfig, "id">
Cancel current changes and restore last saved state.
cancel: () => void
Set dashboard grid in editable mode to modify widget instances.
edit: () => void
(widgetInstanceConfig: WidgetConfig) => void
Opens the provided widget configuration in the related editor or emits on widgetInstanceEdit , if emitWidgetInstanceEditEvents is true.
Parameters
The config of the widget instance to edit.
widgetInstanceConfig: WidgetConfig
(event: GridWrapperEvent) => void
Parameters
event: GridWrapperEvent
loadAndSubscribeWidgets: () => void
(changes: { addWidgetInstance: SimpleChange<(widgetInstanceConfig: Omit<WidgetConfig, "id">) => void>, cancel: SimpleChange<() => void>, dashboardId: SimpleChange<(string | undefined)>, edit: SimpleChange<() => void>, editable: false, editWidgetInstance: SimpleChange<(widgetInstanceConfig: WidgetConfig) => void>, emitWidgetInstanceEditEvents: false, gridConfig: inject(SI_DASHBOARD_CONFIGURATION)?.grid, gridStackWrapper: viewChild.required(SiGridstackWrapperComponent), hideProgressIndicator: false, isLoading: SimpleChange<BehaviorSubject<boolean>>, isModified: SimpleChange<OutputEmitterRef<boolean>>, markedForRemoval: [], ngOnChanges: SimpleChange<(changes: { readonly gridConfig?: SimpleChange<GridConfig | undefined> | undefined; readonly editable?: SimpleChange<boolean> | undefined; ... 22 more ...; updateWidgetInstance?: SimpleChange<...> | undefined; }) => void>, ngOnDestroy: SimpleChange<() => void>, ngOnInit: SimpleChange<() => void>, persistedWidgetInstances: [], removeWidgetInstance: SimpleChange<(widgetInstanceId: string) => void>, save: SimpleChange<() => void>, transientWidgetInstances: [], updateWidgetInstance: SimpleChange<(editedWidgetConfig: WidgetConfig) => void>, visibleWidgetInstances$: SimpleChange<BehaviorSubject<WidgetConfig[]>>, widgetCatalog: [], widgetInstanceEdit: SimpleChange<OutputEmitterRef<WidgetConfig>>, widgetInstanceEditorDialogComponent: SimpleChange<(Type<SiWidgetInstanceEditorDialogComponent> | undefined)> }) => void from OnChanges.ngOnChanges
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.
Parameters
The changed properties.
changes: { addWidgetInstance: SimpleChange<(widgetInstanceConfig: Omit<WidgetConfig, "id">) => void>, cancel: SimpleChange<() => void>, dashboardId: SimpleChange<(string | undefined)>, edit: SimpleChange<() => void>, editable: false, editWidgetInstance: SimpleChange<(widgetInstanceConfig: WidgetConfig) => void>, emitWidgetInstanceEditEvents: false, gridConfig: inject(SI_DASHBOARD_CONFIGURATION)?.grid, gridStackWrapper: viewChild.required(SiGridstackWrapperComponent), hideProgressIndicator: false, isLoading: SimpleChange<BehaviorSubject<boolean>>, isModified: SimpleChange<OutputEmitterRef<boolean>>, markedForRemoval: [], ngOnChanges: SimpleChange<(changes: { readonly gridConfig?: SimpleChange<GridConfig | undefined> | undefined; readonly editable?: SimpleChange<boolean> | undefined; ... 22 more ...; updateWidgetInstance?: SimpleChange<...> | undefined; }) => void>, ngOnDestroy: SimpleChange<() => void>, ngOnInit: SimpleChange<() => void>, persistedWidgetInstances: [], removeWidgetInstance: SimpleChange<(widgetInstanceId: string) => void>, save: SimpleChange<() => void>, transientWidgetInstances: [], updateWidgetInstance: SimpleChange<(editedWidgetConfig: WidgetConfig) => void>, visibleWidgetInstances$: SimpleChange<BehaviorSubject<WidgetConfig[]>>, widgetCatalog: [], widgetInstanceEdit: SimpleChange<OutputEmitterRef<WidgetConfig>>, widgetInstanceEditorDialogComponent: SimpleChange<(Type<SiWidgetInstanceEditorDialogComponent> | undefined)> }
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
ngOnDestroy: () => void from OnDestroy.ngOnDestroy
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
ngOnInit: () => void from OnInit.ngOnInit
(widgetInstanceId: string) => void
Removes a widget instance from the visible widgets and puts it in the markedForRemoval array.
Parameters
The id of the widget instance to be removed.
widgetInstanceId: string
resetEditState: () => void
restoreSavedState: () => void
Persists the current widget instances to the widget storage and changes the editable and isModified modes.
save: () => void
(modified: boolean) => void
Parameters
modified: boolean
(editedWidgetConfig: WidgetConfig) => void
Updates the visible widgets with an updated configuration. Will update the user interface and emit on isModified .
Parameters
The config of the widget instance that was updated.
editedWidgetConfig: WidgetConfig
Parameters
widgetConfigs: WidgetConfig[]
The service provides convenient methods to show common modal dialogs. All return an observable, which emit the dialog results. After emitting, the observables complete. Therefore, clients do not need to unsubscribe.
Constructor
() => {}
Properties
modalService: SiModalService = ...
Methods
Shows an action dialog
Returns Observable for the result of the dialog. Need to subscribe() to show the dialog
Parameters
The dialog configuration
dialog: T
Optional DI configuration.
diOptions?: ModalDependencyInjectionOptions
Wrapper around an actual translation framework which is meant to be used internally by Element. Applications must not use this service.

Use injectSiTranslateService to get an instance of the translation service.
Constructor
() => {}
Properties
The currently used language.
currentLanguage: (string | null)
documentRef: Document = ...
prevent$LocalizeInit?: boolean
translationChange$: Observable<void> = NEVER
Accessors
The available languages.
get availableLanguages: readonly string[]
set availableLanguages: (languages: string[])
If the underlying translation library supports switching the language and/or updating the translation texts, this observable will emit. There is no initial emit.
get translationChange: Observable<void>
Methods
The language to be used as default.
Returns The code of the default language.

getDefaultLanguage: () => (string | null)
Sets a new language to be used. If needed, loads the language file.
Returns An observable that emits when the new language is loaded and activated.
Parameters
The language to be used.
lang: string
The language to be used as default.
Parameters
The language code.
lang: string
Parameters
lang: string
(key: string, value: string) => void
If supported by the underlying translation library, this method can be used to add a translation for a specific key.
It is intended to be used for adding the english default value.
It will be called whenever a key within element is resolved.
An implementation of this method must check that it does not override an existing translation.
Parameters
key: string
value: string
<(T: (string | string[]))> (keys: T, params: Record<string, unknown>) => (TranslationResult<T> | Observable<TranslationResult<T>>)
Translates the key(s) by using the underlying translation library.
Returns Returns the translated key or an object with the translated keys. Depending on the underlying translation library (sync/async) the result will be wrapped in an Observable.
Parameters
A single translation key or an array of keys.
keys: T
Parameters to be replaced within the translation text.
params?: Record<string, unknown>
<(T: (string | string[]))> (keys: T, params: Record<string, unknown>) => Observable<TranslationResult<T>>
Translates the key(s) by using the underlying translation library in an asynchronous manner. It will emit each time the active language is changed.
Returns Returns the translated key or an object with the translated keys wrapped in an Observable.
Parameters
A single translation key or an array of keys.
keys: T
Parameters to be replaced within the translation text.
params?: Record<string, unknown>
<(T: (string | string[]))> (keys: T, params: Record<string, unknown>) => TranslationResult<T>
Translates the key(s) by using the underlying translation library in a synchronous manner.

Warning: The caller of this function needs to make sure the translation file(s) are already loaded. It is generally not recommended to use this function unless you know exactly what you are doing.

Returns Returns the translated key or an object with the translated keys.
Parameters
A single translation key or an array of keys.
keys: T
Parameters to be replaced within the translation text.
params?: Record<string, unknown>
Constructor
() => {}
Properties
appRef: ApplicationRef = ...
environmentInjector: EnvironmentInjector = ...
injector: Injector = ...
modalsCount: number = 0
overlay: Overlay = ...
Methods
<T, CT> (modalRef: ModalRefImpl<T, CT>) => ComponentRef<SiModalComponent>
Parameters
modalRef: ModalRefImpl<T, CT>
buildInjector: () => Injector
(modalRef: ModalRef<unknown, any>) => void
Parameters
modalRef: ModalRef<unknown, any>
<T, CT> (injector: Injector, modalRef: ModalRefImpl<T, CT>) => Node[][]
Parameters
injector: Injector
modalRef: ModalRefImpl<T, CT>
<T, CT: any> (content: (TemplateRef<any> | (args: any[]) => {}), config: ModalOptions<T>, closeValue: CT) => ModalRef<T, CT>
Shows a modal with the given content and configuration.
Returns A reference to the modal.
Parameters
Content to be displayed in the modal can be a template reference or a component.
content: (TemplateRef<any> | (args: any[]) => {})
Configuration for the modal.
config: ModalOptions<T>
Default closing value which can be overridden by calling modalRef.hide(value) .
closeValue?: CT
Constructor
() => {}
Properties
Parameter passed to triggered menu item actions.
actionParam: InputSignal<unknown> = ...
Menu items to render. Supports legacy and current menu item models.
items: InputSignal<(readonly (MenuItem | MenuItem)[] | undefined)> = ...
linkActionService: (SiLinkActionService | null) = ...
menuActionService: (SiMenuActionService | null) = ...
Methods
Parameters
item: (MenuItem | MenuItem)
(item: (MenuItem | MenuItem)) => item is MenuItem
Parameters
item: (MenuItem | MenuItem)
Parameters
item: MenuItem
Parameters
item: (MenuItemAction | MenuItemCheckbox | MenuItemRadio)
(index: number, item: (MenuItem | MenuItem)) => (string | number)
Parameters
index: number
item: (MenuItem | MenuItem)
Constructor
() => {}
Properties
Observable which emits the link and param to run the action on.
action$: Observable<LinkAction> = this.actionSubject.asObservable()
actionSubject: Subject<LinkAction> = ...
Methods
(link: Link, param: any) => void
Emit a new link and param pair to run the action on.
Parameters
param: any

Except where otherwise noted, content on this site is licensed under MIT License.