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.
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.
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.
Title (optional), 2. Editing options (optional), 3. Content area, 4. Save and cancel button
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.
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.
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.
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 .
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.
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.
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.
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 .
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.
Saves the given widget configuration. Existing widgets have a id . New widgets have no id and it is in the responsibility of the implementor to set the ids of the new widgets. 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.
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.
Emits when the catalog is closed , either by canceling or by adding or saving a widget configuration. On cancel undefined is emitted, otherwise the related widget configuration is emitted.
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.
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.
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.
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.
Widget instance editor components can use this property to indicate an invalid configuration. True if the config is invalid. False, undefined or null indicate a valid configuration. Deprecated: Use the statusChanges emitter to notify about configuration status changes. invalid?: boolean¶
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.
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">)>)¶
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¶
The current state of the multi-page widget instance editor. The state is access after #next() or #previous() is invoked. state: WidgetInstanceEditorWizardState¶
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 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.
Callback for delaying dismiss with a progress indicator until the returned Observable: Observable emits. delayDismiss?: (result: "confirm") => Observable<"confirm"> from ActionDialogBase.delayDismiss¶
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¶
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)¶
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¶
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¶
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¶
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)¶
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¶
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)¶
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¶
Assign all values to the target component using Object.assign(component, initialState) . Deprecated: Use inputValues instead. initialState?: Partial<T>¶
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>¶
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.
A function that will be invoked when clicking on the menu item. When passed as a string, use together with SiLinkActionService to receive events. This is meant for repetitive things in lists/tables/etc. action?: (string | (param: any) => any)¶
A boolean that lets the link know whether it is disabled or not. disabled?: boolean¶
Defines a href URI that the menu item will be linked to. Will be used to set the href attribute of the a element. Will only be used if link and function is not set. href?: string¶
A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route. isActive?: boolean¶
Defines the link of the menu item within the application using the angular router link concept. Accepts an array of any as per [routerLink API definition] https://angular.dev/api/router/RouterLink . link?: (string | 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.
An optional, but recommended dashboard id that is used in persistence and passed to the widget store for saving and loading data. dashboardId: InputSignal<(undefined | string)> = ...¶
Sets the grid into editable mode, in which the widget instances can be moved, resized, removed or new ones added. editable: ModelSignal<boolean> = false¶
This is the internal owner of the current editable state and is used to track if editable or not. Not editable can be changed by either calling the edit() api method or by setting the editable input. When setting the input, the ngOnChanges(...) hook is used to call the edit() method. Similar, to get from editable to not editable, cancel() or save() is used and can be triggered from ngOnChanges(...) . editableInternal: 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¶
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> = ...¶
Service used to indicate load and save indication. Deprecated: Use isLoading instead. loadingService: SiLoadingService = inject(SiLoadingService)¶
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[] = []¶
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[] = []¶
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[] = []¶
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[]> = []¶
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.
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¶
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.