SiWidgetCatalogComponent documentation¶
import { SiWidgetCatalogComponent } from '@siemens/dashboards-ng';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 |
Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| widgetCatalogdeprecated ¶ | Widget[] | [] | Property to provide the available widgets to the catalog. The flexible dashboard creates the catalog by Angular's Deprecated: This property will be removed in v52. Use the signal |
| (readonly) widgetList ¶ | WritableSignal<Widget[]> | [] | Property to provide the available widgets to the catalog. The flexible dashboard creates the catalog by Angular's |
Types Documentation¶
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';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.
import type { WidgetConfig } from '@siemens/dashboards-ng';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.
-
Optional type of the accent line.
-
Defines whether the widget instance component can be expanded and enlarged over the dashboard.
-
grid item header text.
-
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)
-
A unique id of a widget instance
-
Optional configuration for an image to be displayed on the widget instance.
-
minimum height allowed during resize/creation (default?: undefined = un-constrained)
-
minimum width allowed during resize/creation (default?: undefined = un-constrained)
-
A widget specific payload object. Placeholder to pass in additional configuration.
-
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
falseonce the setup has been completed. -
Optionally, the version widget description that was used to create the widget config.
-
The id of the widget descriptor that was used to instantiate the
WidgetConfigand the widget instance component. -
Width of the grid item, where number represents how many columns it spans (default?: 1)
-
Grid item position on x axis of the grid (default?: 0)
-
Grid item position on y axis of the grid (default?: 0)
import type { Widget } from '@siemens/dashboards-ng';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.
-
The factory to instantiate a widget instance component that is added to the dashboard.
-
Optional default values that can be set to widget instances.
defaults?:
Pick<WidgetConfig, "width" | "height" | "minWidth" | "minHeight" | "heading" | "headingIcon" | "expandable" | "immutable" | "image" | "accentLine">¶ -
An optional description that is visible in the widget catalog.
-
A CSS icon class that specifies the widget icon, displayed in the catalog.
-
A unique id of the widget.
-
The name of the widget that is presented in the widget catalog.
-
Optional default payload object that is copied into every widget instance WidgetConfig.
-
An optional version string.
import type { ViewType } from '@siemens/element-ng/content-action-bar'; import type { WidgetImage } from '@siemens/dashboards-ng';Image is used to configure an image to be displayed on a widget instance.
-
The HTMLImageElement property alt provides fallback (alternate) text to display when the image specified by the <img> element is not loaded.
-
Defines if an image is placed on top or start (left) of the card.
-
Sets the image object-fit CSS property.
-
Sets the image object-position CSS property.
-
The image URL (See <img>).
import type { AccentLineType } from '@siemens/element-ng/common'; import type { WidgetComponentFactory } from '@siemens/dashboards-ng';Factory type that is either a WidgetComponentTypeFactory, FederatedModule, FederatedBridgeModule or WebComponent.
import type { ObjectFit } from '@siemens/dashboards-ng';ObjectFit configuration options for a widget image.
See: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
import type { StatusType } from '@siemens/element-ng/common'; import type { WidgetComponentTypeFactory } from '@siemens/dashboards-ng'; FederatedModule
CommonFactoryFields & LoadRemoteModuleOptions & { factoryType: 'module-federation' | 'native-federation'; [index: string]: any; } ¶import type { FederatedModule } from '@siemens/dashboards-ng';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.
WebComponent
CommonFactoryFields & { factoryType: 'web-component'; url: string; [index: string]: any; } ¶import type { WebComponent } from '@siemens/dashboards-ng'; FederatedBridgeModule
CommonFactoryFields & LoadRemoteBridgeOptions & { factoryType: 'native-federation-module-bridge'; [index: string]: any; } ¶import type { FederatedBridgeModule } from '@siemens/dashboards-ng';Use this when having native federation shell and remote module is using module federation.
CommonFactoryFields
{ componentName: string; editorComponentName?: string; /** * CSS class that is added to the modal dialog when component editor dialog is shown. * Provides the option to change the size if the dialog. */ editorModalClass?: string; } ¶-
CSS class that is added to the modal dialog when component editor dialog is shown. Provides the option to change the size if the dialog.
ModuleOptions
WidgetComponentTypeBaseConfig & { moduleName: string; moduleLoader: (name: string) => Promise<any>; componentLoader?: never; } ¶Use when component is not standalone and part of a module
-
factoryType?:
"default"¶ -
moduleLoader:
(name: string) => Promise<any>¶
StandaloneOptions
WidgetComponentTypeBaseConfig & { componentLoader: <T = unknown>(componentName: string) => Promise<Type<T>>; moduleName?: never; moduleLoader?: never; } ¶Use when component is standalone
-
componentLoader:
<T = unknown>(componentName: string) => Promise<Type<T>>¶ -
factoryType?:
"default"¶
import type { LoadRemoteModuleOptions } from '@siemens/dashboards-ng';The Remote Module definition is based on @angular-architects. We take it over into this file to prevent adding a hard dependency.
LoadRemoteBridgeOptions
{ id: string; options?: | { loadFactory?: boolean | undefined; from: 'build' | 'runtime'; } | undefined; } ¶import type { LoadRemoteBridgeOptions } from '@siemens/dashboards-ng';Definition is based on @module-federation/enhanced loadRemote options. We take it over into this file to prevent adding a hard dependency.
-
factoryType?:
"default"¶
LoadRemoteModuleScriptOptions
{ type?: 'script'; remoteEntry?: string; remoteName: string; exposedModule: string; /** * Optional nonce value applied to the script element for Content Security Policy (CSP) support. * Supported in Module Federation v21.2.0+; safely ignored by earlier versions. */ nonce?: string; } ¶import type { LoadRemoteModuleScriptOptions } from '@siemens/dashboards-ng'; import type { LoadRemoteModuleEsmOptions } from '@siemens/dashboards-ng'; import type { LoadRemoteModuleManifestOptions } from '@siemens/dashboards-ng'; Except where otherwise noted, content on this site is licensed under MIT License.