@spike-rabbit/dashboards-ng 49.0.1 → 49.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +190 -44
- package/fesm2022/spike-rabbit-dashboards-ng-module-federation.mjs +15 -22
- package/fesm2022/spike-rabbit-dashboards-ng-module-federation.mjs.map +1 -1
- package/fesm2022/spike-rabbit-dashboards-ng-native-federation-mf-bridge.mjs +31 -0
- package/fesm2022/spike-rabbit-dashboards-ng-native-federation-mf-bridge.mjs.map +1 -0
- package/fesm2022/spike-rabbit-dashboards-ng-native-federation.mjs +30 -0
- package/fesm2022/spike-rabbit-dashboards-ng-native-federation.mjs.map +1 -0
- package/fesm2022/spike-rabbit-dashboards-ng-translate.mjs +1 -1
- package/fesm2022/spike-rabbit-dashboards-ng-translate.mjs.map +1 -1
- package/fesm2022/spike-rabbit-dashboards-ng.mjs +936 -712
- package/fesm2022/spike-rabbit-dashboards-ng.mjs.map +1 -1
- package/module-federation/package.json +2 -1
- package/native-federation/mf-bridge/package.json +4 -0
- package/native-federation/package.json +4 -0
- package/package.json +40 -16
- package/translate/package.json +2 -1
- package/types/spike-rabbit-dashboards-ng-native-federation-mf-bridge.d.ts +9 -0
- package/types/spike-rabbit-dashboards-ng-native-federation.d.ts +3 -0
- package/{translate/index.d.ts → types/spike-rabbit-dashboards-ng-translate.d.ts} +8 -1
- package/{index.d.ts → types/spike-rabbit-dashboards-ng.d.ts} +337 -189
- package/template-i18n.json +0 -35
- /package/{module-federation/index.d.ts → types/spike-rabbit-dashboards-ng-module-federation.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spike-rabbit-dashboards-ng.mjs","sources":["../../../../projects/dashboards-ng/src/model/gridstack.model.ts","../../../../projects/dashboards-ng/src/model/configuration.ts","../../../../projects/dashboards-ng/src/model/si-widget-storage.ts","../../../../projects/dashboards-ng/src/components/dashboard-toolbar/si-dashboard-toolbar.component.ts","../../../../projects/dashboards-ng/src/components/dashboard-toolbar/si-dashboard-toolbar.component.html","../../../../projects/dashboards-ng/src/services/si-grid.service.ts","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-wrapper-base.component.ts","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-editor-wrapper.component.ts","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-wrapper.component.html","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-wrapper.component.ts","../../../../projects/dashboards-ng/src/widget-loader.ts","../../../../projects/dashboards-ng/src/components/widget-host/si-widget-host.component.ts","../../../../projects/dashboards-ng/src/components/widget-host/si-widget-host.component.html","../../../../projects/dashboards-ng/src/components/gridstack-wrapper/si-gridstack-wrapper.component.ts","../../../../projects/dashboards-ng/src/components/gridstack-wrapper/si-gridstack-wrapper.component.html","../../../../projects/dashboards-ng/src/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.ts","../../../../projects/dashboards-ng/src/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.html","../../../../projects/dashboards-ng/src/components/grid/si-grid.component.ts","../../../../projects/dashboards-ng/src/components/grid/si-grid.component.html","../../../../projects/dashboards-ng/src/model/widgets.model.ts","../../../../projects/dashboards-ng/src/components/widget-catalog/si-widget-catalog.component.ts","../../../../projects/dashboards-ng/src/components/widget-catalog/si-widget-catalog.component.html","../../../../projects/dashboards-ng/src/components/flexible-dashboard/si-flexible-dashboard.component.ts","../../../../projects/dashboards-ng/src/components/flexible-dashboard/si-flexible-dashboard.component.html","../../../../projects/dashboards-ng/src/public-api.module.ts","../../../../projects/dashboards-ng/src/public-api.ts","../../../../projects/dashboards-ng/src/spike-rabbit-dashboards-ng.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { BOOTSTRAP_BREAKPOINTS } from '@spike-rabbit/element-ng/resize-observer';\nimport { GridStackOptions } from 'gridstack';\n\n/**\n * Configuration object for the si-grid component, including\n * the options of gridstack.\n */\nexport interface GridConfig {\n /**\n * The configuration options of gridstack.\n */\n gridStackOptions?: GridStackOptions;\n}\n\n/**\n * The default gridstack configuration options.\n */\nexport const DEFAULT_GRIDSTACK_OPTIONS: GridStackOptions = {\n handle: '.draggable-overlay',\n cellHeight: 100,\n columnOpts: { breakpoints: [{ w: BOOTSTRAP_BREAKPOINTS.smMinimum, c: 1 }] },\n column: 12,\n margin: '0',\n placeholderClass: 'si-grid-stack-placeholder'\n};\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { InjectionToken } from '@angular/core';\n\nimport { DEFAULT_GRIDSTACK_OPTIONS, GridConfig } from './gridstack.model';\n\n/**\n * Dashboard configuration object. Inject globally using the {@link SI_DASHBOARD_CONFIGURATION}\n * or configure individual dashboard instances.\n */\nexport type Config = {\n grid?: GridConfig;\n};\n\n/**\n * Injection token to configure dashboards. Use `{ provide: SI_DASHBOARD_CONFIGURATION, useValue: config }`\n * in your app configuration.\n */\nexport const SI_DASHBOARD_CONFIGURATION = new InjectionToken<Config>(\n 'Injection token to configure dashboards.',\n {\n providedIn: 'root',\n factory: () => ({ grid: { gridStackOptions: DEFAULT_GRIDSTACK_OPTIONS } })\n }\n);\n\n/**\n * @deprecated Use SI_DASHBOARD_CONFIGURATION instead.\n */\nexport const CONFIG_TOKEN = SI_DASHBOARD_CONFIGURATION;\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { inject, InjectionToken } from '@angular/core';\nimport { MenuItem } from '@spike-rabbit/element-ng/common';\nimport { BehaviorSubject, Observable, of } from 'rxjs';\n\nimport { DashboardToolbarItem } from './si-dashboard-toolbar.model';\nimport { WidgetConfig } from './widgets.model';\n\n/**\n * Injection token to configure your widget store implementation. Use\n * `{ provide: SI_WIDGET_STORE, useClass: AppWidgetStorage }` in your app configuration.\n */\nexport const SI_WIDGET_STORE = new InjectionToken<SiWidgetStorage>(\n 'Injection token to configure your widget store implementation.',\n { providedIn: 'root', factory: () => new SiDefaultWidgetStorage() }\n);\n\n/**\n * Widget storage api to provide the persistence layer of the widgets of a dashboard\n * (typically from a web service). The dashboard grid uses this API to load and save\n * the widget configurations. Applications using siemens-dashboard needs to implement\n * this abstract class and provide it in the module configuration.\n */\nexport abstract class SiWidgetStorage {\n /**\n * Returns an observable with the dashboard widget configuration. The dashboard subscribes to the\n * observable and updates when a new value emits.\n */\n abstract load(dashboardId?: string): Observable<WidgetConfig[]>;\n\n /**\n * Saves the given widget configuration. Existing widgets have a `id`. New widgets have no `id`\n * and it is in the responsibility of the implementor to set the ids of the new widgets. In addition,\n * the implementor needs to check if objects that have been available before are missing. These\n * widgets have been removed by the user. As a result of this method, the observables returned\n * by the `load()` method should emit the new widget config objects, before also returning them.\n * @param widgets - The existing and new widget config objects to be saved.\n */\n abstract save(\n widgets: (WidgetConfig | Omit<WidgetConfig, 'id'>)[],\n removedWidgets?: WidgetConfig[],\n dashboardId?: string\n ): Observable<WidgetConfig[]>;\n\n /**\n * Optional method to provide primary and secondary toolbar menu items.\n * @param dashboardId - The id of the dashboard if present to allow dashboard specific menu items.\n */\n getToolbarMenuItems?: (dashboardId?: string) => {\n primary: Observable<(MenuItem | DashboardToolbarItem)[]>;\n secondary: Observable<(MenuItem | DashboardToolbarItem)[]>;\n };\n}\n\n/**\n * The {@link SiDefaultWidgetStorage} uses this key to persist the dashboard\n * configurations in the session of local storage.\n */\nexport const STORAGE_KEY = 'dashboard-store';\n\n/**\n * Injection token to optionally inject the {@link Storage} implementation\n * that will be used by the {@link SiDefaultWidgetStorage}. The default implementation\n * is {@link sessionStorage}.\n *\n * @example\n * The following shows how to provide the localStorage.\n * ```\n * providers: [..., { provide: DEFAULT_WIDGET_STORAGE_TOKEN, useValue: localStorage }]\n * ```\n *\n */\nexport const DEFAULT_WIDGET_STORAGE_TOKEN = new InjectionToken<Storage>(\n 'default storage for dashboard store'\n);\n\n/**\n * Default implementation of {@link SiWidgetStorage} that uses the\n * {@link Storage} implementation provided by the {@link DEFAULT_WIDGET_STORAGE_TOKEN}.\n * In general, it persists the dashboard's configurations in the Browser's session or local\n * storage. *\n */\nexport class SiDefaultWidgetStorage extends SiWidgetStorage {\n storage: Storage;\n\n private map = new Map<string, BehaviorSubject<WidgetConfig[]>>();\n private widgets?: BehaviorSubject<WidgetConfig[]>;\n\n constructor() {\n super();\n this.storage = inject(DEFAULT_WIDGET_STORAGE_TOKEN, { optional: true }) ?? sessionStorage;\n }\n\n load(dashboardId?: string): Observable<WidgetConfig[]> {\n if (!dashboardId) {\n this.widgets ??= new BehaviorSubject<WidgetConfig[]>(this.loadFromStorage());\n return this.widgets;\n } else if (!this.map.has(dashboardId)) {\n this.map.set(\n dashboardId,\n new BehaviorSubject<WidgetConfig[]>(this.loadFromStorage(dashboardId))\n );\n }\n return this.map.get(dashboardId)!;\n }\n\n save(\n widgets: (WidgetConfig | Omit<WidgetConfig, 'id'>)[],\n removedWidgets?: WidgetConfig[],\n dashboardId?: string\n ): Observable<WidgetConfig[]> {\n const newWidgets = widgets.map(widget => {\n if ((widget as WidgetConfig).id === undefined) {\n return { ...widget, id: Math.random().toString(36).substring(2, 9) };\n } else {\n return widget as WidgetConfig;\n }\n });\n this.update(newWidgets, dashboardId);\n return of(newWidgets);\n }\n\n protected update(newConfigs: WidgetConfig[], dashboardId?: string): void {\n const widgets$ = this.load(dashboardId) as BehaviorSubject<WidgetConfig[]>;\n widgets$.next(newConfigs);\n if (!dashboardId) {\n this.storage.setItem(STORAGE_KEY, JSON.stringify(newConfigs));\n } else {\n this.storage.setItem(`${STORAGE_KEY}-${dashboardId}`, JSON.stringify(newConfigs));\n }\n }\n\n protected loadFromStorage(dashboardId?: string): WidgetConfig[] {\n let configStr;\n if (!dashboardId) {\n configStr = this.storage.getItem(STORAGE_KEY);\n } else {\n configStr = this.storage.getItem(`${STORAGE_KEY}-${dashboardId}`);\n }\n\n let widgetConfigs: WidgetConfig[] = [];\n if (configStr) {\n widgetConfigs = JSON.parse(configStr);\n }\n return widgetConfigs;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { NgClass } from '@angular/common';\nimport { Component, computed, inject, input, model, output, ViewChild } from '@angular/core';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport { MenuItem } from '@spike-rabbit/element-ng/common';\nimport { SiContentActionBarComponent } from '@spike-rabbit/element-ng/content-action-bar';\nimport { SiLinkDirective } from '@spike-rabbit/element-ng/link';\nimport { SiLoadingSpinnerComponent } from '@spike-rabbit/element-ng/loading-spinner';\nimport { SiResponsiveContainerDirective } from '@spike-rabbit/element-ng/resize-observer';\nimport { SiTranslateModule, t } from '@spike-rabbit/element-translate-ng/translate';\n\nimport { DashboardToolbarItem } from '../../model/si-dashboard-toolbar.model';\n\n/**\n * The toolbar of the flexible dashboard is either `editable` or not. When not\n * `editable`, it supports content projection for applications to inject toolbar\n * controls for e.g. filtering. Use the attribute `filters-slot` to inject the filters.\n * In addition it shows the button to switch to the `editable`. When `editable`, it support\n * the cancel and save buttons, as well as displaying primary and secondary actions.\n */\n@Component({\n selector: 'si-dashboard-toolbar',\n imports: [\n SiContentActionBarComponent,\n SiLinkDirective,\n SiLoadingSpinnerComponent,\n SiTranslateModule,\n RouterLink,\n NgClass,\n SiResponsiveContainerDirective\n ],\n templateUrl: './si-dashboard-toolbar.component.html',\n styleUrl: './si-dashboard-toolbar.component.scss'\n})\nexport class SiDashboardToolbarComponent {\n /**\n * Set primary actions that are in `editable` mode first visible or in\n * the expanded content action bar of the toolbar.\n *\n * @defaultValue []\n */\n readonly primaryEditActions = input<(MenuItem | DashboardToolbarItem)[]>([]);\n\n /**\n * Set secondary actions that are in `editable` mode second visible or in\n * the dropdown part of the content action bar of the toolbar.\n *\n * @defaultValue [] */\n readonly secondaryEditActions = input<(MenuItem | DashboardToolbarItem)[]>([]);\n\n /**\n * Input to disable the save button. Note, the input `disabled` disables all\n * actions and the save button of the toolbar.\n *\n * @defaultValue true\n */\n readonly disableSaveButton = model(true);\n\n /**\n * Input to disable all actions and buttons of the toolbar.\n *\n * @defaultValue false */\n readonly disabled = input(false);\n\n /**\n * Input option to set the `editable` mode. When editable\n * the toolbar shows a cancel and save button. Otherwise,\n * it displays an edit button.\n *\n * @defaultValue false */\n readonly editable = model(false);\n\n /**\n * Option to hide the dashboard edit button.\n *\n * @defaultValue false\n */\n readonly hideEditButton = input(false);\n\n /**\n * Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.\n *\n * @defaultValue false\n */\n readonly showEditButtonLabel = input(false);\n\n /**\n * Emits on save button click.\n */\n readonly save = output<void>();\n\n /**\n * Emits on cancel button click.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly cancel = output<void>();\n\n protected labelEdit = t(() => $localize`:@@DASHBOARD.EDIT:Edit`);\n protected labelCancel = t(() => $localize`:@@DASHBOARD.CANCEL:Cancel`);\n protected labelSave = t(() => $localize`:@@DASHBOARD.SAVE:Save`);\n\n protected readonly activatedRoute = inject(ActivatedRoute, { optional: true });\n\n @ViewChild(SiResponsiveContainerDirective)\n protected dashboardToolbarContainer!: SiResponsiveContainerDirective;\n\n protected readonly showContentActionBar = computed(\n () => this.primaryEditActions()?.length + this.secondaryEditActions()?.length > 3\n );\n\n protected readonly editActions = computed(() => [\n ...this.primaryEditActions(),\n ...this.secondaryEditActions()\n ]);\n\n protected onEdit(): void {\n this.editable.set(true);\n }\n\n protected onSave(): void {\n if (this.editable()) {\n this.save.emit();\n }\n }\n\n protected onCancel(): void {\n if (this.editable()) {\n this.cancel.emit();\n }\n }\n\n protected isToolbarItem(item: MenuItem | DashboardToolbarItem): item is DashboardToolbarItem {\n return 'label' in item;\n }\n\n protected showEditButtonLabelDesktop(): boolean {\n return this.showEditButtonLabel() && !this.dashboardToolbarContainer?.xs();\n }\n}\n","<div class=\"row mb-3\" siResponsiveContainer>\n <div class=\"col-12 d-flex justify-content-between\">\n @if (!editable()) {\n <ng-content select=\"[filters-slot]\" />\n @if (!hideEditButton()) {\n <button\n type=\"button\"\n class=\"btn ms-auto\"\n [ngClass]=\"\n showEditButtonLabelDesktop()\n ? 'btn-secondary'\n : 'btn-circle btn-sm btn-tertiary element-edit'\n \"\n [attr.aria-label]=\"labelEdit | translate\"\n [attr.title]=\"!showEditButtonLabelDesktop() ? (labelEdit | translate) : undefined\"\n [disabled]=\"disabled()\"\n (click)=\"onEdit()\"\n >\n @if (showEditButtonLabelDesktop()) {\n {{ labelEdit | translate }}\n }\n </button>\n }\n } @else {\n @if (showContentActionBar()) {\n <si-content-action-bar\n toggleItemLabel=\"toggle\"\n viewType=\"expanded\"\n [disabled]=\"disabled()\"\n [primaryActions]=\"primaryEditActions()\"\n [secondaryActions]=\"secondaryEditActions()\"\n />\n } @else {\n <div>\n @for (action of editActions(); track $index) {\n @if (isToolbarItem(action)) {\n @if (disabled()) {\n <!-- Links do not support disabled, so we need to render a button instead in this case. -->\n <button type=\"button\" class=\"btn btn-secondary me-4\" disabled>\n {{ action.label! | translate }}\n </button>\n } @else {\n @switch (action.type) {\n @case ('action') {\n <!-- eslint-disable @angular-eslint/template/no-any -->\n <!-- This item has a patched action which will inject the grid. But our types do not reflect this. -->\n <!-- TODO: make our types reflect that this item has a patched action. -->\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n (click)=\"$any(action.action)()\"\n >\n {{ action.label! | translate }}\n </button>\n <!-- eslint-disable-enable @angular-eslint/template/no-any -->\n }\n @case ('router-link') {\n <a\n class=\"btn btn-secondary me-4\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n >\n {{ action.label! | translate }}\n </a>\n }\n @case ('link') {\n <a class=\"btn btn-secondary me-4\" [href]=\"action.href\" [target]=\"action.target\">\n {{ action.label! | translate }}\n </a>\n }\n }\n }\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n [siLink]=\"action\"\n >\n {{ action.title! | translate }}\n </button>\n }\n }\n </div>\n }\n <div>\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n (click)=\"onCancel()\"\n >\n {{ labelCancel | translate }}\n </button>\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"disableSaveButton() || disabled()\"\n (click)=\"onSave()\"\n >\n @if (disabled()) {\n <si-loading-spinner />\n } @else {\n <span>{{ labelSave | translate }}</span>\n }\n </button>\n </div>\n }\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { Widget } from '../model/widgets.model';\n\n@Injectable()\nexport class SiGridService {\n /** @defaultValue [] */\n widgetCatalog: Widget[] = [];\n\n /**\n * Observable that emits true if si-grid is set to editable.\n * The owner of the editable state is the si-grid component.\n * This subject is used to propagate these state changes via\n * the si-widget-host components to the widgets.\n */\n editable$ = new BehaviorSubject<boolean>(false);\n\n getWidget(id: string): Widget | undefined {\n return this.widgetCatalog.find(widget => widget.id === id);\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n inject,\n Input,\n Renderer2,\n ViewChild,\n DOCUMENT\n} from '@angular/core';\n\nimport { WidgetConfig } from '../../model/widgets.model';\n\n@Component({\n template: ''\n})\nexport class SiWebComponentWrapperBaseComponent implements AfterViewInit {\n private _config!: WidgetConfig;\n get config(): WidgetConfig {\n return this._config;\n }\n\n @Input() set config(config: WidgetConfig) {\n this._config = config;\n if (this.webComponentHost.nativeElement.children.length > 0) {\n this.webComponentHost.nativeElement.children[0].config = config;\n }\n }\n\n @Input() elementTagName!: string;\n @Input() url!: string;\n @ViewChild('webComponentHost', { static: true, read: ElementRef })\n protected webComponentHost!: ElementRef;\n protected webComponent?: HTMLElement;\n\n private renderer2 = inject(Renderer2);\n private document = inject(DOCUMENT);\n\n ngAfterViewInit(): void {\n if (!this.isScriptLoaded(this.url)) {\n const script = this.renderer2.createElement('script');\n script.src = this.url;\n this.renderer2.appendChild(this.document.body, script);\n }\n\n this.webComponent = this.renderer2.createElement(this.elementTagName);\n (this.webComponent as any).config = this.config;\n }\n\n private isScriptLoaded(url: string): boolean {\n const script = document.querySelector(`script[src='${url}']`);\n return script ? true : false;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { AfterViewInit, Component, OnDestroy } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport {\n WidgetConfig,\n WidgetConfigStatus,\n WidgetInstanceEditor,\n WidgetInstanceEditorWizard,\n WidgetInstanceEditorWizardState\n} from '../../model/widgets.model';\nimport { SiWebComponentWrapperBaseComponent } from './si-web-component-wrapper-base.component';\n\n@Component({\n selector: 'si-web-component-editor-wrapper',\n templateUrl: './si-web-component-wrapper.component.html'\n})\nexport class SiWebComponentEditorWrapperComponent\n extends SiWebComponentWrapperBaseComponent\n implements WidgetInstanceEditor, WidgetInstanceEditorWizard, AfterViewInit, OnDestroy\n{\n state!: WidgetInstanceEditorWizardState;\n stateChange = new Subject<WidgetInstanceEditorWizardState>();\n configChange = new Subject<WidgetConfig | Omit<WidgetConfig, 'id'>>();\n\n /**\n * This will be set when setupWidgetInstanceEditor is executed\n */\n statusChangesHandler?: (statusChanges: Partial<WidgetConfigStatus>) => void;\n\n private webComponentEventListener = (event: any): void => this.configChange.next(event.detail);\n\n private webComponentStateChangeListener = (event: any): void => {\n this.state = event.detail;\n this.stateChange.next(event.detail);\n };\n private webComponentStatusChangesListener = (event: any): void => {\n this.statusChangesHandler?.(event.detail);\n };\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.webComponent?.addEventListener('stateChange', this.webComponentStateChangeListener);\n this.webComponent?.addEventListener('statusChanges', this.webComponentStatusChangesListener);\n this.webComponent?.addEventListener('configChange', this.webComponentEventListener);\n this.webComponentHost.nativeElement.appendChild(this.webComponent);\n }\n\n ngOnDestroy(): void {\n this.webComponent?.removeEventListener('stateChange', this.webComponentStateChangeListener);\n this.webComponent?.removeEventListener('statusChanges', this.webComponentStatusChangesListener);\n this.webComponent?.removeEventListener('configChange', this.webComponentEventListener);\n }\n\n next(): void {\n this.webComponent?.dispatchEvent(new CustomEvent('next'));\n }\n\n previous(): void {\n this.webComponent?.dispatchEvent(new CustomEvent('previous'));\n }\n}\n","<div #webComponentHost class=\"h-100\"></div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { AfterViewInit, Component, EventEmitter, Input, OnDestroy } from '@angular/core';\nimport { MenuItem as MenuItemLegacy } from '@spike-rabbit/element-ng/common';\nimport { ContentActionBarMainItem } from '@spike-rabbit/element-ng/content-action-bar';\nimport { MenuItem } from '@spike-rabbit/element-ng/menu';\n\nimport { WidgetConfigEvent, WidgetInstance } from '../../model/widgets.model';\nimport { SiWebComponentWrapperBaseComponent } from './si-web-component-wrapper-base.component';\n\n@Component({\n selector: 'si-web-component-wrapper',\n templateUrl: './si-web-component-wrapper.component.html'\n})\nexport class SiWebComponentWrapperComponent\n extends SiWebComponentWrapperBaseComponent\n implements WidgetInstance, AfterViewInit, OnDestroy\n{\n private _editable?: boolean;\n get editable(): boolean {\n return this._editable ?? false;\n }\n\n @Input() set editable(editable: boolean) {\n this._editable = editable;\n if (this.webComponentHost.nativeElement.children.length > 0) {\n this.webComponentHost.nativeElement.children[0].editable = editable;\n }\n }\n\n primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n secondaryActions?: (MenuItemLegacy | MenuItem)[];\n primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n secondaryEditActions?: (MenuItemLegacy | MenuItem)[];\n\n configChange = new EventEmitter<WidgetConfigEvent>();\n\n private webComponentEventListener = (event: any): void => this.configChanged(event.detail);\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.webComponent?.addEventListener('configChange', this.webComponentEventListener);\n this.webComponentHost.nativeElement.appendChild(this.webComponent);\n }\n\n ngOnDestroy(): void {\n this.webComponent?.removeEventListener('configChange', this.webComponentEventListener);\n }\n\n private configChanged(event: WidgetConfigEvent): void {\n this.primaryActions = event.primaryActions ?? this.primaryActions;\n this.secondaryActions = event.secondaryActions ?? this.secondaryActions;\n this.primaryEditActions = event.primaryEditActions ?? this.primaryEditActions;\n this.secondaryEditActions = event.secondaryEditActions ?? this.secondaryEditActions;\n this.configChange.emit(event);\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n ComponentRef,\n createNgModule,\n EnvironmentInjector,\n Injector,\n ViewContainerRef\n} from '@angular/core';\nimport { Observable, ReplaySubject, Subject, throwError } from 'rxjs';\n\nimport { SiWebComponentEditorWrapperComponent } from './components/web-component-wrapper/si-web-component-editor-wrapper.component';\nimport { SiWebComponentWrapperComponent } from './components/web-component-wrapper/si-web-component-wrapper.component';\nimport {\n WebComponent,\n WidgetComponentFactory,\n WidgetComponentTypeFactory,\n WidgetInstance,\n WidgetInstanceEditor\n} from './model/widgets.model';\n\nexport type SetupComponentFn = <T>(\n factory: WidgetComponentFactory,\n componentName: string,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n) => Observable<ComponentRef<T>>;\n\nexport const widgetFactoryRegistry = {\n _factories: {} as { [key: string]: SetupComponentFn },\n\n register(name: string, factoryFn: SetupComponentFn) {\n this._factories[name] = factoryFn;\n },\n\n getFactoryFn(name: string) {\n return this._factories[name];\n },\n\n hasFactoryFn(name: string) {\n return this._factories[name] !== undefined;\n }\n};\n\nexport const setupWidgetInstance = (\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n): Observable<ComponentRef<WidgetInstance>> =>\n setupComponent(\n widgetComponentFactory,\n host,\n injector,\n envInjector,\n 'componentName'\n ) as Observable<ComponentRef<WidgetInstance>>;\n\nexport const setupWidgetEditor = (\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n): Observable<ComponentRef<WidgetInstanceEditor>> =>\n setupComponent(\n widgetComponentFactory,\n host,\n injector,\n envInjector,\n 'editorComponentName'\n ) as Observable<ComponentRef<WidgetInstanceEditor>>;\n\nconst setupComponent = (\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector,\n componentName: 'componentName' | 'editorComponentName'\n): Observable<ComponentRef<WidgetInstance>> | Observable<ComponentRef<WidgetInstanceEditor>> => {\n if (!widgetComponentFactory.factoryType || widgetComponentFactory.factoryType === 'default') {\n return loadAndAttachComponent<WidgetInstance>(\n widgetComponentFactory as WidgetComponentTypeFactory,\n componentName,\n host,\n injector,\n envInjector\n );\n } else if (widgetComponentFactory.factoryType === 'web-component') {\n return loadAndAttachWebComponentWrapper(widgetComponentFactory, componentName, host);\n } else if (widgetFactoryRegistry.hasFactoryFn(widgetComponentFactory.factoryType)) {\n const setupFn = widgetFactoryRegistry.getFactoryFn(widgetComponentFactory.factoryType);\n return setupFn!<WidgetInstance>(\n widgetComponentFactory as any,\n componentName,\n host,\n injector,\n envInjector\n );\n } else {\n return throwError(\n () => new Error(`Unknown widget factory type ${widgetComponentFactory.factoryType}.`)\n );\n }\n};\n\nconst loadAndAttachComponent = <T>(\n factory: WidgetComponentTypeFactory,\n componentName: 'componentName' | 'editorComponentName',\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n): Observable<ComponentRef<T>> => {\n const result = new Subject<ComponentRef<T>>();\n if (factory[componentName]) {\n factory.moduleLoader(factory[componentName]!).then(\n module => {\n const ngModuleRef = createNgModule(module[factory.moduleName], envInjector);\n const componentKey = factory[componentName];\n if (!componentKey) {\n throw new Error(`Component configuration for ${componentName} is undefined.`);\n }\n const componentType = module[componentKey];\n const widgetInstanceRef = host.createComponent<T>(componentType, { injector, ngModuleRef });\n result.next(widgetInstanceRef);\n result.complete();\n },\n rejection => {\n const msg = rejection\n ? `Loading widget module ${factory.moduleName} failed with ${JSON.stringify(\n rejection.toString()\n )}`\n : `Loading widget module ${factory.moduleName} failed`;\n result.error(msg);\n result.complete();\n }\n );\n } else {\n result.error(`Provided component factory has no ${componentName} component configuration`);\n }\n return result;\n};\n\nconst loadAndAttachWebComponentWrapper = (\n factory: WebComponent,\n componentName: 'componentName' | 'editorComponentName',\n host: ViewContainerRef\n): Observable<ComponentRef<WidgetInstance>> => {\n const result = new ReplaySubject<ComponentRef<any>>();\n if (factory[componentName]) {\n let widgetInstanceRef: ComponentRef<\n SiWebComponentWrapperComponent | SiWebComponentEditorWrapperComponent\n >;\n if (componentName === 'componentName') {\n widgetInstanceRef = host.createComponent(SiWebComponentWrapperComponent);\n } else {\n widgetInstanceRef = host.createComponent(SiWebComponentEditorWrapperComponent);\n }\n widgetInstanceRef.instance.elementTagName = factory[componentName];\n widgetInstanceRef.instance.url = factory.url;\n result.next(widgetInstanceRef);\n result.complete();\n } else {\n result.error(`Provided component factory has no ${componentName} component configuration`);\n }\n return result;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { AsyncPipe, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ComponentRef,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n isSignal,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n SimpleChanges,\n TemplateRef,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { SiActionDialogService } from '@spike-rabbit/element-ng/action-modal';\n// We need one import from the main entry.\n// Otherwise, module federation is confused.\n// I don't know why.\nimport type { MenuItem as MenuItemLegacy } from '@spike-rabbit/element-ng/common';\nimport { ContentActionBarMainItem, ViewType } from '@spike-rabbit/element-ng/content-action-bar';\nimport { SiDashboardCardComponent } from '@spike-rabbit/element-ng/dashboard';\nimport { MenuItem } from '@spike-rabbit/element-ng/menu';\nimport { t } from '@spike-rabbit/element-translate-ng/translate';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { WidgetConfig, WidgetConfigEvent, WidgetInstance } from '../../model/widgets.model';\nimport { SiGridService } from '../../services/si-grid.service';\nimport { setupWidgetInstance } from '../../widget-loader';\n\n@Component({\n selector: 'si-widget-host',\n imports: [SiDashboardCardComponent, AsyncPipe, NgClass, NgTemplateOutlet],\n templateUrl: './si-widget-host.component.html',\n styleUrl: './si-widget-host.component.scss',\n host: {\n class: 'grid-stack-item'\n }\n})\nexport class SiWidgetHostComponent implements OnInit, OnDestroy, OnChanges {\n private siModal = inject(SiActionDialogService);\n private gridService = inject(SiGridService);\n private injector = inject(Injector);\n private envInjector = inject(EnvironmentInjector);\n\n private unsubscribe = new Subject<void>();\n\n readonly widgetConfig = input.required<WidgetConfig>();\n\n readonly remove = output<string>();\n readonly edit = output<WidgetConfig>();\n readonly initCompleted = output<void>();\n\n readonly card = viewChild.required<SiDashboardCardComponent>('card');\n\n readonly widgetHost = viewChild.required('widgetHost', { read: ViewContainerRef });\n\n protected labelEdit = t(() => $localize`:@@DASHBOARD.WIDGET.EDIT:Edit`);\n protected labelRemove = t(() => $localize`:@@DASHBOARD.WIDGET.REMOVE:Remove`);\n protected labelExpand = t(() => $localize`:@@DASHBOARD.WIDGET.EXPAND:Expand`);\n protected labelRestore = t(() => $localize`:@@DASHBOARD.WIDGET.RESTORE:Restore`);\n protected labelDialogMessage = t(\n () =>\n $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.MESSAGE:Do you really want to remove the widget?`\n );\n protected labelDialogHeading = t(\n () => $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.HEADING:Remove widget`\n );\n protected labelDialogRemove = t(\n () => $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.REMOVE:Remove`\n );\n protected labelDialogCancel = t(\n () => $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.CANCEL:Cancel`\n );\n\n widgetInstance?: WidgetInstance;\n widgetRef?: ComponentRef<WidgetInstance>;\n /** @defaultValue [] */\n primaryActions: (MenuItemLegacy | ContentActionBarMainItem)[] = [];\n /** @defaultValue [] */\n secondaryActions: (MenuItemLegacy | MenuItem)[] = [];\n /** @defaultValue 'expanded' */\n actionBarViewType: ViewType = 'expanded';\n editable$ = this.gridService.editable$;\n\n /** @defaultValue [] */\n editablePrimaryActions: (MenuItemLegacy | ContentActionBarMainItem)[] = [];\n /** @defaultValue [] */\n editableSecondaryActions: (MenuItemLegacy | MenuItem)[] = [];\n\n /**\n * @defaultValue\n * ```\n * {\n * type: 'action',\n * label: this.labelEdit,\n * icon: 'element-edit',\n * iconOnly: true,\n * action: () => this.onEdit()\n * }\n * ```\n */\n editAction: ContentActionBarMainItem = {\n type: 'action',\n label: this.labelEdit,\n icon: 'element-edit',\n iconOnly: true,\n action: () => this.onEdit()\n };\n /**\n * @defaultValue\n * ```\n * {\n * type: 'action',\n * label: this.labelRemove,\n * icon: 'element-delete',\n * iconOnly: true,\n * action: () => this.onRemove()\n * }\n * ```\n */\n removeAction: ContentActionBarMainItem = {\n type: 'action',\n label: this.labelRemove,\n icon: 'element-delete',\n iconOnly: true,\n action: () => this.onRemove()\n };\n protected widgetInstanceFooter?: TemplateRef<unknown>;\n\n protected get accentLine(): string {\n const widgetConfig = this.widgetConfig();\n return widgetConfig.accentLine ? 'accent-' + widgetConfig.accentLine : '';\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.widgetConfig) {\n if (this.widgetRef) {\n if (isSignal(this.widgetRef.instance.config)) {\n this.widgetRef.setInput('config', this.widgetConfig());\n } else {\n this.widgetRef.instance.config = this.widgetConfig();\n }\n }\n }\n }\n\n ngOnInit(): void {\n this.attachWidgetInstance();\n this.editable$\n .pipe<boolean>(takeUntil(this.unsubscribe))\n .subscribe(editable => this.setupEditable(editable));\n }\n\n ngOnDestroy(): void {\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n private attachWidgetInstance(): void {\n const widget = this.gridService.getWidget(this.widgetConfig().widgetId);\n if (widget) {\n setupWidgetInstance(\n widget.componentFactory,\n this.widgetHost(),\n this.injector,\n this.envInjector\n ).subscribe({\n next: (widgetRef: ComponentRef<WidgetInstance>) => {\n this.widgetInstance = widgetRef.instance;\n this.widgetRef = widgetRef;\n if (this.widgetInstance.configChange) {\n // Note: setTimeout is needed to prevent ExpressionChangedAfterItHasBeenCheckedError\n // on web component, who pushes their configuration through an event after being attached\n // to the DOM.\n this.widgetInstance.configChange\n .pipe(takeUntil(this.unsubscribe))\n .subscribe(event =>\n setTimeout(() => this.setupEditable(this.editable$.value, event))\n );\n }\n if (isSignal(this.widgetInstance.config)) {\n this.widgetRef.setInput('config', this.widgetConfig());\n } else {\n this.widgetInstance.config = this.widgetConfig();\n }\n this.widgetInstanceFooter = this.widgetInstance.footer;\n this.setupEditable(this.gridService.editable$.value);\n\n this.initCompleted.emit();\n },\n error: error => console.error('Error: ', error)\n });\n } else {\n console.error(`Cannot find widget with id ${this.widgetConfig().widgetId}`);\n this.initCompleted.emit();\n }\n }\n\n setupEditable(editable: boolean, widgetConfig?: WidgetConfigEvent): void {\n widgetConfig ??= {\n primaryActions: this.widgetInstance?.primaryActions,\n secondaryActions: this.widgetInstance?.secondaryActions,\n primaryEditActions: this.widgetInstance?.primaryEditActions,\n secondaryEditActions: this.widgetInstance?.secondaryEditActions\n };\n if (editable) {\n this.editablePrimaryActions = [];\n if (this.isEditable()) {\n this.editablePrimaryActions.push(this.editAction);\n }\n if (!this.widgetConfig().isNotRemovable) {\n this.editablePrimaryActions.push(this.removeAction);\n }\n if (widgetConfig.primaryEditActions) {\n this.primaryActions = [...widgetConfig.primaryEditActions, ...this.editablePrimaryActions];\n } else {\n this.primaryActions = this.editablePrimaryActions;\n }\n if (widgetConfig.secondaryEditActions) {\n this.secondaryActions = [\n ...widgetConfig.secondaryEditActions,\n ...this.editableSecondaryActions\n ];\n } else {\n this.secondaryActions = this.editableSecondaryActions;\n }\n this.actionBarViewType = 'expanded';\n } else {\n this.actionBarViewType = this.widgetConfig().actionBarViewType ?? 'expanded';\n this.primaryActions = widgetConfig.primaryActions ?? [];\n this.secondaryActions = widgetConfig.secondaryActions ?? [];\n }\n\n if (this.widgetInstance?.editable !== undefined) {\n if (isSignal(this.widgetInstance.editable)) {\n this.widgetRef?.setInput('editable', editable);\n } else {\n this.widgetInstance.editable = editable;\n }\n }\n }\n\n private doRemove(): void {\n const card = this.card();\n if (card.isExpanded()) {\n card.restore();\n }\n const widgetConfig = this.widgetConfig();\n if (widgetConfig.id) {\n this.remove.emit(widgetConfig.id);\n }\n }\n\n private isEditable(): boolean {\n const widgetConfig = this.widgetConfig();\n return (\n !widgetConfig.immutable &&\n !!this.gridService.getWidget(widgetConfig.widgetId)?.componentFactory?.editorComponentName\n );\n }\n\n onEdit(): void {\n this.edit.emit(this.widgetConfig());\n }\n\n onRemove(): void {\n this.siModal\n .showActionDialog({\n type: 'delete-confirm',\n message: this.labelDialogMessage,\n heading: this.labelDialogHeading,\n deleteBtnName: this.labelDialogRemove,\n cancelBtnName: this.labelDialogCancel\n })\n .subscribe(result => {\n if (result === 'delete') {\n this.doRemove();\n }\n });\n }\n}\n","<div class=\"grid-stack-item-content p-4\">\n @if (editable$ | async) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [ngClass]=\"accentLine\"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions\"\n [secondaryActions]=\"secondaryActions\"\n [actionBarViewType]=\"actionBarViewType\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"widgetConfig().image?.src\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n\n @if (widgetInstanceFooter) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"widgetInstanceFooter\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n Component,\n ComponentRef,\n ElementRef,\n inject,\n input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n OutputRefSubscription,\n SimpleChanges,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions } from 'gridstack';\n\nimport { DEFAULT_GRIDSTACK_OPTIONS, GridConfig } from '../../model/gridstack.model';\nimport { WidgetConfig, WidgetPositionConfig } from '../../model/widgets.model';\nimport { SiWidgetHostComponent } from '../widget-host/si-widget-host.component';\n\nexport interface GridWrapperEvent {\n event: Event;\n items?: GridStackNode[];\n grid: GridStack;\n el?: GridItemHTMLElement;\n}\n\n@Component({\n selector: 'si-gridstack-wrapper',\n templateUrl: './si-gridstack-wrapper.component.html',\n styleUrl: './si-gridstack-wrapper.component.scss'\n})\nexport class SiGridstackWrapperComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Grid items to render inside the gridstack\n *\n * @defaultValue []\n */\n readonly widgetConfigs = input<WidgetConfig[]>([]);\n\n /**\n * Whenever gridstack allows to drag, resize or delete the grid item\n *\n * @defaultValue false\n */\n readonly editable = input(false);\n\n /**\n * Module configuration\n */\n readonly gridConfig = input<GridConfig>();\n\n /**\n * Emits dashboard grid events.\n */\n readonly gridEvent = output<GridWrapperEvent>();\n /**\n * Emits the id of a widget instance that shall be removed.\n */\n readonly widgetInstanceRemove = output<string>();\n\n /**\n * Emits the id of a widget instance that shall be edited.\n */\n readonly widgetInstanceEdit = output<WidgetConfig>();\n\n readonly gridstackContainer = viewChild('gridstackContainer', { read: ViewContainerRef });\n\n private grid!: GridStack;\n private markedForRender: WidgetConfig[] = [];\n private gridItems: {\n id: string;\n component: ComponentRef<SiWidgetHostComponent>;\n }[] = [];\n private readonly itemIdAttr = 'item-id';\n\n private widgetIdSubscriptionMap = new Map<string, OutputRefSubscription[]>();\n\n private ngZone = inject(NgZone);\n private elementRef = inject(ElementRef);\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.widgetConfigs) {\n const { currentValue, previousValue, firstChange } = changes.widgetConfigs;\n\n this.grid?.batchUpdate(true);\n if (firstChange) {\n this.markedForRender = currentValue;\n } else {\n // Get newly added items\n const toBeAdded = currentValue.filter(\n (item: WidgetConfig) => !previousValue.find((i: WidgetConfig) => i.id === item.id)\n );\n\n // Get deleted items\n const toBeRemoved = previousValue.filter(\n (item: WidgetConfig) => !currentValue.find((i: WidgetConfig) => i.id === item.id)\n );\n\n if (toBeAdded) {\n this.mount(toBeAdded);\n }\n\n if (toBeRemoved) {\n this.unmount(toBeRemoved);\n }\n }\n\n // Detect changes\n this.updateViewComponents(currentValue);\n this.updateLayout(currentValue);\n this.grid?.batchUpdate(false);\n }\n\n if (changes.editable) {\n const { currentValue, firstChange } = changes.editable;\n\n if (!firstChange) {\n this.grid.enableMove(currentValue);\n this.grid.enableResize(currentValue);\n }\n }\n }\n\n ngOnInit(): void {\n const initialViewMode: GridStackOptions = {\n disableDrag: !this.editable(),\n disableResize: !this.editable()\n };\n\n const options: GridStackOptions = {\n ...DEFAULT_GRIDSTACK_OPTIONS,\n ...this.gridConfig()?.gridStackOptions,\n ...initialViewMode\n };\n\n this.grid = GridStack.init(options, this.elementRef.nativeElement.firstChild as HTMLElement);\n this.hookEvents(this.grid);\n\n this.mount(this.markedForRender);\n }\n\n ngOnDestroy(): void {\n this.widgetIdSubscriptionMap.forEach(subscriptions => {\n subscriptions.forEach(subscription => subscription.unsubscribe());\n });\n this.widgetIdSubscriptionMap.clear();\n }\n\n mount(items: WidgetConfig[]): void {\n if (items.length > 0) {\n items.forEach(item => {\n this.addToView(item);\n });\n }\n }\n\n unmount(items: WidgetConfig[]): void {\n if (items.length > 0) {\n items.forEach(item => {\n this.removeFromView(item.id);\n });\n }\n }\n\n getLayout(): WidgetPositionConfig[] {\n const gridItems = this.grid?.getGridItems();\n if (gridItems.length > 0) {\n const positions = gridItems.map(gridItemHTMLElement => {\n const id = gridItemHTMLElement.getAttribute('item-id')!;\n const x = Number(gridItemHTMLElement.getAttribute('gs-x')) || 0;\n const y = Number(gridItemHTMLElement.getAttribute('gs-y')) || 0;\n const width = Number(gridItemHTMLElement.getAttribute('gs-w')) || 0;\n const height = Number(gridItemHTMLElement.getAttribute('gs-h')) || 0;\n return { id, x, y, width, height };\n });\n return positions;\n } else {\n return [];\n }\n }\n\n private updateLayout(widgets: WidgetConfig[]): void {\n const tmp = widgets.map(w => ({ ...w, w: w.width, h: w.height }));\n if (this.grid) {\n const gridItems = this.grid.getGridItems();\n gridItems.forEach(gridItem => {\n const config = tmp.find(widget => widget.id === gridItem.getAttribute('item-id'));\n this.grid.update(gridItem, { ...config });\n });\n }\n }\n\n private addToView(item: WidgetConfig): void {\n const componentRef = this.gridstackContainer()!.createComponent(SiWidgetHostComponent);\n componentRef.setInput('widgetConfig', item);\n const subscriptions: OutputRefSubscription[] = [];\n const subscriptionRemove = componentRef.instance.remove.subscribe(widgetId => {\n const widgetSubscriptions = this.widgetIdSubscriptionMap.get(widgetId);\n if (widgetSubscriptions) {\n widgetSubscriptions.forEach(sub => sub.unsubscribe());\n }\n this.widgetInstanceRemove.emit(widgetId);\n });\n subscriptions.push(subscriptionRemove);\n const subscriptionEdit = componentRef.instance.edit.subscribe(widgetConfig => {\n this.widgetInstanceEdit.emit(widgetConfig);\n });\n subscriptions.push(subscriptionEdit);\n this.widgetIdSubscriptionMap.set(item.id, subscriptions);\n const element = componentRef.location.nativeElement as HTMLElement;\n element.setAttribute(this.itemIdAttr, item.id!);\n this.gridItems.push({ id: item.id!, component: componentRef });\n this.grid.makeWidget(element, {\n w: item.width,\n h: item.height,\n x: item.x,\n y: item.y,\n minW: item.minWidth,\n minH: item.minHeight\n });\n }\n\n private removeFromView(widgetId: string): void {\n const gridItemElements = this.grid.getGridItems();\n\n const toRemove = gridItemElements.find(\n (el: HTMLElement) => el.getAttribute(this.itemIdAttr) === widgetId\n );\n\n if (toRemove) {\n this.grid.removeWidget(toRemove);\n const index = this.gridItems.findIndex(i => i.id === widgetId);\n this.gridItems[index].component.destroy();\n this.gridItems.splice(index, 1);\n }\n }\n\n /**\n * GridItemComponents are created dynamically, change detection won't trigger as there is no \\@Input binding.\n * We have to update instance and run ChangeDetectionRef manually.\n */\n private updateViewComponents(newConfigs: WidgetConfig[]): void {\n // TODO: lookup by id would fasten the update\n for (const config of newConfigs) {\n const gridItem = this.gridItems.find(item => item.id === config.id);\n if (gridItem) {\n gridItem.component.setInput('widgetConfig', config);\n }\n }\n }\n\n private hookEvents(grid: GridStack): void {\n grid.on(\n 'added removed dragstop resizestop disable enable dropped resize resizestart drag dragstart change',\n (event: Event) => {\n this.ngZone.run(() => {\n this.gridEvent.emit({\n event,\n grid\n });\n });\n }\n );\n }\n}\n","<div class=\"grid-stack\">\n <ng-container #gridstackContainer />\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n Component,\n computed,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n isSignal,\n model,\n OnDestroy,\n OnInit,\n output,\n OutputRefSubscription,\n signal,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { SiActionDialogService } from '@spike-rabbit/element-ng/action-modal';\nimport { SiTranslateModule, t } from '@spike-rabbit/element-translate-ng/translate';\nimport { Subscription } from 'rxjs';\n\nimport {\n Widget,\n WidgetConfig,\n WidgetConfigStatus,\n WidgetInstanceEditor,\n WidgetInstanceEditorWizard,\n WidgetInstanceEditorWizardState\n} from '../../model/widgets.model';\nimport { setupWidgetEditor } from '../../widget-loader';\n\n/**\n * The Dialog component is utilized when editing a widget instance within a dashboard.\n * It dynamically loads and creates the associated widget editor and incorporates it\n * into its content. The dialog component is accountable for interacting with the dashboard\n * and offers options for saving changes or terminating the editing process.\n */\n@Component({\n selector: 'si-widget-instance-editor-dialog',\n imports: [SiTranslateModule],\n templateUrl: './si-widget-instance-editor-dialog.component.html',\n styleUrl: './si-widget-instance-editor-dialog.component.scss'\n})\nexport class SiWidgetInstanceEditorDialogComponent implements OnInit, OnDestroy {\n /**\n * Input for the widget instance configuration. It is used to populate the\n * widget editor.\n */\n readonly widgetConfig = model.required<WidgetConfig>();\n\n /**\n * Input for the widget definition. It is required to retrieve the component\n * factory to instantiate the widget editor.\n */\n readonly widget = input.required<Widget>();\n\n /**\n * Emits the edited widget instance configuration if the user confirms by\n * saving, or `undefined` if the user cancels the dialog.\n */\n readonly closed = output<WidgetConfig | undefined>();\n\n /**\n * Emits when the editor instantiation is completed.\n */\n readonly editorSetupCompleted = output<void>();\n\n protected readonly editorHost = viewChild.required('editorHost', { read: ViewContainerRef });\n\n /** Indicates if the current config is valid or not. If invalid, the save button will be disabled. */\n protected readonly invalidConfig = signal(false);\n\n protected readonly showNextButton = computed(() =>\n this.editorWizardState() !== undefined ? true : false\n );\n\n protected readonly disableNextButton = computed(() => {\n const wizardState = this.editorWizardState();\n\n if (!wizardState) {\n return true;\n } else if (!wizardState.hasNext) {\n return true;\n } else if (wizardState.disableNext !== undefined) {\n return wizardState.disableNext;\n } else {\n return false;\n }\n });\n\n protected readonly showPreviousButton = computed(() => !!this.editorWizardState());\n\n protected readonly disablePreviousButton = computed(() => {\n const wizardState = this.editorWizardState();\n return wizardState ? !wizardState.hasPrevious : true;\n });\n\n protected labelSave = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.SAVE:Save`);\n protected labelCancel = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.CANCEL:Cancel`);\n protected labelPrevious = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.PREVIOUS:Previous`);\n protected labelNext = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.NEXT:Next`);\n protected labelDialogMessage = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE:The widget configuration changed. Do you want to discard the changes?`\n );\n protected labelDialogHeading = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.HEADING:Widget configuration changed`\n );\n protected labelDialogSave = t(\n () => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.SAVE:Save`\n );\n protected labelDialogDiscard = t(\n () => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD:Discard`\n );\n protected labelDialogCancel = t(\n () => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL:Cancel`\n );\n\n /**\n * Marks the widget configuration as modified. Is set when widget editor instance\n * emits configChange events. Triggers edit discard confirmation dialog when widget config\n * is modified but not dialog is canceled.\n * */\n private readonly widgetConfigModified = signal(false);\n private widgetInstanceEditor?: WidgetInstanceEditor;\n private readonly editorWizardState = signal<WidgetInstanceEditorWizardState | undefined>(\n undefined\n );\n\n private subscriptions: Subscription[] | OutputRefSubscription[] = [];\n private injector = inject(Injector);\n private envInjector = inject(EnvironmentInjector);\n private dialogService = inject(SiActionDialogService);\n\n ngOnInit(): void {\n setupWidgetEditor(\n this.widget().componentFactory,\n this.editorHost(),\n this.injector,\n this.envInjector\n ).subscribe(componentRef => {\n this.widgetInstanceEditor = componentRef.instance;\n if (isSignal(this.widgetInstanceEditor.config)) {\n componentRef.setInput('config', this.widgetConfig()!);\n } else {\n this.widgetInstanceEditor.config = this.widgetConfig()!;\n }\n // To be used by webcomponent wrapper\n if ('statusChangesHandler' in this.widgetInstanceEditor) {\n this.widgetInstanceEditor.statusChangesHandler = this.handleStatusChanges.bind(this);\n }\n\n let hasStatusChangesEmitter = false;\n if (this.widgetInstanceEditor.statusChanges) {\n hasStatusChangesEmitter = true;\n this.subscriptions.push(\n this.widgetInstanceEditor.statusChanges.subscribe(statusChanges => {\n this.handleStatusChanges(statusChanges);\n }) as Subscription\n );\n }\n\n if (this.widgetInstanceEditor.configChange) {\n this.subscriptions.push(\n this.widgetInstanceEditor.configChange.subscribe(config => {\n if (!hasStatusChangesEmitter) {\n this.invalidConfig.set(!!config.invalid);\n this.widgetConfigModified.set(true);\n }\n }) as Subscription\n );\n }\n if (this.isEditorWizdard(this.widgetInstanceEditor)) {\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n\n if (this.widgetInstanceEditor.stateChange) {\n this.subscriptions.push(\n this.widgetInstanceEditor.stateChange.subscribe(state => {\n this.editorWizardState.set(state);\n }) as Subscription\n );\n }\n }\n this.editorSetupCompleted.emit();\n });\n }\n\n ngOnDestroy(): void {\n this.tearDownEditor();\n }\n\n protected onCancel(): void {\n if (!this.widgetConfigModified()) {\n this.closed.emit(undefined);\n } else {\n this.dialogService\n .showActionDialog({\n type: 'edit-discard',\n disableSave: this.invalidConfig(),\n message: this.labelDialogMessage,\n heading: this.labelDialogHeading,\n saveBtnName: this.labelDialogSave,\n discardBtnName: this.labelDialogDiscard,\n cancelBtnName: this.labelDialogCancel,\n disableSaveMessage: this.labelDialogMessage,\n disableSaveDiscardBtnName: this.labelDialogDiscard\n })\n .subscribe(result => {\n if (result === 'discard') {\n this.closed.emit(undefined);\n } else if (result === 'save') {\n this.closed.emit(this.widgetConfig());\n }\n });\n }\n }\n\n protected onNext(): void {\n if (this.isEditorWizdard(this.widgetInstanceEditor)) {\n this.widgetInstanceEditor.next();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n }\n }\n\n protected onPrevious(): void {\n if (this.isEditorWizdard(this.widgetInstanceEditor) && this.editorWizardState()?.hasPrevious) {\n this.widgetInstanceEditor.previous();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n }\n }\n\n protected onSave(): void {\n // In case the widget instance editor did not only change values of the config\n // object, but set a new config object reference, we need to grab it and replace\n // our local config object.\n if (this.widgetInstanceEditor?.config) {\n if (isSignal(this.widgetInstanceEditor.config)) {\n this.widgetConfig.set(this.widgetInstanceEditor?.config() as WidgetConfig);\n } else {\n this.widgetConfig.set(this.widgetInstanceEditor?.config as WidgetConfig);\n }\n }\n\n this.closed.emit(this.widgetConfig());\n }\n\n private tearDownEditor(): void {\n this.editorWizardState.set(undefined);\n this.widgetInstanceEditor = undefined;\n this.subscriptions.forEach(s => s.unsubscribe());\n this.subscriptions = [];\n }\n\n private isEditorWizdard(\n editor?: WidgetInstanceEditor | WidgetInstanceEditorWizard\n ): editor is WidgetInstanceEditorWizard {\n return !!editor && 'state' in editor;\n }\n\n private handleStatusChanges(statusChanges: Partial<WidgetConfigStatus>): void {\n if (statusChanges.invalid !== undefined) {\n this.invalidConfig.set(statusChanges.invalid);\n }\n if (statusChanges.modified !== undefined) {\n this.widgetConfigModified.set(statusChanges.modified);\n }\n }\n}\n","<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n <ng-container #editorHost />\n</div>\n\n<div class=\"editor-footer px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n\n @if (showPreviousButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disablePreviousButton()\"\n (click)=\"onPrevious()\"\n >{{ labelPrevious | translate }}</button\n >\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n\n <button type=\"button\" class=\"btn btn-primary\" [disabled]=\"invalidConfig()\" (click)=\"onSave()\">{{\n labelSave | translate\n }}</button>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { AsyncPipe } from '@angular/common';\nimport {\n Component,\n inject,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n SimpleChanges,\n Type,\n viewChild\n} from '@angular/core';\nimport {\n SiLoadingService,\n SiLoadingSpinnerDirective\n} from '@spike-rabbit/element-ng/loading-spinner';\nimport { ModalOptions, SiModalService } from '@spike-rabbit/element-ng/modal';\nimport { BehaviorSubject, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { SI_DASHBOARD_CONFIGURATION } from '../../model/configuration';\nimport { GridConfig } from '../../model/gridstack.model';\nimport { SI_WIDGET_STORE } from '../../model/si-widget-storage';\nimport { Widget, WidgetConfig } from '../../model/widgets.model';\nimport { SiGridService } from '../../services/si-grid.service';\nimport {\n GridWrapperEvent,\n SiGridstackWrapperComponent\n} from '../gridstack-wrapper/si-gridstack-wrapper.component';\nimport { SiWidgetInstanceEditorDialogComponent } from '../widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\n\nexport const NEW_WIDGET_PREFIX = 'new-widget-';\n\nlet idCounter = 1;\n\n/**\n * The grid component is the actual component on which the widget instances are placed and visualized. You can think of\n * a headless dashboard, without a title, toolbar or edit buttons.\n */\n@Component({\n selector: 'si-grid',\n imports: [SiGridstackWrapperComponent, SiLoadingSpinnerDirective, AsyncPipe],\n templateUrl: './si-grid.component.html',\n styleUrl: './si-grid.component.scss',\n providers: [SiGridService, SiLoadingService]\n})\nexport class SiGridComponent implements OnInit, OnChanges, OnDestroy {\n private storeSubscription?: Subscription;\n private gridService = inject(SiGridService);\n private modalService = inject(SiModalService);\n private widgetStorage = inject(SI_WIDGET_STORE);\n\n /**\n * Configuration options for a grid instance. Default is the optional\n * value from the {@link SI_DASHBOARD_CONFIGURATION}.\n *\n * @defaultValue inject(SI_DASHBOARD_CONFIGURATION)?.grid\n */\n readonly gridConfig = input<GridConfig | undefined>(inject(SI_DASHBOARD_CONFIGURATION)?.grid);\n\n /**\n * Sets the grid into editable mode, in which the widget instances can be moved,\n * resized, removed or new ones added.\n *\n * @defaultValue false\n */\n readonly editable = model(false);\n /**\n * This is the internal owner of the current editable state and is used to track if\n * editable or not. Not editable can be changed by either calling the `edit()` api\n * method or by setting the `editable` input. When setting the input, the `ngOnChanges(...)`\n * hook is used to call the `edit()` method. Similar, to get from editable to not editable,\n * `cancel()` or `save()` is used and can be triggered from `ngOnChanges(...)`.\n */\n private editableInternal = false;\n\n /**\n * An optional, but recommended dashboard id that is used in persistence and passed\n * to the widget store for saving and loading data.\n */\n readonly dashboardId = input<string>();\n\n /**\n * Provides the available widgets to the grid. When loading the widget configurations from\n * the storage, we need to have the widget definition available to be able to create the widget\n * instances on the grid.\n *\n * @defaultValue [] */\n readonly widgetCatalog = input<Widget[]>([]);\n\n /**\n * When the user clicks edit on a widget instance, an editor need to appear and the\n * widget editor component need to be loaded. When the grid is used standalone, it\n * takes care and opens a modal dialog and loads the configured widget editor component.\n * When the grid is used in a container like the flexible dashboard, the container manages\n * where the widget instance editor is displayed. In this case this options prevents the grid\n * from showing the editor in the dialog, and emits on `widgetInstanceEdit` on clicking the\n * widget `edit` action.\n *\n * @defaultValue false */\n readonly emitWidgetInstanceEditEvents = input(false);\n\n /**\n * Option to turn off the loading spinner on save and load operations.\n *\n * @defaultValue false\n */\n readonly hideProgressIndicator = input(false);\n\n /**\n * Option to configure a custom widget instance editor dialog component. The component provides the\n * editor hosting and the buttons to save and cancel.\n */\n readonly widgetInstanceEditorDialogComponent =\n input<Type<SiWidgetInstanceEditorDialogComponent>>();\n\n /**\n * Emits the modification state of the grid. It is `unmodified` when the visible state\n * is equal to the loaded state from the widget storage. When the user modifies the dashboard by\n * e.g. while moving the widgets, the dashboard is marked as `modified` and emits `true` and when the user\n * persists the change by saving, or reverts the state by canceling, the state is `unmodified`\n * again and emits `false`.\n */\n readonly isModified = output<boolean>();\n\n /**\n * Modified state that is emitted in the `isModified` output. Should only be\n changed using the {@link setModified} method.\n */\n private modified = false;\n\n /**\n * Emits to notify about edit events of widget instances. Only emits\n * if `emitWidgetInstanceEditEvents` is set to `true`.\n */\n readonly widgetInstanceEdit = output<WidgetConfig>();\n\n /**\n * All widget configuration objects of the visible widget instances.\n *\n * @internal\n */\n readonly visibleWidgetInstances$ = new BehaviorSubject<WidgetConfig[]>([]);\n\n /**\n * All widget instance configs that are on the grid by loading from the widget\n * storage. Thus, these widget are persisted.\n *\n * @defaultValue []\n * @internal\n */\n persistedWidgetInstances: WidgetConfig[] = [];\n\n /**\n * Widget instance configs that are added to the grid in edit mode, but not\n * persisted yet, as the user did not confirm the modification by save.\n *\n * @defaultValue []\n * @internal\n */\n transientWidgetInstances: WidgetConfig[] = [];\n\n /**\n * All widget instance configurations that are removed from the grid in edit mode.\n * These instances are persistently removed on save or re-added again on cancel.\n *\n * @defaultValue []\n * @internal\n */\n markedForRemoval: WidgetConfig[] = [];\n\n /** @defaultValue viewChild.required(SiGridstackWrapperComponent) */\n readonly gridStackWrapper = viewChild.required(SiGridstackWrapperComponent);\n\n /**\n * Service used to indicate load and save indication.\n * @deprecated Use `isLoading` instead.\n *\n * @defaultValue inject(SiLoadingService)\n */\n loadingService = inject(SiLoadingService);\n\n /**\n * Indication for load and save operations.\n */\n readonly isLoading: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n protected initialLoad = true;\n\n protected get showEmptyState(): boolean {\n return !this.initialLoad && this.visibleWidgetInstances$.value.length === 0;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Reload widgets if the dashboardId changes. Do not load on inital\n // dashboardId property binding as first load will be done in ngOnInit()\n if (changes.dashboardId && !changes.dashboardId.firstChange) {\n queueMicrotask(() => this.loadAndSubscribeWidgets());\n }\n\n if (changes.editable) {\n if (changes.editable.currentValue) {\n this.edit();\n } else {\n this.cancel();\n }\n }\n\n if (changes.widgetCatalog) {\n this.gridService.widgetCatalog = this.widgetCatalog();\n }\n }\n\n ngOnInit(): void {\n queueMicrotask(() => this.loadAndSubscribeWidgets());\n this.gridService.widgetCatalog = this.widgetCatalog();\n }\n\n ngOnDestroy(): void {\n this.storeSubscription?.unsubscribe();\n this.isLoading.complete();\n this.loadingService.counter.complete();\n }\n\n /**\n * Set dashboard grid in editable mode to modify widget instances.\n */\n edit(): void {\n if (!this.editableInternal) {\n this.transientWidgetInstances = [];\n this.markedForRemoval = [];\n this.setModified(false);\n this.editableInternal = true;\n this.editable.set(true);\n this.gridService.editable$.next(this.editableInternal);\n }\n }\n\n /**\n * Persists the current widget instances to the widget storage and\n * changes the editable and isModified modes.\n */\n save(): void {\n if (!this.editableInternal) {\n return;\n }\n\n this.isLoading.next(true);\n this.loadingService.counter.next(1);\n // Update position information and remove temporary ids\n const widgets = this.updateWidgetPositions(this.visibleWidgetInstances$.value).map(widget =>\n widget.id.startsWith(NEW_WIDGET_PREFIX) ? { ...widget, id: undefined } : widget\n );\n const toRemove = this.markedForRemoval.filter(\n widget => !widget.id.startsWith(NEW_WIDGET_PREFIX)\n );\n this.widgetStorage\n .save(widgets, toRemove, this.dashboardId())\n .pipe(take(1))\n .subscribe({\n next: (value: WidgetConfig[]) => {\n this.setModified(false);\n this.editableInternal = false;\n this.editable.set(false);\n this.gridService.editable$.next(this.editableInternal);\n this.isLoading.next(false);\n this.loadingService.counter.next(0);\n },\n error: (err: any) => {\n console.error('Saving dashboard configuration failed.', err);\n this.isLoading.next(false);\n this.loadingService.counter.next(0);\n }\n });\n }\n\n /**\n * Cancel current changes and restore last saved state.\n */\n cancel(): void {\n if (!this.editableInternal) {\n return;\n }\n\n if (this.modified) {\n this.visibleWidgetInstances$.next([...this.persistedWidgetInstances]);\n this.setModified(false);\n }\n this.editableInternal = false;\n if (this.editable()) {\n this.editable.set(false);\n }\n this.gridService.editable$.next(this.editableInternal);\n }\n\n /**\n * Adds a new widget instance configuration to the dashboard grid. It is not\n * persisted yet and is added to the transient widget instances.\n *\n * @param widgetInstanceConfig - The new widget configuration.\n */\n addWidgetInstance(widgetInstanceConfig: Omit<WidgetConfig, 'id'>): void {\n const id = `${NEW_WIDGET_PREFIX}${idCounter++}`;\n const newWidget: WidgetConfig = { ...widgetInstanceConfig, id };\n const nextWidgets = this.updateWidgetPositions([\n ...this.visibleWidgetInstances$.value,\n newWidget\n ]);\n this.transientWidgetInstances.push(newWidget);\n this.visibleWidgetInstances$.next(nextWidgets);\n }\n\n /**\n * Removes a widget instance from the visible widgets and puts it in the\n * {@link markedForRemoval} array.\n *\n * @param widgetInstanceId - The id of the widget instance to be removed.\n */\n removeWidgetInstance(widgetInstanceId: string): void {\n const widgetToRemove = this.visibleWidgetInstances$.value.find(\n widget => widget.id === widgetInstanceId\n );\n if (widgetToRemove) {\n this.markedForRemoval.push(widgetToRemove);\n let nextWidgets = this.visibleWidgetInstances$.value.filter(\n widget => widget.id !== widgetInstanceId\n );\n nextWidgets = this.updateWidgetPositions(nextWidgets);\n this.visibleWidgetInstances$.next(nextWidgets);\n }\n }\n\n /**\n * Opens the provided widget configuration in the related editor or\n * emits on {@link widgetInstanceEdit}, if {@link emitWidgetInstanceEditEvents}\n * is true.\n *\n * @param widgetInstanceConfig - The config of the widget instance to edit.\n */\n editWidgetInstance(widgetInstanceConfig: WidgetConfig): void {\n // Need to edit a clone to avoid runtime editing\n const widgetConfigClone: WidgetConfig = JSON.parse(JSON.stringify(widgetInstanceConfig));\n if (this.emitWidgetInstanceEditEvents()) {\n this.widgetInstanceEdit.emit(widgetConfigClone);\n } else {\n const widget = this.gridService.getWidget(widgetConfigClone.widgetId);\n const config: ModalOptions<SiWidgetInstanceEditorDialogComponent> = {\n animated: true,\n keyboard: true,\n inputValues: {\n widgetConfig: widgetConfigClone,\n widget\n },\n class: widget?.componentFactory.editorModalClass ?? 'modal-xl'\n };\n const widgetInstanceEditorDialogComponent = this.widgetInstanceEditorDialogComponent();\n const componentType =\n widgetInstanceEditorDialogComponent ?? SiWidgetInstanceEditorDialogComponent;\n const modalRef = this.modalService.show(componentType, config);\n const subscription = modalRef.content.closed.subscribe(editedWidgetConfig => {\n subscription.unsubscribe();\n modalRef.hide();\n if (editedWidgetConfig) {\n this.updateWidgetInstance(editedWidgetConfig);\n }\n });\n }\n }\n\n /**\n * Updates the visible widgets with an updated configuration. Will update the\n * user interface and emit on {@link isModified}.\n *\n * @param editedWidgetConfig - The config of the widget instance that was updated.\n */\n updateWidgetInstance(editedWidgetConfig: WidgetConfig): void {\n const index = this.visibleWidgetInstances$.value.findIndex(\n wc => wc.id === editedWidgetConfig.id\n );\n if (index >= 0) {\n let nextWidgets = this.updateWidgetPositions([...this.visibleWidgetInstances$.value]);\n nextWidgets[index] = editedWidgetConfig;\n nextWidgets = this.updateWidgetPositions(nextWidgets);\n this.visibleWidgetInstances$.next(nextWidgets);\n setTimeout(() => this.setModified(true), 0);\n }\n }\n\n protected handleGridEvent(event: GridWrapperEvent): void {\n const relevantEventTypes = ['added', 'removed', 'dragstop', 'resizestop'];\n if (this.editable() && relevantEventTypes.includes(event.event.type)) {\n // Make sure the widget config always holds the latest position information\n const widgets = this.updateWidgetPositions(this.visibleWidgetInstances$.value);\n this.visibleWidgetInstances$.next(widgets);\n setTimeout(() => this.setModified(true), 0);\n }\n }\n\n private loadAndSubscribeWidgets(): void {\n this.storeSubscription?.unsubscribe();\n // remove existing widgets\n this.visibleWidgetInstances$.next([]);\n\n // Only when we change the dashboard id, this method is invoked\n // directly. In this case we start the progress here and we stop\n // it in the `next` subscription. The subscription stays hot and\n // also get called when save() is invoked. In this case, we do not\n // want to decrease the progress counter as we do it in the save\n // subscription. To handle this, we use the boolean marker `initialLoad`.\n this.initialLoad = true;\n this.isLoading.next(true);\n this.loadingService.counter.next(1);\n this.storeSubscription = this.widgetStorage.load(this.dashboardId()).subscribe({\n next: widgets => {\n this.visibleWidgetInstances$.next(widgets);\n this.persistedWidgetInstances = widgets;\n if (this.initialLoad) {\n this.initialLoad = false;\n this.isLoading.next(false);\n this.loadingService.counter.next(0);\n }\n },\n error: err => {\n console.error('Loading dashboard configuration failed', err);\n this.isLoading.next(false);\n this.loadingService.counter.next(0);\n }\n });\n }\n\n private updateWidgetPositions(widgetConfigs: WidgetConfig[]): WidgetConfig[] {\n const layout = this.gridStackWrapper().getLayout();\n const widgets = widgetConfigs.map(widget => {\n const position = layout.find(p => p.id === widget.id);\n if (position) {\n return {\n ...widget,\n x: position.x,\n y: position.y,\n width: position.width,\n height: position.height\n };\n } else {\n return widget;\n }\n });\n return widgets || [];\n }\n\n private setModified(modified: boolean): void {\n if (this.modified !== modified) {\n this.modified = modified;\n this.isModified.emit(this.modified);\n }\n }\n}\n","@if (showEmptyState) {\n <ng-content select=\"[empty-state]\" />\n}\n<si-gridstack-wrapper\n [widgetConfigs]=\"(visibleWidgetInstances$ | async) ?? []\"\n [gridConfig]=\"gridConfig()\"\n [editable]=\"editable()\"\n [siLoading]=\"!hideProgressIndicator() && initialLoad && (isLoading | async)!\"\n [blocking]=\"false\"\n (gridEvent)=\"handleGridEvent($event)\"\n (widgetInstanceRemove)=\"removeWidgetInstance($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n/>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { EventEmitter, InputSignal, OutputEmitterRef, TemplateRef } from '@angular/core';\nimport { AccentLineType, MenuItem as MenuItemLegacy } from '@spike-rabbit/element-ng/common';\nimport { ContentActionBarMainItem, ViewType } from '@spike-rabbit/element-ng/content-action-bar';\nimport { MenuItem } from '@spike-rabbit/element-ng/menu';\nimport { Subject } from 'rxjs';\n\n/**\n * Widgets describe the entries within the widget catalog and holds all\n * default configuration and factory functionality to instantiate a widget\n * instance, represented as {@link WidgetConfig} objects.\n */\nexport interface Widget {\n /** A unique id of the widget. */\n id: string;\n /** An optional version string. */\n version?: string;\n /** The name of the widget that is presented in the widget catalog. */\n name: string;\n /** An optional description that is visible in the widget catalog. */\n description?: string;\n /** A CSS icon class that specifies the widget icon, displayed in the catalog. */\n iconClass?: string;\n /** The factory to instantiate a widget instance component that is added to the dashboard. */\n componentFactory: WidgetComponentFactory;\n /** Optional default values that can be set to widget instances. */\n defaults?: Pick<\n WidgetConfig,\n | 'width'\n | 'height'\n | 'minWidth'\n | 'minHeight'\n | 'heading'\n | 'expandable'\n | 'immutable'\n | 'image'\n | 'accentLine'\n >;\n /** Optional default payload object that is copied into every widget instance {@link WidgetConfig}. */\n payload?: any;\n}\n\n/** Factory type that is either a {@link WidgetComponentTypeFactory}, {@link FederatedModule} or {@link WebComponent}. */\nexport type WidgetComponentFactory = WidgetComponentTypeFactory | FederatedModule | WebComponent;\n\ntype CommonFactoryFields = {\n componentName: string;\n editorComponentName?: string;\n /**\n * CSS class that is added to the modal dialog when component editor dialog is shown.\n * Provides the option to change the size if the dialog.\n */\n editorModalClass?: string;\n};\n\nexport type WidgetComponentTypeFactory = CommonFactoryFields & {\n factoryType?: 'default';\n moduleName: string;\n moduleLoader: (name: string) => Promise<any>;\n [index: string]: any;\n};\n\nexport type FederatedModule = CommonFactoryFields &\n LoadRemoteModuleOptions & {\n factoryType: 'module-federation';\n [index: string]: any;\n };\n\nexport type WebComponent = CommonFactoryFields & {\n factoryType: 'web-component';\n url: string;\n [index: string]: any;\n};\n\n/**\n * ObjectFit configuration options for a widget image.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit}\n */\nexport type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';\n\n/**\n * Image is used to configure an image to be displayed on a widget instance.\n */\nexport interface WidgetImage {\n /**\n * The image URL (See [<img>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src)).\n */\n src: string;\n /**\n * The HTMLImageElement property [alt](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#usage_notes)\n * provides fallback (alternate) text to display when the image specified by the <img> element is not loaded.\n */\n alt: string;\n /**\n * Defines if an image is placed on top or start (left) of the card.\n */\n dir?: 'horizontal' | 'vertical';\n /**\n * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.\n */\n objectFit?: ObjectFit;\n /**\n * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property.\n */\n objectPosition?: string;\n}\n\n/**\n * A {@link WidgetConfig} holds the configuration of a widget instance component that is visible on a dashboard.\n * It can be persisted and used to restore a dashboards state.\n */\nexport interface WidgetConfig {\n /** A unique id of a widget instance */\n id: string;\n /**\n * The id of the widget descriptor that was used to instantiate\n * the `WidgetConfig` and the widget instance component.\n */\n widgetId: string;\n /**\n * Optionally, the version widget description that was used to create the widget config.\n */\n version?: string;\n /**\n * Width of the grid item, where number represents how many columns it spans (default?: 1)\n */\n width?: number;\n /**\n * Height of the grid item, where number represents how many rows it takes. (default?: 1)\n */\n height?: number;\n /**\n * Grid item position on x axis of the grid (default?: 0)\n */\n x?: number;\n /**\n * Grid item position on y axis of the grid (default?: 0)\n */\n y?: number;\n /**\n * minimum width allowed during resize/creation (default?: undefined = un-constrained)\n */\n minWidth?: number;\n /**\n * maximum height allowed during resize/creation (default?: undefined = un-constrained)\n */\n minHeight?: number;\n /**\n * grid item header text.\n */\n heading?: string;\n /** Defines whether the widget instance component can be expanded and enlarged over the dashboard. */\n expandable?: boolean;\n /** A widget specific payload object. Placeholder to pass in additional configuration. */\n payload?: any;\n actionBarViewType?: ViewType;\n isNotRemovable?: boolean;\n immutable?: boolean;\n /**\n * Widget instance editor components can use this property to indicate an invalid configuration.\n * True if the config is invalid. False, undefined or null indicate a valid configuration.\n *\n * @deprecated Use the statusChanges emitter to notify about configuration status changes.\n */\n invalid?: boolean;\n /**\n * Optional configuration for an image to be displayed on the widget instance.\n */\n image?: WidgetImage;\n /**\n * Optional type of the accent line.\n */\n accentLine?: AccentLineType;\n}\n\n/**\n * Object is used to inform the editor hosting component about configuration\n * changes to configure (e.g. enable/disable) the control buttons accordingly.\n */\nexport interface WidgetConfigStatus {\n /**\n * Indicates that the configuration was changed. If true, canceling\n * the editor will first show a dialog to confirm the discard.\n */\n modified: boolean;\n\n /**\n * If true, save or add button will be disabled.\n */\n invalid: boolean;\n}\n\n/**\n * An editor component for a widget instance need to implement this interface.\n * After initializing the instance editor component, with widget configuration\n * is set. Optionally, the component can emit changes during editing to control\n * e.g. the dialog behavior like disabling the save button.\n */\nexport interface WidgetInstanceEditor {\n /**\n * The hosting component of the widget instance editor sets the configuration\n * after initialization. The editor component should use the configuration as\n * input and persist all relevant changes within the config. The hosting component\n * takes the config after adding of saving the widget instance and updates the\n * dashboard.\n */\n config:\n | WidgetConfig\n | Omit<WidgetConfig, 'id'>\n | InputSignal<WidgetConfig | Omit<WidgetConfig, 'id'>>;\n /**\n * Optionally, emit updated widget configuration using an event emitter.\n */\n configChange?:\n | Subject<WidgetConfig | Omit<WidgetConfig, 'id'>>\n | OutputEmitterRef<WidgetConfig | Omit<WidgetConfig, 'id'>>;\n\n /**\n * Optionally, inform the hosting component about widget configuration status changes.\n */\n statusChanges?:\n | Subject<Partial<WidgetConfigStatus>>\n | OutputEmitterRef<Partial<WidgetConfigStatus>>;\n}\n\n/**\n * State to control the behavior of a widget instance editor wizard.\n * The wizard state is used to control the behavior of the dialog buttons\n * provided by the catalog and editor components.\n */\nexport interface WidgetInstanceEditorWizardState {\n hasNext: boolean;\n hasPrevious: boolean;\n disableNext?: boolean;\n}\n\n/**\n * A widget instance editor component that shall support a multi-page\n * widget configuration can implement this interface. The wizard-like\n * page state {@link WidgetInstanceEditorWizardState} needs to be managed\n * by the editor itself and is used to control wizard dialog buttons\n * that are provided by the catalog and editor component.\n */\nexport interface WidgetInstanceEditorWizard extends WidgetInstanceEditor {\n /**\n * The current state of the multi-page widget instance editor. The state\n * is access after `#next()` or `#previous()` is invoked.\n */\n state: WidgetInstanceEditorWizardState;\n /**\n * Emit changes as needed during the user interaction with the editor.\n */\n stateChange?:\n | Subject<WidgetInstanceEditorWizardState>\n | OutputEmitterRef<WidgetInstanceEditorWizardState>;\n /**\n * Is invoked from the next button. Display next page as consequence.\n * For web components, implementing `next()` requires adding an event listener\n * for the `next` event on the element.\n */\n next(): void;\n /**\n * Is invoked from the previous button. Display previous page as consequence.\n * For web components, implementing `previous()` requires adding an event listener\n * for the `previous` event on the element.\n */\n previous(): void;\n}\n\n/**\n * Event type used when a widget config is changed from within\n * a widget instance. For example, a widget instance component\n * may assign and change the primary actions. It needs to publish the\n * change so that the UI in the hosting dashboard card can be updated.\n */\nexport type WidgetConfigEvent = {\n /** Primary actions that are visible in normal view mode. */\n primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in normal view mode. */\n secondaryActions?: (MenuItemLegacy | MenuItem)[];\n /** Primary actions that are visible in editable dashboard mode. */\n primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in editable dashboard mode. */\n secondaryEditActions?: (MenuItemLegacy | MenuItem)[];\n};\n\n/**\n * Every widget component implementation needs to implement the {@link WidgetInstance}\n * interface. It provides the interface between the component implementation and the\n * dashboard.\n */\nexport interface WidgetInstance {\n /** The WidgetConfig is set after instantiating the widget component. */\n config: WidgetConfig | InputSignal<WidgetConfig>;\n\n /**\n * The dashboard will set the editable property to `true`, if the dashboard\n * enters the editable mode. The attribute is used to inform every\n * widget instance.\n */\n editable?: boolean;\n\n /** Primary actions that are visible in normal view mode. */\n primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in normal view mode. */\n secondaryActions?: (MenuItemLegacy | MenuItem)[];\n /** Primary actions that are visible in editable dashboard mode. */\n primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in editable dashboard mode. */\n secondaryEditActions?: (MenuItemLegacy | MenuItem)[];\n\n /** {@link WidgetInstance} component implementations should emit change\n * events after changing the instance configuration like the actions.\n */\n configChange?: EventEmitter<WidgetConfigEvent>;\n /**\n * An optional footer template that is added into the dashboard card's footer.\n */\n footer?: TemplateRef<unknown>;\n}\n\n/**\n * Type to define the position of a widget instance, consisting of\n * the instance id and x, y, width and height.\n */\nexport type WidgetPositionConfig = Pick<WidgetConfig, 'id' | 'x' | 'y' | 'width' | 'height'>;\n\n/**\n * Function creates a new {@link WidgetConfig} without id from a {@link Widget} and\n * copies all default values into the {@link WidgetConfig}.\n * @param widget - The source to create the new {@link WidgetConfig} from.\n * @returns The created {@link WidgetConfig} without id.\n */\nexport const createWidgetConfig = (widget: Widget): Omit<WidgetConfig, 'id'> => {\n const widgetConfig: Omit<WidgetConfig, 'id'> = {\n heading: widget.name,\n widgetId: widget.id,\n version: widget.version,\n minWidth: 3,\n ...widget.defaults,\n payload: { ...widget.payload }\n };\n return widgetConfig;\n};\n\n/**\n * The Remote Module definition is based on `@angular-architects`.\n * We take it over into this file to prevent adding a hard dependency.\n */\nexport type LoadRemoteModuleOptions =\n | LoadRemoteModuleScriptOptions\n | LoadRemoteModuleEsmOptions\n | LoadRemoteModuleManifestOptions;\n\nexport type LoadRemoteModuleScriptOptions = {\n type?: 'script';\n remoteEntry?: string;\n remoteName: string;\n exposedModule: string;\n};\n\nexport type LoadRemoteModuleEsmOptions = {\n type: 'module';\n remoteEntry: string;\n exposedModule: string;\n};\n\nexport type LoadRemoteModuleManifestOptions = {\n type: 'manifest';\n remoteName: string;\n exposedModule: string;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport {\n Component,\n ComponentRef,\n computed,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n isSignal,\n OnDestroy,\n OnInit,\n output,\n OutputRefSubscription,\n signal,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { SiActionDialogService } from '@spike-rabbit/element-ng/action-modal';\nimport { SiCircleStatusComponent } from '@spike-rabbit/element-ng/circle-status';\nimport { SiEmptyStateComponent } from '@spike-rabbit/element-ng/empty-state';\nimport { SiSearchBarComponent } from '@spike-rabbit/element-ng/search-bar';\nimport { SiTranslatePipe, t } from '@spike-rabbit/element-translate-ng/translate';\nimport { Subscription } from 'rxjs';\n\nimport {\n createWidgetConfig,\n Widget,\n WidgetConfig,\n WidgetConfigStatus,\n WidgetInstanceEditor,\n WidgetInstanceEditorWizard,\n WidgetInstanceEditorWizardState\n} from '../../model/widgets.model';\nimport { setupWidgetEditor } from '../../widget-loader';\n\n/**\n * Default widget catalog implementation to show all available widgets that can be added\n * to a dashboard. It consists of a list view, that lists all available widgets and after\n * selection, a host in which the widget specific editor is loaded. Applications can either\n * stay with the default catalog or implement their own by extending this class.\n */\n@Component({\n selector: 'si-widget-catalog',\n imports: [SiSearchBarComponent, SiCircleStatusComponent, SiEmptyStateComponent, SiTranslatePipe],\n templateUrl: './si-widget-catalog.component.html',\n styleUrl: './si-widget-catalog.component.scss'\n})\nexport class SiWidgetCatalogComponent implements OnInit, OnDestroy {\n /**\n * Placeholder text for the search input field in the widget catalog.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n * ```\n */\n readonly searchPlaceholder = input(\n t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n );\n /**\n * Emits when the catalog is `closed`, either by canceling or by adding or saving\n * a widget configuration. On cancel `undefined` is emitted, otherwise the related\n * widget configuration is emitted.\n */\n readonly closed = output<Omit<WidgetConfig, 'id'> | undefined>();\n\n /**\n * View defines if the catalog widget list or the widget editor is visible.\n *\n * @internal\n * @defaultValue 'list'\n */\n readonly view = signal<'list' | 'editor' | 'editor-only'>('list');\n\n protected readonly editorHost = viewChild.required('editorHost', { read: ViewContainerRef });\n\n /**\n * Property to provide the available widgets to the catalog. The flexible\n * dashboard creates the catalog by Angular's `createComponent()` method\n * and sets the available widgets to this attribute.\n *\n * @defaultValue [] */\n widgetCatalog: Widget[] = [];\n\n /**\n * Holds the search term from the catalog to be visible when going back\n * by pressing the previous button from the widget edit view.\n */\n protected searchTerm = '';\n /**\n * Array used to hold the search result on the widget catalog.\n * @defaultValue [] */\n protected filteredWidgetCatalog: Widget[] = [];\n protected readonly selected = signal<Widget | undefined>(undefined);\n private widgetConfig?: Omit<WidgetConfig, 'id'>;\n private readonly hasEditor = signal<boolean>(false);\n\n protected labelCancel = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.CANCEL:Cancel`);\n protected labelPrevious = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.PREVIOUS:Previous`);\n protected labelNext = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.NEXT:Next`);\n protected labelAdd = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.ADD:Add`);\n protected labelEmpty = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.EMPTY:Empty`);\n\n protected labelDialogHeading = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.HEADING:Widget configuration changed`\n );\n protected labelDialogCancel = t(\n () => $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL:Cancel`\n );\n protected labelDialogMessage = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE:The widget configuration changed. Do you want to discard the changes?`\n );\n protected labelDialogDiscard = t(\n () => $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD:Discard`\n );\n\n protected readonly showAddButton = computed(() =>\n this.view() === 'list' ? !this.hasEditor() : true\n );\n\n protected readonly showNextButton = computed(() =>\n this.view() === 'list' ? this.hasEditor() : this.editorWizardState() !== undefined\n );\n\n protected readonly showPreviousButton = computed(() => this.view() === 'editor');\n\n protected readonly disableAddButton = computed(() => !this.selected() || this.invalidConfig());\n protected readonly disableNextButton = computed(() => {\n const wizardState = this.editorWizardState();\n if (this.view() === 'list') {\n return !this.selected();\n } else if (!wizardState) {\n return true;\n } else if (!wizardState.hasNext) {\n return true;\n } else if (wizardState.disableNext !== undefined) {\n return wizardState.disableNext;\n } else {\n return false;\n }\n });\n\n /** Indicates if the current config is valid or not. If invalid, the add button is disabled. */\n private readonly invalidConfig = signal(false);\n\n /**\n * Marks the widget configuration as modified. Is set when widget editor instance\n * emits configChange events. Triggers edit discard confirmation dialog when widget config\n * is modified but not added to the dashboard.\n * */\n private widgetConfigModified = false;\n private widgetInstanceEditor?: WidgetInstanceEditor;\n private readonly editorWizardState = signal<WidgetInstanceEditorWizardState | undefined>(\n undefined\n );\n private widgetInstanceEditorRef?: ComponentRef<WidgetInstanceEditor>;\n\n private subscriptions: Subscription[] | OutputRefSubscription[] = [];\n private dialogService = inject(SiActionDialogService);\n private injector = inject(Injector);\n private envInjector = inject(EnvironmentInjector);\n\n ngOnInit(): void {\n this.filteredWidgetCatalog = this.widgetCatalog;\n if (this.widgetCatalog.length > 0) {\n this.selectWidget(this.widgetCatalog[0]);\n }\n }\n\n ngOnDestroy(): void {\n this.tearDownEditor();\n }\n\n protected onSearch(searchTerm?: string): void {\n if (!searchTerm || searchTerm.trim().length === 0) {\n this.searchTerm = '';\n this.filteredWidgetCatalog = this.widgetCatalog;\n } else {\n this.searchTerm = searchTerm;\n this.filteredWidgetCatalog = this.widgetCatalog.filter(wd =>\n wd.name.toLowerCase().includes(searchTerm.trim().toLowerCase())\n );\n }\n if (this.filteredWidgetCatalog.length > 0) {\n this.selectWidget(this.filteredWidgetCatalog[0]);\n } else {\n this.selectWidget(undefined);\n }\n }\n\n protected onCancel(): void {\n if (!this.widgetConfigModified) {\n this.closed.emit(undefined);\n } else {\n this.dialogService\n .showActionDialog({\n type: 'edit-discard',\n disableSave: true,\n heading: this.labelDialogHeading,\n cancelBtnName: this.labelDialogCancel,\n disableSaveMessage: this.labelDialogMessage,\n disableSaveDiscardBtnName: this.labelDialogDiscard\n })\n .subscribe(result => {\n if (result === 'discard') {\n this.closed.emit(undefined);\n }\n });\n }\n }\n\n protected onNext(): void {\n if (this.view() === 'list') {\n this.setupWidgetInstanceEditor();\n } else {\n if (this.isEditorWizdard(this.widgetInstanceEditor)) {\n this.widgetInstanceEditor.next();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n }\n }\n }\n\n protected onPrevious(): void {\n if (this.isEditorWizdard(this.widgetInstanceEditor) && this.editorWizardState()?.hasPrevious) {\n this.widgetInstanceEditor.previous();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n } else if (!this.widgetConfigModified) {\n this.setupCatalog();\n } else {\n this.dialogService\n .showActionDialog({\n type: 'edit-discard',\n disableSave: true,\n heading: this.labelDialogHeading,\n cancelBtnName: this.labelDialogCancel,\n message: this.labelDialogMessage,\n discardBtnName: this.labelDialogDiscard\n })\n .subscribe(result => {\n if (result === 'discard') {\n this.setupCatalog();\n }\n });\n }\n }\n\n private setupWidgetInstanceEditor(): void {\n const selected = this.selected();\n if (!selected) {\n return;\n }\n this.tearDownEditor();\n this.view.set('editor');\n this.widgetConfig = createWidgetConfig(selected);\n\n setupWidgetEditor(\n selected.componentFactory,\n this.editorHost(),\n this.injector,\n this.envInjector\n ).subscribe({\n next: componentRef => {\n this.widgetInstanceEditorRef = componentRef;\n this.widgetInstanceEditor = componentRef.instance;\n if (isSignal(this.widgetInstanceEditor.config)) {\n this.widgetInstanceEditorRef.setInput('config', this.widgetConfig);\n } else {\n this.widgetInstanceEditor.config = this.widgetConfig!;\n }\n // To be used by webcomponent wrapper\n if ('statusChangesHandler' in this.widgetInstanceEditor) {\n this.widgetInstanceEditor.statusChangesHandler = this.handleStatusChanges.bind(this);\n }\n\n let hasStatusChangesEmitter = false;\n if (this.widgetInstanceEditor.statusChanges) {\n hasStatusChangesEmitter = true;\n this.subscriptions.push(\n this.widgetInstanceEditor.statusChanges.subscribe(statusChanges => {\n this.handleStatusChanges(statusChanges);\n }) as Subscription\n );\n }\n\n if (this.widgetInstanceEditor.configChange) {\n this.subscriptions.push(\n this.widgetInstanceEditor.configChange.subscribe(config => {\n if (!hasStatusChangesEmitter) {\n this.invalidConfig.set(!!config.invalid);\n this.widgetConfigModified = true;\n }\n }) as Subscription\n );\n }\n\n if (this.isEditorWizdard(this.widgetInstanceEditor)) {\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n\n if (this.widgetInstanceEditor.stateChange) {\n this.subscriptions.push(\n this.widgetInstanceEditor.stateChange.subscribe(state => {\n this.editorWizardState.set(state);\n }) as Subscription\n );\n }\n }\n },\n error: error => {\n console.error(error);\n }\n });\n }\n\n private tearDownEditor(): void {\n this.invalidConfig.set(false);\n this.widgetConfigModified = false;\n this.editorWizardState.set(undefined);\n this.widgetInstanceEditor = undefined;\n this.subscriptions.forEach(s => s.unsubscribe());\n this.subscriptions = [];\n }\n\n private setupCatalog(): void {\n if (this.editorHost().length > 0) {\n this.editorHost().remove(0);\n }\n this.tearDownEditor();\n this.widgetConfig = undefined;\n this.view.set('list');\n }\n\n protected onAddWidget(): void {\n const selected = this.selected();\n if (!selected) {\n return;\n }\n\n if (!this.widgetConfig) {\n this.widgetConfig = createWidgetConfig(selected);\n } else {\n // Make sure we use the same config object as the editor\n if (isSignal(this.widgetInstanceEditor?.config)) {\n this.widgetConfig = this.widgetInstanceEditor?.config() ?? this.widgetConfig;\n } else {\n this.widgetConfig = this.widgetInstanceEditor?.config ?? this.widgetConfig;\n }\n }\n this.closed.emit(this.widgetConfig);\n }\n\n protected selectWidget(widget?: Widget): void {\n this.selected.set(widget);\n if (widget?.componentFactory?.editorComponentName) {\n this.hasEditor.set(true);\n } else {\n this.hasEditor.set(false);\n }\n }\n\n private isEditorWizdard(\n editor?: WidgetInstanceEditor | WidgetInstanceEditorWizard\n ): editor is WidgetInstanceEditorWizard {\n return !!editor && 'state' in editor;\n }\n\n private handleStatusChanges(statusChanges: Partial<WidgetConfigStatus>): void {\n if (statusChanges.invalid !== undefined) {\n this.invalidConfig.set(statusChanges.invalid);\n }\n if (statusChanges.modified !== undefined) {\n this.widgetConfigModified = statusChanges.modified;\n }\n }\n}\n","<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n @if (view() === 'list') {\n <div class=\"si-layout-fixed-height\">\n <div class=\"mx-0\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div\n class=\"si-layout-fixed-height text-pre-wrap text-break overflow-y-auto widget-list mt-6 bg-base-1\"\n >\n @if (filteredWidgetCatalog.length > 0) {\n <div class=\"si-layout-fixed-height list-group\">\n @for (widget of filteredWidgetCatalog; track $index) {\n <button\n type=\"button\"\n class=\"list-group-item list-group-item-action d-flex\"\n [class.active]=\"selected() === widget\"\n (click)=\"selectWidget(widget)\"\n >\n <si-circle-status class=\"my-n4 me-5\" [icon]=\"widget.iconClass\" />\n <div class=\"d-flex flex-column align-items-start\">\n <span class=\"si-title-2\">{{ widget.name }}</span>\n <span class=\"si-body-2\">{{ widget.description?.trim() }}</span>\n </div>\n </button>\n }\n </div>\n } @else {\n <div>\n <si-empty-state icon=\"element-report\" [heading]=\"labelEmpty\" />\n </div>\n }\n </div>\n </div>\n }\n <ng-container #editorHost />\n</div>\n\n<div class=\"catalog-footer py-0 px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n @if (showPreviousButton()) {\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onPrevious()\">{{\n labelPrevious | translate\n }}</button>\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn\"\n [class.btn-primary]=\"view() === 'list'\"\n [class.btn-secondary]=\"view() !== 'list'\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n @if (showAddButton()) {\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"disableAddButton()\"\n (click)=\"onAddWidget()\"\n >{{ labelAdd | translate }}</button\n >\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { AsyncPipe } from '@angular/common';\nimport {\n Component,\n computed,\n inject,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n OutputRefSubscription,\n signal,\n SimpleChanges,\n Type,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { MenuItem } from '@spike-rabbit/element-ng/common';\nimport { SiDashboardComponent } from '@spike-rabbit/element-ng/dashboard';\nimport { t } from '@spike-rabbit/element-translate-ng/translate';\nimport { BehaviorSubject, combineLatest, of, Subject, Subscription } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\nimport { Config, SI_DASHBOARD_CONFIGURATION } from '../../model/configuration';\nimport { DashboardToolbarItem } from '../../model/si-dashboard-toolbar.model';\nimport { SI_WIDGET_STORE } from '../../model/si-widget-storage';\nimport { Widget, WidgetConfig } from '../../model/widgets.model';\nimport { SiDashboardToolbarComponent } from '../dashboard-toolbar/si-dashboard-toolbar.component';\nimport { SiGridComponent } from '../grid/si-grid.component';\nimport { SiWidgetCatalogComponent } from '../widget-catalog/si-widget-catalog.component';\nimport { SiWidgetInstanceEditorDialogComponent } from '../widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\n\n/**\n * Dashboard has three state: displaying the *dashboard* (default),\n * showing the *catalog* to add a new widget, or showing an *editor*\n * to edit an existing widget.\n */\ntype ViewState = 'dashboard' | 'catalog' | 'editor';\n\n/**\n * The component implements a dashboard with adding, removing and resizing widgets.\n * It consists and connects a toolbar, a grid with widgets, and a widget catalog.\n */\n@Component({\n selector: 'si-flexible-dashboard',\n imports: [SiDashboardComponent, SiDashboardToolbarComponent, SiGridComponent, AsyncPipe],\n templateUrl: './si-flexible-dashboard.component.html',\n styleUrl: './si-flexible-dashboard.component.scss'\n})\nexport class SiFlexibleDashboardComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Input to change the dashboard editable state.\n *\n * @defaultValue false\n */\n readonly editable = model(false);\n\n /**\n * Heading for the dashboard.\n */\n readonly heading = input<string>();\n\n /**\n * Optionally, provide a custom subclass of the SiWidgetCatalogComponent\n * to use your own catalog component.\n */\n readonly widgetCatalogComponent = input<Type<SiWidgetCatalogComponent>>();\n\n /**\n * Optionally, provide a custom subclass of the {@link SiWidgetInstanceEditorDialogComponent}\n * to use your own implementation.\n */\n readonly widgetInstanceEditorDialogComponent =\n input<Type<SiWidgetInstanceEditorDialogComponent>>();\n\n /**\n * Optionally, but it is recommended to include an id for a dashboard.\n * The id is utilized in the persistence calls on the {@link SiWidgetStorage}.\n */\n readonly dashboardId = input<string>();\n\n /**\n * Sets the available widgets for the widget catalog to the dashboard.\n *\n * @defaultValue [] */\n readonly widgetCatalog = input<Widget[]>([]);\n\n /**\n * Option to remove the add widget instance button from the primary toolbar.\n *\n * @defaultValue false\n */\n readonly hideAddWidgetInstanceButton = input(false);\n\n /**\n * Option to hide the dashboard edit button.\n *\n * @defaultValue false\n */\n readonly hideEditButton = input(false);\n\n /**\n * Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.\n *\n * @defaultValue false\n */\n readonly showEditButtonLabel = input(false);\n\n /**\n * Option to turn off the loading spinner on save and load operations.\n *\n * @defaultValue false\n */\n readonly hideProgressIndicator = input(false);\n\n /**\n * Option to configure a dashboard instance. Default is the optional value from\n * the {@link SI_DASHBOARD_CONFIGURATION}.\n *\n * @defaultValue inject(SI_DASHBOARD_CONFIGURATION)\n */\n readonly config = input<Config | undefined>(inject(SI_DASHBOARD_CONFIGURATION));\n\n /**\n * Placeholder text for the search input field in the widget catalog.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n * ```\n */\n readonly searchPlaceholder = input(\n t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n );\n\n /**\n * The grid component is the actual container for the widgets.\n */\n readonly grid = viewChild.required<SiGridComponent>('grid');\n\n /** Property to access the dashboard component instance.\n */\n readonly dashboard = viewChild.required<SiDashboardComponent>('dashboard');\n\n /** The view child holds the container that hosts the widget catalog.\n */\n protected readonly catalogHost = viewChild.required('catalogHost', { read: ViewContainerRef });\n\n /**\n * Emits the modification state of the grid. It is `unmodified` when the visible state\n * is equal to the loaded state from the widget storage. When the user modifies the dashboard by\n * e.g. while moving the widgets, the dashboard is marked as `modified` and emits `true` and when the user\n * persists the change by saving, or reverts the state by canceling, the state is `unmodified`\n * again and emits `false`.\n */\n readonly isModified = output<boolean>();\n\n protected labelAddWidget = t(() => $localize`:@@DASHBOARD.ADD_WIDGET:Add widget`);\n protected labelEditor = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE:Edit`);\n protected labelCatalog = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.TITLE:Add widget`);\n\n protected addWidgetInstanceAction: DashboardToolbarItem = {\n type: 'action',\n label: this.labelAddWidget,\n action: () => this.showWidgetCatalog()\n };\n\n /**\n * The primary action menu items shown in the edit mode of the dashboard.\n */\n readonly primaryEditActions$ = new BehaviorSubject<(MenuItem | DashboardToolbarItem)[]>([\n this.addWidgetInstanceAction\n ]);\n /**\n * The secondary action menu items shown in the edit mode of the dashboard. When all menu items are more than\n * three, they will be places in the secondary menu of the content action bar.\n */\n readonly secondaryEditActions$ = new BehaviorSubject<(MenuItem | DashboardToolbarItem)[]>([]);\n\n /**\n * @returns True, if the dashboard shows its widgets and not a catalog or and editor.\n */\n readonly isDashboardVisible = computed(() => this.viewState() === 'dashboard');\n\n /**\n * The page title of the dashboard, which is either {@link SiFlexibleDashboardComponent.heading} for the\n * default widget view or `DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE` or 'DASHBOARD.WIDGET_LIBRARY.TITLE' when\n * adding new or editing widgets.\n */\n readonly pageTitle = computed(() => {\n const viewState = this.viewState();\n switch (viewState) {\n case 'editor':\n return this.labelEditor;\n case 'catalog':\n return this.labelCatalog;\n default:\n return this.heading();\n }\n });\n\n private readonly viewState = signal<ViewState>('dashboard');\n private subscriptions: Subscription[] = [];\n private widgetStorage = inject(SI_WIDGET_STORE);\n private hideAddWidgetInstanceButton$ = new BehaviorSubject(this.hideAddWidgetInstanceButton());\n private dashboardId$ = new Subject<string | undefined>();\n private outputRefSubscription: OutputRefSubscription[] = [];\n private readonly toolbar = viewChild.required<SiDashboardToolbarComponent>('toolbar');\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.dashboardId) {\n const dashboard = this.dashboard();\n if (dashboard.isExpanded) {\n dashboard.restore();\n }\n if (this.editable()) {\n this.grid().cancel();\n this.viewState.set('dashboard');\n this.catalogHost().clear();\n }\n this.dashboardId$.next(changes.dashboardId.currentValue);\n this.setupMenuItems();\n }\n\n if (changes.editable) {\n if (changes.editable.currentValue) {\n this.grid().edit();\n } else {\n this.grid().cancel();\n }\n }\n if (changes.hideAddWidgetInstanceButton) {\n this.hideAddWidgetInstanceButton$.next(changes.hideAddWidgetInstanceButton.currentValue);\n }\n }\n\n ngOnInit(): void {\n this.setupMenuItems();\n\n const grid = this.grid();\n this.outputRefSubscription.push(\n grid.widgetInstanceEdit.subscribe(widgetConfig => {\n this.editWidgetInstance(widgetConfig);\n })\n );\n this.outputRefSubscription.push(\n grid.editable.subscribe(editable => {\n this.editable.set(editable);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.dashboardId$.next(undefined);\n this.subscriptions?.forEach(sub => sub.unsubscribe());\n this.outputRefSubscription?.forEach(sub => sub.unsubscribe());\n }\n\n /**\n * Shows the widget catalog of the dashboard. If a widget instance is expanded\n * it restores the widget instances before.\n */\n showWidgetCatalog(): void {\n const dashboard = this.dashboard();\n if (dashboard.isExpanded) {\n dashboard.restore();\n }\n if (!this.editable()) {\n this.grid().edit();\n }\n this.viewState.set('catalog');\n const componentType = this.widgetCatalogComponent() ?? SiWidgetCatalogComponent;\n const catalogRef = this.catalogHost().createComponent<SiWidgetCatalogComponent>(componentType);\n catalogRef.setInput('searchPlaceholder', this.searchPlaceholder());\n catalogRef.instance.widgetCatalog = this.widgetCatalog();\n\n const subscription = catalogRef.instance.closed.subscribe(widgetConfig => {\n subscription.unsubscribe();\n this.viewState.set('dashboard');\n this.catalogHost().clear();\n if (widgetConfig) {\n this.grid().addWidgetInstance(widgetConfig);\n }\n });\n }\n\n protected onModified(event: boolean): void {\n this.isModified.emit(event);\n this.toolbar().disableSaveButton.set(!event);\n }\n\n private setupMenuItems(): void {\n const primaryMenuItems = this.widgetStorage.getToolbarMenuItems\n ? this.widgetStorage.getToolbarMenuItems(this.dashboardId()).primary\n : of([]);\n combineLatest([primaryMenuItems, this.hideAddWidgetInstanceButton$])\n .pipe(takeUntil(this.dashboardId$))\n .subscribe(([items, hideAddButton]) => this.setupPrimaryMenuItems(items, hideAddButton));\n\n const secondaryMenuItems = this.widgetStorage.getToolbarMenuItems\n ? this.widgetStorage.getToolbarMenuItems(this.dashboardId()).secondary\n : undefined;\n\n if (secondaryMenuItems) {\n secondaryMenuItems\n .pipe(\n takeUntil(this.dashboardId$),\n map(items => items.map(item => this.proxyMenuItemAction(item)))\n )\n .subscribe(items => this.secondaryEditActions$.next(items));\n }\n }\n\n private setupPrimaryMenuItems(\n items: (MenuItem | DashboardToolbarItem)[],\n hideAddWidgetInstanceButton: boolean\n ): void {\n const next: (MenuItem | DashboardToolbarItem)[] = hideAddWidgetInstanceButton\n ? []\n : [this.addWidgetInstanceAction];\n next.push(...items.map(item => this.proxyMenuItemAction(item)));\n this.primaryEditActions$.next(next);\n }\n\n private editWidgetInstance(widgetConfig: WidgetConfig): void {\n const dashboard = this.dashboard();\n if (dashboard.isExpanded) {\n dashboard.restore();\n }\n const widget = this.getWidget(widgetConfig.widgetId);\n const widgetInstanceEditorDialogComponent = this.widgetInstanceEditorDialogComponent();\n const componentType =\n widgetInstanceEditorDialogComponent ?? SiWidgetInstanceEditorDialogComponent;\n\n this.viewState.set('editor');\n const catalogRef =\n this.catalogHost().createComponent<SiWidgetInstanceEditorDialogComponent>(componentType);\n catalogRef.setInput('widgetConfig', widgetConfig);\n catalogRef.setInput('widget', widget);\n const subscription = catalogRef.instance.closed.subscribe(editedWidgetConfig => {\n subscription.unsubscribe();\n this.viewState.set('dashboard');\n this.catalogHost().clear();\n if (editedWidgetConfig) {\n this.grid().updateWidgetInstance(editedWidgetConfig);\n }\n });\n }\n\n private proxyMenuItemAction(\n item: MenuItem | DashboardToolbarItem\n ): MenuItem | DashboardToolbarItem {\n if ('action' in item) {\n if (!item.action || item.action instanceof String) {\n return item;\n } else {\n const realAction = item.action as (param?: any) => void | any;\n item.action = () => {\n realAction(this.grid());\n };\n }\n }\n return item;\n }\n\n private getWidget(id: string): Widget | undefined {\n return this.widgetCatalog().find(widget => widget.id === id);\n }\n}\n","<si-dashboard #dashboard [heading]=\"pageTitle()\" [sticky]=\"true\">\n <si-dashboard-toolbar\n #toolbar\n menubar\n [class.d-none]=\"!isDashboardVisible()\"\n [primaryEditActions]=\"(primaryEditActions$ | async) ?? []\"\n [secondaryEditActions]=\"(secondaryEditActions$ | async) ?? []\"\n [editable]=\"editable()\"\n [disabled]=\"(grid.isLoading | async) ?? false\"\n [hideEditButton]=\"hideEditButton()\"\n [showEditButtonLabel]=\"showEditButtonLabel()\"\n (editableChange)=\"grid.edit()\"\n (save)=\"grid.save()\"\n (cancel)=\"grid.cancel()\"\n >\n <ng-content select=\"[filters-slot]\" filters-slot />\n </si-dashboard-toolbar>\n\n <div dashboard class=\"d-contents\">\n <si-grid\n #grid\n [class.d-none]=\"!isDashboardVisible()\"\n [gridConfig]=\"config()?.grid\"\n [dashboardId]=\"dashboardId()\"\n [widgetCatalog]=\"widgetCatalog()\"\n [hideProgressIndicator]=\"hideProgressIndicator()\"\n [widgetInstanceEditorDialogComponent]=\"widgetInstanceEditorDialogComponent()\"\n [emitWidgetInstanceEditEvents]=\"true\"\n (isModified)=\"onModified($event)\"\n >\n <ng-content select=\"[empty-state]\" empty-state />\n </si-grid>\n <ng-container #catalogHost />\n </div>\n</si-dashboard>\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\n\nimport { SiFlexibleDashboardComponent } from './components/flexible-dashboard/si-flexible-dashboard.component';\nimport { SiGridComponent } from './components/grid/si-grid.component';\nimport { SiWidgetCatalogComponent } from './components/widget-catalog/si-widget-catalog.component';\nimport { SiWidgetInstanceEditorDialogComponent } from './components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\nimport { Config, SI_DASHBOARD_CONFIGURATION } from './model/configuration';\nimport {\n SI_WIDGET_STORE,\n SiDefaultWidgetStorage,\n SiWidgetStorage\n} from './model/si-widget-storage';\n\n@NgModule({\n imports: [\n SiFlexibleDashboardComponent,\n SiGridComponent,\n SiWidgetCatalogComponent,\n SiWidgetInstanceEditorDialogComponent\n ],\n exports: [\n SiFlexibleDashboardComponent,\n SiGridComponent,\n SiWidgetCatalogComponent,\n SiWidgetInstanceEditorDialogComponent\n ]\n})\nexport class SiDashboardsNgModule {\n /**\n * @deprecated The module configuration `forRoot` is not needed any more. You can use the injection tokens\n * `SI_DASHBOARD_CONFIGURATION` and `SI_WIDGET_STORE` direct in your app configuration. We migrated to standalone\n * components already and will delete this module definition later.\n */\n static forRoot({\n config,\n dashboardApi\n }: {\n config?: Config;\n /**\n * Provide a custom widget storage.\n *\n * @deprecated Use the provider tokens in your app config instead.\n *\n * @example\n * ```typescript\n * const appConfig: ApplicationConfig = {\n * providers: [{provide: SI_WIDGET_STORE, useClass: YourWidgetStorage}]\n * }\n * ```\n */\n dashboardApi?: Provider;\n }): ModuleWithProviders<SiDashboardsNgModule> {\n return {\n ngModule: SiDashboardsNgModule,\n providers: [\n {\n provide: SI_DASHBOARD_CONFIGURATION,\n useValue: config\n },\n dashboardApi ?? {\n provide: SiWidgetStorage,\n useClass: SiDefaultWidgetStorage\n },\n dashboardApi ? { provide: SI_WIDGET_STORE, useExisting: SiWidgetStorage } : []\n ]\n };\n }\n}\n\nexport { SiDashboardsNgModule as SimplDashboardsNgModule };\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './components/flexible-dashboard/si-flexible-dashboard.component';\nexport * from './components/grid/si-grid.component';\nexport * from './components/widget-catalog/si-widget-catalog.component';\nexport * from './components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\n\nexport * from './model/configuration';\nexport * from './model/gridstack.model';\nexport * from './model/si-widget-storage';\nexport * from './model/widgets.model';\nexport * from './model/si-dashboard-toolbar.model';\nexport * from './widget-loader';\n\nexport * from '@spike-rabbit/dashboards-ng/translate';\nexport * from './public-api.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAeH;;AAEG;AACI,MAAM,yBAAy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E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG;AAC7E;SACF;;uGAtCQ,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAZ7B,4BAA4B;YAC5B,eAAe;YACf,wBAAwB;AACxB,YAAA,qCAAqC,aAGrC,4BAA4B;YAC5B,eAAe;YACf,wBAAwB;YACxB,qCAAqC,CAAA,EAAA,CAAA;AAG5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAZ7B,4BAA4B;YAE5B,wBAAwB;YACxB,qCAAqC,CAAA,EAAA,CAAA;;2FAS5B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,4BAA4B;wBAC5B,eAAe;wBACf,wBAAwB;wBACxB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,4BAA4B;wBAC5B,eAAe;wBACf,wBAAwB;wBACxB;AACD;AACF,iBAAA;;;AC9BD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spike-rabbit-dashboards-ng.mjs","sources":["../../../../projects/dashboards-ng/src/model/gridstack.model.ts","../../../../projects/dashboards-ng/src/model/configuration.ts","../../../../projects/dashboards-ng/src/model/si-widget-storage.ts","../../../../projects/dashboards-ng/src/components/dashboard-toolbar/si-dashboard-toolbar.component.ts","../../../../projects/dashboards-ng/src/components/dashboard-toolbar/si-dashboard-toolbar.component.html","../../../../projects/dashboards-ng/src/model/si-widget-id-provider.ts","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-wrapper-base.component.ts","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-editor-wrapper.component.ts","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-wrapper.component.html","../../../../projects/dashboards-ng/src/components/web-component-wrapper/si-web-component-wrapper.component.ts","../../../../projects/dashboards-ng/src/widget-loader.ts","../../../../projects/dashboards-ng/src/components/widget-host/si-widget-host.component.ts","../../../../projects/dashboards-ng/src/components/widget-host/si-widget-host.component.html","../../../../projects/dashboards-ng/src/components/gridstack-wrapper/si-gridstack-wrapper.component.ts","../../../../projects/dashboards-ng/src/components/gridstack-wrapper/si-gridstack-wrapper.component.html","../../../../projects/dashboards-ng/src/components/si-widget-editor-base.ts","../../../../projects/dashboards-ng/src/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.ts","../../../../projects/dashboards-ng/src/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.html","../../../../projects/dashboards-ng/src/components/grid/si-grid.component.ts","../../../../projects/dashboards-ng/src/components/grid/si-grid.component.html","../../../../projects/dashboards-ng/src/model/widgets.model.ts","../../../../projects/dashboards-ng/src/components/widget-catalog/si-widget-catalog.component.ts","../../../../projects/dashboards-ng/src/components/widget-catalog/si-widget-catalog.component.html","../../../../projects/dashboards-ng/src/components/flexible-dashboard/si-flexible-dashboard.component.ts","../../../../projects/dashboards-ng/src/components/flexible-dashboard/si-flexible-dashboard.component.html","../../../../projects/dashboards-ng/src/components/widget-renderer/si-widget-renderer.component.ts","../../../../projects/dashboards-ng/src/components/widget-renderer/si-widget-renderer.component.html","../../../../projects/dashboards-ng/src/services/federation-loader.util.ts","../../../../projects/dashboards-ng/src/public-api.module.ts","../../../../projects/dashboards-ng/src/public-api.ts","../../../../projects/dashboards-ng/src/spike-rabbit-dashboards-ng.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { BOOTSTRAP_BREAKPOINTS } from '@spike-rabbit/element-ng/resize-observer';\nimport { GridStackOptions } from 'gridstack';\n\n/**\n * Configuration object for the si-grid component, including\n * the options of gridstack.\n */\nexport interface GridConfig {\n /**\n * The configuration options of gridstack.\n */\n gridStackOptions?: GridStackOptions;\n}\n\n/**\n * The default gridstack configuration options.\n */\nexport const DEFAULT_GRIDSTACK_OPTIONS: GridStackOptions = {\n handle: '.draggable-overlay',\n cellHeight: 100,\n columnOpts: { breakpoints: [{ w: BOOTSTRAP_BREAKPOINTS.smMinimum, c: 1 }] },\n column: 12,\n margin: '0',\n placeholderClass: 'si-grid-stack-placeholder'\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { InjectionToken, Provider } from '@angular/core';\n\nimport { DEFAULT_GRIDSTACK_OPTIONS, GridConfig } from './gridstack.model';\nimport { DashboardToolbarItem } from './si-dashboard-toolbar.model';\n\n/**\n * Dashboard configuration object. Inject globally using the {@link SI_DASHBOARD_CONFIGURATION}\n * or configure individual dashboard instances.\n */\nexport type Config = {\n grid?: GridConfig;\n};\n\n/**\n * Injection token to configure dashboards. Use `{ provide: SI_DASHBOARD_CONFIGURATION, useValue: config }`\n * in your app configuration.\n */\nexport const SI_DASHBOARD_CONFIGURATION = new InjectionToken<Config>(\n 'Injection token to configure dashboards.',\n {\n providedIn: 'root',\n factory: () => ({ grid: { gridStackOptions: DEFAULT_GRIDSTACK_OPTIONS } })\n }\n);\n\n/**\n * Injection token to configure global toolbar menu items.\n */\nexport const SI_DASHBOARD_TOOLBAR_ITEMS = new InjectionToken<{\n primary: DashboardToolbarItem[];\n secondary: DashboardToolbarItem[];\n}>('Injection token to configure global toolbar menu items.');\n\n/**\n * provider function to configure global toolbar menu items.\n * @param toolbarItems - primary and secondary edit actions which are common to all\n * dashboard instances on application.\n */\nexport const provideDashboardToolbarItems = (toolbarItems?: {\n primary?: DashboardToolbarItem[];\n secondary?: DashboardToolbarItem[];\n}): Provider => ({\n provide: SI_DASHBOARD_TOOLBAR_ITEMS,\n useValue: { primary: toolbarItems?.primary ?? [], secondary: toolbarItems?.secondary ?? [] }\n});\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, InjectionToken } from '@angular/core';\nimport { MenuItem } from '@spike-rabbit/element-ng/common';\nimport { BehaviorSubject, Observable, of } from 'rxjs';\n\nimport type { SiFlexibleDashboardComponent } from '../components/flexible-dashboard/si-flexible-dashboard.component';\nimport type { provideDashboardToolbarItems } from './configuration';\nimport { DashboardToolbarItem } from './si-dashboard-toolbar.model';\nimport { WidgetConfig } from './widgets.model';\n\n/**\n * Injection token to configure your widget store implementation. Use\n * `{ provide: SI_WIDGET_STORE, useClass: AppWidgetStorage }` in your app configuration.\n */\nexport const SI_WIDGET_STORE = new InjectionToken<SiWidgetStorage>(\n 'Injection token to configure your widget store implementation.',\n { providedIn: 'root', factory: () => new SiDefaultWidgetStorage() }\n);\n\n/**\n * Widget storage api to provide the persistence layer of the widgets of a dashboard\n * (typically from a web service). The dashboard grid uses this API to load and save\n * the widget configurations. Applications using siemens-dashboard needs to implement\n * this abstract class and provide it in the module configuration.\n */\nexport abstract class SiWidgetStorage {\n /**\n * Returns an observable with the dashboard widget configuration. The dashboard subscribes to the\n * observable and updates when a new value emits.\n */\n abstract load(dashboardId?: string): Observable<WidgetConfig[]>;\n\n /**\n * Saves the given widget configuration. New widgets have `id`\n * generated through the `SiWidgetIdProvider.generateWidgetId` implementation\n * and if ids comes from backend then it is in the responsibility of the implementor to update\n * the ids of the new widgets with the ids returned from backend upon save. In addition,\n * the implementor needs to check if objects that have been available before are missing. These\n * widgets have been removed by the user. As a result of this method, the observables returned\n * by the `load()` method should emit the new widget config objects, before also returning them.\n * @param modifiedWidgets - The existing widget config objects to be saved.\n * @param addedWidgets - The new widget config objects to be saved.\n * @param removedWidgets - The widget config objects that have been removed.\n * @param dashboardId - The id of the dashboard if present to allow dashboard specific storage.\n * @returns An observable that emits the saved widget config objects with their ids.\n */\n\n abstract save(\n modifiedWidgets: WidgetConfig[],\n addedWidgets: WidgetConfig[],\n removedWidgets?: WidgetConfig[],\n dashboardId?: string\n ): Observable<WidgetConfig[]>;\n\n /**\n * Optional method to provide primary and secondary toolbar menu items.\n * @param dashboardId - The id of the dashboard if present to allow dashboard specific menu items.\n *\n * @deprecated use {@link provideDashboardToolbarItems} to provide common toolbar items.\n * Additionally configure individual dashboard actions via {@link SiFlexibleDashboardComponent.primaryEditActions} and {@link SiFlexibleDashboardComponent.secondaryEditActions} respectively.\n */\n getToolbarMenuItems?: (dashboardId?: string) => {\n primary: Observable<(MenuItem | DashboardToolbarItem)[]>;\n secondary: Observable<(MenuItem | DashboardToolbarItem)[]>;\n };\n}\n\n/**\n * The {@link SiDefaultWidgetStorage} uses this key to persist the dashboard\n * configurations in the session of local storage.\n */\nexport const STORAGE_KEY = 'dashboard-store';\n\n/**\n * Injection token to optionally inject the {@link Storage} implementation\n * that will be used by the {@link SiDefaultWidgetStorage}. The default implementation\n * is {@link sessionStorage}.\n *\n * @example\n * The following shows how to provide the localStorage.\n * ```\n * providers: [..., { provide: DEFAULT_WIDGET_STORAGE_TOKEN, useValue: localStorage }]\n * ```\n *\n */\nexport const DEFAULT_WIDGET_STORAGE_TOKEN = new InjectionToken<Storage>(\n 'default storage for dashboard store'\n);\n\n/**\n * Default implementation of {@link SiWidgetStorage} that uses the\n * {@link Storage} implementation provided by the {@link DEFAULT_WIDGET_STORAGE_TOKEN}.\n * In general, it persists the dashboard's configurations in the Browser's session or local\n * storage. *\n */\nexport class SiDefaultWidgetStorage extends SiWidgetStorage {\n storage: Storage;\n\n private map = new Map<string, BehaviorSubject<WidgetConfig[]>>();\n private widgets?: BehaviorSubject<WidgetConfig[]>;\n\n constructor() {\n super();\n this.storage = inject(DEFAULT_WIDGET_STORAGE_TOKEN, { optional: true }) ?? sessionStorage;\n }\n\n load(dashboardId?: string): Observable<WidgetConfig[]> {\n if (!dashboardId) {\n this.widgets ??= new BehaviorSubject<WidgetConfig[]>(this.loadFromStorage());\n return this.widgets;\n } else if (!this.map.has(dashboardId)) {\n this.map.set(\n dashboardId,\n new BehaviorSubject<WidgetConfig[]>(this.loadFromStorage(dashboardId))\n );\n }\n return this.map.get(dashboardId)!;\n }\n\n save(\n modifiedWidgets: WidgetConfig[],\n addedWidgets: WidgetConfig[],\n removedWidgets?: WidgetConfig[],\n dashboardId?: string\n ): Observable<WidgetConfig[]> {\n const newWidgets = [...addedWidgets, ...modifiedWidgets];\n this.update(newWidgets, dashboardId);\n return of(newWidgets);\n }\n\n protected update(widgetConfigs: WidgetConfig[], dashboardId?: string): void {\n const widgets$ = this.load(dashboardId) as BehaviorSubject<WidgetConfig[]>;\n widgets$.next(widgetConfigs);\n if (!dashboardId) {\n this.storage.setItem(STORAGE_KEY, JSON.stringify(widgetConfigs));\n } else {\n this.storage.setItem(`${STORAGE_KEY}-${dashboardId}`, JSON.stringify(widgetConfigs));\n }\n }\n\n protected loadFromStorage(dashboardId?: string): WidgetConfig[] {\n let configStr;\n if (!dashboardId) {\n configStr = this.storage.getItem(STORAGE_KEY);\n } else {\n configStr = this.storage.getItem(`${STORAGE_KEY}-${dashboardId}`);\n }\n\n let widgetConfigs: WidgetConfig[] = [];\n if (configStr) {\n widgetConfigs = JSON.parse(configStr);\n }\n return widgetConfigs;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n output,\n viewChild\n} from '@angular/core';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport { elementEdit } from '@siemens/element-icons';\nimport { MenuItem } from '@spike-rabbit/element-ng/common';\nimport { SiContentActionBarComponent } from '@spike-rabbit/element-ng/content-action-bar';\nimport { addIcons, SiIconComponent } from '@spike-rabbit/element-ng/icon';\nimport { SiLinkDirective } from '@spike-rabbit/element-ng/link';\nimport { SiLoadingButtonComponent } from '@spike-rabbit/element-ng/loading-spinner';\nimport { SiResponsiveContainerDirective } from '@spike-rabbit/element-ng/resize-observer';\nimport { SiTooltipDirective } from '@spike-rabbit/element-ng/tooltip';\nimport { SiTranslatePipe, t } from '@spike-rabbit/element-translate-ng/translate';\n\nimport { DashboardToolbarItem } from '../../model/si-dashboard-toolbar.model';\nimport { SiGridComponent } from '../grid/si-grid.component';\n\n/**\n * The toolbar of the flexible dashboard is either `editable` or not. When not\n * `editable`, it supports content projection for applications to inject toolbar\n * controls for e.g. filtering. Use the attribute `filters-slot` to inject the filters.\n * In addition it shows the button to switch to the `editable`. When `editable`, it support\n * the cancel and save buttons, as well as displaying primary and secondary actions.\n */\n@Component({\n selector: 'si-dashboard-toolbar',\n imports: [\n SiContentActionBarComponent,\n SiLinkDirective,\n SiLoadingButtonComponent,\n SiIconComponent,\n RouterLink,\n SiResponsiveContainerDirective,\n SiTranslatePipe,\n SiTooltipDirective\n ],\n templateUrl: './si-dashboard-toolbar.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n class: 'd-flex flex-column flex-grow-1'\n }\n})\nexport class SiDashboardToolbarComponent {\n protected readonly icons = addIcons({ elementEdit });\n\n /**\n * Set primary actions that are in `editable` mode first visible or in\n * the expanded content action bar of the toolbar.\n *\n * @defaultValue []\n */\n readonly primaryEditActions = input<(MenuItem | DashboardToolbarItem)[]>([]);\n\n /**\n * Set secondary actions that are in `editable` mode second visible or in\n * the dropdown part of the content action bar of the toolbar.\n *\n * @defaultValue [] */\n readonly secondaryEditActions = input<(MenuItem | DashboardToolbarItem)[]>([]);\n\n /**\n * Input to disable the save button. Note, the input `disabled` disables all\n * actions and the save button of the toolbar.\n *\n * @defaultValue true\n */\n readonly disableSaveButton = model(true);\n\n /**\n * Input to disable all actions and buttons of the toolbar.\n *\n * @defaultValue false */\n readonly disabled = input(false);\n\n /**\n * Input option to set the `editable` mode. When editable\n * the toolbar shows a cancel and save button. Otherwise,\n * it displays an edit button.\n *\n * @defaultValue false */\n readonly editable = model(false);\n\n /**\n * Option to hide the dashboard edit button.\n *\n * @defaultValue false\n */\n readonly hideEditButton = input(false);\n\n /**\n * Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.\n *\n * @defaultValue false\n */\n readonly showEditButtonLabel = input(false);\n\n readonly grid = input.required<SiGridComponent>();\n\n /**\n * Emits on save button click.\n */\n readonly save = output<void>();\n\n protected labelEdit = t(() => $localize`:@@DASHBOARD.EDIT:Edit`);\n protected labelCancel = t(() => $localize`:@@DASHBOARD.CANCEL:Cancel`);\n protected labelSave = t(() => $localize`:@@DASHBOARD.SAVE:Save`);\n\n protected readonly activatedRoute = inject(ActivatedRoute, { optional: true });\n\n private readonly dashboardToolbarContainer = viewChild.required(SiResponsiveContainerDirective);\n\n protected readonly showContentActionBar = computed(\n () => this.primaryEditActions()?.length + this.secondaryEditActions()?.length > 3\n );\n\n protected readonly editActions = computed(() => [\n ...this.primaryEditActions(),\n ...this.secondaryEditActions()\n ]);\n\n protected readonly primaryEditActionsComputed = computed(() => {\n return this.primaryEditActions().map(item => this.proxyMenuItemAction(item));\n });\n\n protected readonly secondaryEditActionsComputed = computed(() => {\n return this.secondaryEditActions().map(item => this.proxyMenuItemAction(item));\n });\n\n protected onEdit(): void {\n this.editable.set(true);\n }\n\n protected onSave(): void {\n if (this.editable()) {\n this.save.emit();\n }\n }\n\n protected onCancel(): void {\n if (this.editable()) {\n this.editable.set(false);\n }\n }\n\n protected isToolbarItem(item: MenuItem | DashboardToolbarItem): item is DashboardToolbarItem {\n return 'label' in item;\n }\n\n protected readonly showEditButtonLabelDesktop = computed(() => {\n return this.showEditButtonLabel() && !this.dashboardToolbarContainer()?.xs();\n });\n\n private proxyMenuItemAction(\n item: MenuItem | DashboardToolbarItem\n ): MenuItem | DashboardToolbarItem {\n if (item.type === 'action' && typeof item.action === 'function') {\n item.action = item.action.bind(this, this.grid());\n }\n return item;\n }\n}\n","<div class=\"row mb-3\" siResponsiveContainer>\n <div class=\"col-12 d-flex justify-content-between\">\n @if (!editable()) {\n <ng-content select=\"[filters-slot]\" />\n @if (!hideEditButton()) {\n @let showEditButtonLabelDesktop = this.showEditButtonLabelDesktop();\n <button\n type=\"button\"\n class=\"btn ms-auto\"\n [class]=\"showEditButtonLabelDesktop ? 'btn-secondary' : 'btn-icon btn-tertiary'\"\n [attr.aria-label]=\"labelEdit | translate\"\n [siTooltip]=\"labelEdit\"\n [isDisabled]=\"showEditButtonLabelDesktop\"\n [disabled]=\"disabled()\"\n (click)=\"onEdit()\"\n >\n @if (showEditButtonLabelDesktop) {\n {{ labelEdit | translate }}\n } @else {\n <si-icon [icon]=\"icons.elementEdit\" />\n }\n </button>\n }\n } @else {\n @if (showContentActionBar()) {\n <si-content-action-bar\n toggleItemLabel=\"toggle\"\n viewType=\"expanded\"\n [disabled]=\"disabled()\"\n [primaryActions]=\"primaryEditActionsComputed()\"\n [secondaryActions]=\"secondaryEditActionsComputed()\"\n />\n } @else {\n <div>\n @for (action of editActions(); track $index) {\n @if (isToolbarItem(action)) {\n @if (disabled()) {\n <!-- Links do not support disabled, so we need to render a button instead in this case. -->\n <button type=\"button\" class=\"btn btn-secondary me-4\" disabled>\n {{ action.label! | translate }}\n </button>\n } @else {\n @switch (action.type) {\n @case ('action') {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n (click)=\"action.action(grid())\"\n >\n {{ action.label! | translate }}\n </button>\n }\n @case ('router-link') {\n <a\n class=\"btn btn-secondary me-4\"\n [routerLink]=\"action.routerLink\"\n [queryParams]=\"action.extras?.queryParams\"\n [queryParamsHandling]=\"action.extras?.queryParamsHandling\"\n [fragment]=\"action.extras?.fragment\"\n [state]=\"action.extras?.state\"\n [relativeTo]=\"action.extras?.relativeTo ?? activatedRoute\"\n [preserveFragment]=\"action.extras?.preserveFragment\"\n [skipLocationChange]=\"action.extras?.skipLocationChange\"\n [replaceUrl]=\"action.extras?.replaceUrl\"\n >\n {{ action.label! | translate }}\n </a>\n }\n @case ('link') {\n <a class=\"btn btn-secondary me-4\" [href]=\"action.href\" [target]=\"action.target\">\n {{ action.label! | translate }}\n </a>\n }\n }\n }\n } @else {\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n [siLink]=\"action\"\n >\n {{ action.title! | translate }}\n </button>\n }\n }\n </div>\n }\n <div>\n <button\n type=\"button\"\n class=\"btn btn-secondary me-4\"\n [disabled]=\"disabled()\"\n (click)=\"onCancel()\"\n >\n {{ labelCancel | translate }}\n </button>\n <si-loading-button\n class=\"align-top\"\n buttonClass=\"btn btn-primary\"\n [disabled]=\"disableSaveButton()\"\n [loading]=\"disabled()\"\n (click)=\"onSave()\"\n >\n {{ labelSave | translate }}\n </si-loading-button>\n </div>\n }\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, Injectable, InjectionToken } from '@angular/core';\n\nimport type { WidgetConfig } from './widgets.model';\n\n/**\n * Injection token to optionally inject the {@link SiWidgetIdProvider} implementation\n * to provide custom widget id generation logic. The default implementation\n * is {@link SiWidgetDefaultIdProvider}.\n *\n * * @example\n * The following shows how to provide your own widget id provider.\n * ```\n * providers: [..., { provide: SI_WIDGET_ID_PROVIDER, useClass: CustomWidgetIdProvider }]\n * ```\n *\n */\nexport const SI_WIDGET_ID_PROVIDER = new InjectionToken<SiWidgetIdProvider>(\n 'Injection token to configure your widget id provider.',\n { providedIn: 'root', factory: () => inject(SiWidgetDefaultIdProvider) }\n);\n\n/**\n * Abstract class to provide widget id generation logic.\n */\nexport abstract class SiWidgetIdProvider {\n /**\n * Generates a transient widget id for newly added widgets in edit mode.\n *\n * @param widget - The widget instance config without any id.\n * @param dashboardId - The id of the dashboard where the widget is added.\n * @returns A transient widget id as a string.\n */\n abstract generateWidgetId(widget: Omit<WidgetConfig, 'id'>, dashboardId?: string): string;\n}\n\n/**\n * The default implementation of the {@link SiWidgetIdProvider} which\n * generates random widget ids.\n */\n@Injectable({ providedIn: 'root' })\nexport class SiWidgetDefaultIdProvider extends SiWidgetIdProvider {\n /**\n * Generates a unique widget id.\n *\n * The method uses `crypto.randomUUID()` which generates a RFC4122 version 4 UUID\n * (a cryptographically secure random identifier with 122 bits of entropy).\n *\n * @param widget - The widget instance config without any id.\n * @param dashboardId - The id of the dashboard where the widget is added.\n * @returns A unique widget id string in the format `crypto.randomUUID()`.\n */\n override generateWidgetId(widget: Omit<WidgetConfig, 'id'>, dashboardId?: string): string {\n return crypto.randomUUID();\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n ElementRef,\n inject,\n Renderer2,\n DOCUMENT,\n Directive,\n input,\n viewChild,\n SimpleChanges,\n OnChanges\n} from '@angular/core';\n\nimport { WidgetConfig, WidgetInstance, WidgetInstanceEditor } from '../../model/widgets.model';\n\n@Directive()\nexport abstract class SiWebComponentWrapperBaseComponent<\n T extends WidgetInstance | WidgetInstanceEditor\n>\n implements AfterViewInit, OnChanges\n{\n readonly config =\n input.required<\n T extends WidgetInstance ? WidgetConfig : WidgetConfig | Omit<WidgetConfig, 'id'>\n >();\n\n readonly elementTagName = input.required<string>();\n readonly url = input.required<string>();\n\n protected readonly webComponentHost = viewChild.required('webComponentHost', {\n read: ElementRef\n });\n\n protected webComponent?: HTMLElement & T;\n\n private renderer2 = inject(Renderer2);\n private document = inject(DOCUMENT);\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.config && this.webComponent) {\n this.webComponent.config = this.config();\n }\n }\n\n ngAfterViewInit(): void {\n if (!this.isScriptLoaded(this.url())) {\n const script = this.renderer2.createElement('script');\n script.src = this.url();\n this.renderer2.appendChild(this.document.body, script);\n }\n\n this.webComponent = this.renderer2.createElement(this.elementTagName());\n if (this.webComponent) {\n this.webComponent.config = this.config();\n }\n }\n\n private isScriptLoaded(url: string): boolean {\n const script = document.querySelector(`script[src='${url}']`);\n return script ? true : false;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { AfterViewInit, ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport {\n WidgetConfig,\n WidgetConfigStatus,\n WidgetInstanceEditor,\n WidgetInstanceEditorWizard,\n WidgetInstanceEditorWizardState\n} from '../../model/widgets.model';\nimport { SiWebComponentWrapperBaseComponent } from './si-web-component-wrapper-base.component';\n\n@Component({\n selector: 'si-web-component-editor-wrapper',\n templateUrl: './si-web-component-wrapper.component.html',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiWebComponentEditorWrapperComponent\n extends SiWebComponentWrapperBaseComponent<WidgetInstanceEditor>\n implements WidgetInstanceEditor, WidgetInstanceEditorWizard, AfterViewInit, OnDestroy\n{\n state!: WidgetInstanceEditorWizardState;\n stateChange = new Subject<WidgetInstanceEditorWizardState>();\n configChange = new Subject<WidgetConfig | Omit<WidgetConfig, 'id'>>();\n\n /**\n * This will be set when setupWidgetInstanceEditor is executed\n */\n statusChangesHandler?: (statusChanges: Partial<WidgetConfigStatus>) => void;\n\n private webComponentEventListener = (event: CustomEventInit<WidgetConfig>): void =>\n event.detail && this.configChange.next(event.detail);\n\n private webComponentStateChangeListener = (\n event: CustomEventInit<WidgetInstanceEditorWizardState>\n ): void => {\n if (event.detail) {\n this.state = event.detail;\n this.stateChange.next(event.detail);\n }\n };\n private webComponentStatusChangesListener = (\n event: CustomEventInit<Partial<WidgetConfigStatus>>\n ): void => {\n if (event.detail) {\n this.statusChangesHandler?.(event.detail);\n }\n };\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.webComponent?.addEventListener('stateChange', this.webComponentStateChangeListener);\n this.webComponent?.addEventListener('statusChanges', this.webComponentStatusChangesListener);\n this.webComponent?.addEventListener('configChange', this.webComponentEventListener);\n this.webComponentHost().nativeElement.appendChild(this.webComponent);\n }\n\n ngOnDestroy(): void {\n this.webComponent?.removeEventListener('stateChange', this.webComponentStateChangeListener);\n this.webComponent?.removeEventListener('statusChanges', this.webComponentStatusChangesListener);\n this.webComponent?.removeEventListener('configChange', this.webComponentEventListener);\n }\n\n next(): void {\n this.webComponent?.dispatchEvent(new CustomEvent('next'));\n }\n\n previous(): void {\n this.webComponent?.dispatchEvent(new CustomEvent('previous'));\n }\n}\n","<div #webComponentHost class=\"h-100\"></div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n OnDestroy\n} from '@angular/core';\nimport { MenuItem as MenuItemLegacy } from '@spike-rabbit/element-ng/common';\nimport { ContentActionBarMainItem } from '@spike-rabbit/element-ng/content-action-bar';\nimport { MenuItem } from '@spike-rabbit/element-ng/menu';\n\nimport { WidgetConfigEvent, WidgetInstance } from '../../model/widgets.model';\nimport { SiWebComponentWrapperBaseComponent } from './si-web-component-wrapper-base.component';\n\n@Component({\n selector: 'si-web-component-wrapper',\n templateUrl: './si-web-component-wrapper.component.html',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiWebComponentWrapperComponent\n extends SiWebComponentWrapperBaseComponent<WidgetInstance>\n implements WidgetInstance, AfterViewInit, OnDestroy\n{\n private _editable?: boolean;\n get editable(): boolean {\n return this._editable ?? false;\n }\n\n set editable(editable: boolean) {\n this._editable = editable;\n if (this.webComponent) {\n this.webComponent.editable = editable;\n }\n }\n\n primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n secondaryActions?: (MenuItemLegacy | MenuItem)[];\n primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n secondaryEditActions?: (MenuItemLegacy | MenuItem)[];\n\n configChange = new EventEmitter<WidgetConfigEvent>();\n\n private webComponentEventListener = (event: CustomEventInit<WidgetConfigEvent>): void =>\n event.detail && this.configChanged(event.detail);\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.webComponent?.addEventListener('configChange', this.webComponentEventListener);\n this.webComponentHost().nativeElement.appendChild(this.webComponent);\n }\n\n ngOnDestroy(): void {\n this.webComponent?.removeEventListener('configChange', this.webComponentEventListener);\n }\n\n private configChanged(event: WidgetConfigEvent): void {\n this.primaryActions = event.primaryActions ?? this.primaryActions;\n this.secondaryActions = event.secondaryActions ?? this.secondaryActions;\n this.primaryEditActions = event.primaryEditActions ?? this.primaryEditActions;\n this.secondaryEditActions = event.secondaryEditActions ?? this.secondaryEditActions;\n this.configChange.emit(event);\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n ComponentRef,\n createNgModule,\n EnvironmentInjector,\n Injector,\n ViewContainerRef\n} from '@angular/core';\nimport { Observable, ReplaySubject, Subject, throwError } from 'rxjs';\n\nimport { SiWebComponentEditorWrapperComponent } from './components/web-component-wrapper/si-web-component-editor-wrapper.component';\nimport { SiWebComponentWrapperComponent } from './components/web-component-wrapper/si-web-component-wrapper.component';\nimport {\n FederatedBridgeModule,\n FederatedModule,\n WebComponent,\n WidgetComponentFactory,\n WidgetComponentTypeFactory,\n WidgetInstance,\n WidgetInstanceEditor\n} from './model/widgets.model';\n\ntype WidgetFactoryType = FederatedModule['factoryType'] | FederatedBridgeModule['factoryType'];\n\nexport type SetupComponentFn = <T>(\n factory: WidgetComponentFactory,\n componentName: string,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n) => Observable<ComponentRef<T>>;\n\n/** @internal */\nexport const widgetFactoryRegistry = {\n _factories: {} as { [key in WidgetFactoryType]?: SetupComponentFn },\n\n register(name: WidgetFactoryType, factoryFn: SetupComponentFn) {\n this._factories[name] = factoryFn;\n },\n\n getFactoryFn(name: WidgetFactoryType) {\n return this._factories[name];\n },\n\n hasFactoryFn(name: WidgetFactoryType) {\n return this._factories[name] !== undefined;\n }\n};\n\nexport const setupWidgetInstance = (\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n): Observable<ComponentRef<WidgetInstance>> =>\n setupComponent(\n widgetComponentFactory,\n host,\n injector,\n envInjector,\n 'componentName'\n ) as Observable<ComponentRef<WidgetInstance>>;\n\nexport const setupWidgetEditor = (\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n): Observable<ComponentRef<WidgetInstanceEditor>> =>\n setupComponent(\n widgetComponentFactory,\n host,\n injector,\n envInjector,\n 'editorComponentName'\n ) as Observable<ComponentRef<WidgetInstanceEditor>>;\n\nconst setupComponent = (\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector,\n componentName: 'componentName' | 'editorComponentName'\n): Observable<ComponentRef<WidgetInstance>> | Observable<ComponentRef<WidgetInstanceEditor>> => {\n if (!widgetComponentFactory.factoryType || widgetComponentFactory.factoryType === 'default') {\n return loadAndAttachComponent<WidgetInstance>(\n widgetComponentFactory as WidgetComponentTypeFactory,\n componentName,\n host,\n injector,\n envInjector\n );\n } else if (widgetComponentFactory.factoryType === 'web-component') {\n return loadAndAttachWebComponentWrapper(widgetComponentFactory, componentName, host);\n } else if (widgetFactoryRegistry.hasFactoryFn(widgetComponentFactory.factoryType)) {\n const setupFn = widgetFactoryRegistry.getFactoryFn(widgetComponentFactory.factoryType);\n return setupFn!<WidgetInstance>(\n widgetComponentFactory as any,\n componentName,\n host,\n injector,\n envInjector\n );\n } else {\n return throwError(\n () => new Error(`Unknown widget factory type ${widgetComponentFactory.factoryType}.`)\n );\n }\n};\n\nconst loadModuleBasedComponent = <T>(\n factory: WidgetComponentTypeFactory,\n componentName: 'componentName' | 'editorComponentName',\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector,\n result: Subject<ComponentRef<T>>\n): void => {\n const loader = factory.moduleLoader!;\n const componentKey = factory[componentName]!;\n\n loader(componentKey).then(\n moduleExports => {\n const ngModuleRef = createNgModule(moduleExports[factory.moduleName!], envInjector);\n const componentType = moduleExports[componentKey];\n const widgetInstanceRef = host.createComponent<T>(componentType, { injector, ngModuleRef });\n result.next(widgetInstanceRef);\n result.complete();\n },\n rejection => {\n const errorMsg = `Loading widget module ${factory.moduleName} failed`;\n const msg = rejection ? `${errorMsg} with ${JSON.stringify(rejection.toString())}` : errorMsg;\n result.error(msg);\n result.complete();\n }\n );\n};\n\nconst loadStandaloneComponent = <T>(\n factory: WidgetComponentTypeFactory,\n componentName: 'componentName' | 'editorComponentName',\n host: ViewContainerRef,\n injector: Injector,\n result: Subject<ComponentRef<T>>\n): void => {\n const loader = factory.componentLoader!;\n const componentKey = factory[componentName]!;\n\n loader<T>(componentKey).then(\n componentType => {\n const widgetInstanceRef = host.createComponent<T>(componentType, { injector });\n result.next(widgetInstanceRef);\n result.complete();\n },\n rejection => {\n const errorMsg = `Loading widget component ${componentKey} failed`;\n const msg = rejection ? `${errorMsg} with ${JSON.stringify(rejection.toString())}` : errorMsg;\n result.error(msg);\n result.complete();\n }\n );\n};\n\nconst loadAndAttachComponent = <T>(\n factory: WidgetComponentTypeFactory,\n componentName: 'componentName' | 'editorComponentName',\n host: ViewContainerRef,\n injector: Injector,\n envInjector: EnvironmentInjector\n): Observable<ComponentRef<T>> => {\n const result = new Subject<ComponentRef<T>>();\n\n if (!factory[componentName]) {\n result.error(`Provided component factory has no ${componentName} component configuration`);\n return result;\n }\n\n if (factory.moduleName) {\n loadModuleBasedComponent(factory, componentName, host, injector, envInjector, result);\n } else if (factory.componentLoader) {\n loadStandaloneComponent(factory, componentName, host, injector, result);\n } else {\n result.error('Invalid factory configuration: missing moduleLoader or componentLoader');\n }\n return result;\n};\n\nconst loadAndAttachWebComponentWrapper = (\n factory: WebComponent,\n componentName: 'componentName' | 'editorComponentName',\n host: ViewContainerRef\n): Observable<ComponentRef<WidgetInstance>> => {\n const result = new ReplaySubject<ComponentRef<any>>();\n if (factory[componentName]) {\n let widgetInstanceRef: ComponentRef<\n SiWebComponentWrapperComponent | SiWebComponentEditorWrapperComponent\n >;\n if (componentName === 'componentName') {\n widgetInstanceRef = host.createComponent(SiWebComponentWrapperComponent);\n } else {\n widgetInstanceRef = host.createComponent(SiWebComponentEditorWrapperComponent);\n }\n widgetInstanceRef.setInput('elementTagName', factory[componentName]);\n widgetInstanceRef.setInput('url', factory.url);\n result.next(widgetInstanceRef);\n result.complete();\n } else {\n result.error(`Provided component factory has no ${componentName} component configuration`);\n }\n return result;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DestroyRef,\n ElementRef,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n isSignal,\n OnChanges,\n OnInit,\n output,\n signal,\n SimpleChanges,\n TemplateRef,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { SiActionDialogService } from '@spike-rabbit/element-ng/action-modal';\n// We need one import from the main entry.\n// Otherwise, module federation is confused.\n// I don't know why.\nimport type { MenuItem as MenuItemLegacy } from '@spike-rabbit/element-ng/common';\nimport { ContentActionBarMainItem, ViewType } from '@spike-rabbit/element-ng/content-action-bar';\nimport { SiDashboardCardComponent } from '@spike-rabbit/element-ng/dashboard';\nimport { MenuItem } from '@spike-rabbit/element-ng/menu';\nimport {\n injectSiTranslateService,\n SiTranslatePipe,\n t\n} from '@spike-rabbit/element-translate-ng/translate';\nimport { GridStack, GridItemHTMLElement, GridStackNode } from 'gridstack';\nimport { first } from 'rxjs';\n\nimport {\n WidgetComponentFactory,\n WidgetConfig,\n WidgetConfigEvent,\n WidgetInstance\n} from '../../model/widgets.model';\nimport { setupWidgetInstance } from '../../widget-loader';\n\n@Component({\n selector: 'si-widget-host',\n imports: [SiDashboardCardComponent, NgTemplateOutlet, SiTranslatePipe],\n templateUrl: './si-widget-host.component.html',\n styleUrl: './si-widget-host.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'grid-stack-item',\n // In non-edit mode, expose each widget as a labeled list item so screen\n // readers group the widgets and let users jump between them. In edit mode\n // the inner card carries the interactive `application` role instead.\n '[attr.role]': \"editable() ? null : 'listitem'\",\n '[attr.aria-roledescription]': \"editable() ? null : 'widget'\",\n '[attr.aria-label]': 'editable() || !widgetAriaLabel() ? null : widgetAriaLabel()'\n }\n})\nexport class SiWidgetHostComponent implements OnInit, OnChanges {\n private readonly siModal = inject(SiActionDialogService);\n private readonly injector = inject(Injector);\n private readonly envInjector = inject(EnvironmentInjector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly translateService = injectSiTranslateService();\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n /** @internal */\n readonly elementRef = inject<ElementRef<GridItemHTMLElement>>(ElementRef).nativeElement;\n\n /** @defaultValue false */\n readonly keyboardActive = signal(false);\n\n readonly widgetConfig = input.required<WidgetConfig>();\n readonly grid = input<GridStack>();\n\n /**\n * The component factory for this widget's type.\n */\n readonly componentFactory = input<WidgetComponentFactory>();\n\n /**\n * Sets the widget host into editable mode.\n *\n * @defaultValue false\n */\n readonly editable = input(false);\n\n readonly remove = output<string>();\n readonly edit = output<WidgetConfig>();\n readonly gridEvent = output<Event>();\n\n readonly card = viewChild.required<SiDashboardCardComponent>('card');\n\n readonly widgetHost = viewChild.required('widgetHost', { read: ViewContainerRef });\n\n protected labelEdit = t(() => $localize`:@@DASHBOARD.WIDGET.EDIT:Edit`);\n protected labelRemove = t(() => $localize`:@@DASHBOARD.WIDGET.REMOVE:Remove`);\n protected labelExpand = t(() => $localize`:@@DASHBOARD.WIDGET.EXPAND:Expand`);\n protected labelRestore = t(() => $localize`:@@DASHBOARD.WIDGET.RESTORE:Restore`);\n protected labelDialogMessage = t(\n () =>\n $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.MESSAGE:Do you really want to remove the widget?`\n );\n protected labelDialogHeading = t(\n () => $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.HEADING:Remove widget`\n );\n protected labelDialogRemove = t(\n () => $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.REMOVE:Remove`\n );\n protected labelDialogCancel = t(\n () => $localize`:@@DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.CANCEL:Cancel`\n );\n private a11yWidgetMovedMessage = t(\n () => $localize`:@@DASHBOARD.WIDGET.A11Y.MOVED:Widget moved to column {{column}}, row {{row}}.`\n );\n private a11yWidgetResizedMessage = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET.A11Y.RESIZED:Widget resized to {{columns}} columns wide, {{rows}} rows tall.`\n );\n private a11yWidgetActivatedMessage = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET.A11Y.ACTIVATED:Widget activated. Use arrow keys to move, Shift+arrow keys to resize, Escape to exit.`\n );\n private a11yWidgetDeactivatedMessage = t(\n () => $localize`:@@DASHBOARD.WIDGET.A11Y.DEACTIVATED:Widget deactivated.`\n );\n protected a11yWidgetDescription = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET.A11Y.DESCRIPTION:Press Enter or Space to activate. Then use arrow keys to move, Shift+arrow keys to resize, Escape to exit.`\n );\n protected readonly widgetAriaLabel = computed(() => {\n const widgetHeading = this.widgetConfig().heading;\n if (widgetHeading) {\n return this.translateService.translateSync(widgetHeading);\n }\n return null;\n });\n\n widgetInstance?: WidgetInstance;\n widgetRef?: ComponentRef<WidgetInstance>;\n /** @defaultValue [] */\n protected readonly primaryActions = signal<(MenuItemLegacy | ContentActionBarMainItem)[]>([]);\n /** @defaultValue [] */\n protected readonly secondaryActions = signal<(MenuItemLegacy | MenuItem)[]>([]);\n /** @defaultValue 'expanded' */\n protected readonly actionBarViewType = signal<ViewType>('expanded');\n /** @defaultValue [] */\n private readonly editablePrimaryActions = signal<(MenuItemLegacy | ContentActionBarMainItem)[]>(\n []\n );\n /** @defaultValue [] */\n private readonly editableSecondaryActions = signal<(MenuItemLegacy | MenuItem)[]>([]);\n\n /**\n * @defaultValue\n * ```\n * {\n * type: 'action',\n * label: this.labelEdit,\n * icon: 'element-edit',\n * iconOnly: true,\n * action: () => this.onEdit()\n * }\n * ```\n */\n private readonly editAction: ContentActionBarMainItem = {\n type: 'action',\n label: this.labelEdit,\n icon: 'element-edit',\n iconOnly: true,\n action: () => this.onEdit()\n };\n /**\n * @defaultValue\n * ```\n * {\n * type: 'action',\n * label: this.labelRemove,\n * icon: 'element-delete',\n * iconOnly: true,\n * action: () => this.onRemove()\n * }\n * ```\n */\n removeAction: ContentActionBarMainItem = {\n type: 'action',\n label: this.labelRemove,\n icon: 'element-delete',\n iconOnly: true,\n action: () => this.onRemove()\n };\n protected readonly widgetInstanceFooter = signal<TemplateRef<unknown> | undefined>(undefined);\n\n protected readonly accentLine = computed(() => {\n const { accentLine } = this.widgetConfig();\n return accentLine ? 'accent-' + accentLine : '';\n });\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.widgetConfig) {\n const options = {\n ...this.widgetConfig(),\n w: this.widgetConfig().width,\n h: this.widgetConfig().height,\n x: this.widgetConfig().x,\n y: this.widgetConfig().y,\n minW: this.widgetConfig().minWidth,\n minH: this.widgetConfig().minHeight\n };\n if (!changes.widgetConfig.firstChange) {\n this.grid()?.update(this.elementRef, options);\n } else {\n this.grid()?.makeWidget(this.elementRef, options);\n }\n if (this.widgetRef) {\n if (isSignal(this.widgetRef.instance.config)) {\n this.widgetRef.setInput('config', this.widgetConfig());\n } else {\n this.widgetRef.instance.config = this.widgetConfig();\n }\n }\n }\n\n if (changes.editable && !changes.editable.firstChange) {\n this.setupEditable(this.editable());\n }\n }\n\n ngOnInit(): void {\n this.attachWidgetInstance();\n }\n\n protected onToggleActive(event: Event): void {\n if (!this.editable() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n const active = !this.keyboardActive();\n this.keyboardActive.set(active);\n this.announceTranslated(\n active ? this.a11yWidgetActivatedMessage : this.a11yWidgetDeactivatedMessage,\n {}\n );\n }\n\n protected onDeactivate(event: Event): void {\n if (!this.keyboardActive()) {\n return;\n }\n event.preventDefault();\n this.keyboardActive.set(false);\n this.announceTranslated(this.a11yWidgetDeactivatedMessage, {});\n }\n\n protected onFocusOut(): void {\n if (this.keyboardActive()) {\n this.keyboardActive.set(false);\n }\n }\n\n protected onArrowKey(event: Event): void {\n if (!this.keyboardActive()) {\n return;\n }\n\n const el = this.elementRef;\n const node = el?.gridstackNode;\n if (!node?.grid) {\n return;\n }\n\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.shiftKey) {\n this.handleResize(keyEvent, node);\n } else {\n this.handleMove(keyEvent, node);\n }\n }\n\n private handleResize(event: KeyboardEvent, node: GridStackNode): void {\n const el = this.elementRef;\n let { w, h } = node;\n switch (event.key) {\n case 'ArrowRight':\n w = (w ?? 1) + 1;\n break;\n case 'ArrowLeft':\n w = Math.max(node.minW ?? 1, (w ?? 1) - 1);\n break;\n case 'ArrowDown':\n h = (h ?? 1) + 1;\n break;\n case 'ArrowUp':\n h = Math.max(node.minH ?? 1, (h ?? 1) - 1);\n break;\n default:\n return;\n }\n if (w === node.w && h === node.h) {\n return;\n }\n event.preventDefault();\n const grid = node.grid;\n grid!.update(el, { w, h });\n this.gridEvent.emit(new Event('resizestop'));\n this.announceTranslated(this.a11yWidgetResizedMessage, { columns: w, rows: h });\n }\n\n private handleMove(event: KeyboardEvent, node: GridStackNode): void {\n const el = this.elementRef;\n const { x, y } = node;\n const grid = node.grid;\n let newX = x ?? 0;\n let newY = y ?? 0;\n\n switch (event.key) {\n case 'ArrowRight':\n do {\n newX++;\n grid!.update(el, { x: newX, y });\n } while (node.x === x && newX < grid!.getColumn());\n break;\n case 'ArrowLeft':\n if (newX <= 0) {\n break;\n }\n do {\n newX--;\n grid!.update(el, { x: newX, y });\n } while (node.x === x && newX > 0);\n break;\n case 'ArrowDown':\n do {\n newY++;\n grid!.update(el, { x, y: newY });\n } while (node.y === y && newY < grid!.getRow());\n break;\n case 'ArrowUp':\n if (newY <= 0) {\n break;\n }\n do {\n newY--;\n grid!.update(el, { x, y: newY });\n } while (node.y === y && newY > 0);\n break;\n default:\n return;\n }\n event.preventDefault();\n this.gridEvent.emit(new Event('dragstop'));\n this.scrollIntoViewAfterTransition(el);\n this.announceTranslated(this.a11yWidgetMovedMessage, {\n column: (node.x ?? 0) + 1,\n row: (node.y ?? 0) + 1\n });\n }\n\n private scrollIntoViewAfterTransition(el: HTMLElement): void {\n const onEnd = (): void => {\n el.removeEventListener('transitionend', onEnd);\n el.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n };\n el.addEventListener('transitionend', onEnd, { once: true });\n }\n\n private announce(message: string): void {\n this.liveAnnouncer.announce(message, 'assertive');\n }\n\n private announceTranslated(message: string, params: Record<string, unknown>): void {\n this.translateService\n .translateAsync(message, params)\n .pipe(first())\n .subscribe(msg => this.announce(msg));\n }\n\n private attachWidgetInstance(): void {\n const componentFactory = this.componentFactory();\n if (componentFactory) {\n setupWidgetInstance(\n componentFactory,\n this.widgetHost(),\n this.injector,\n this.envInjector\n ).subscribe({\n next: (widgetRef: ComponentRef<WidgetInstance>) => {\n this.widgetInstance = widgetRef.instance;\n this.widgetRef = widgetRef;\n if (this.widgetInstance.configChange) {\n // Note: setTimeout is needed to prevent ExpressionChangedAfterItHasBeenCheckedError\n // on web component, who pushes their configuration through an event after being attached\n // to the DOM.\n this.widgetInstance.configChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => setTimeout(() => this.setupEditable(this.editable(), event)));\n }\n if (isSignal(this.widgetInstance.config)) {\n this.widgetRef.setInput('config', this.widgetConfig());\n } else {\n this.widgetInstance.config = this.widgetConfig();\n }\n this.widgetInstanceFooter.set(this.widgetInstance.footer);\n this.setupEditable(this.editable());\n },\n error: error => console.error('Error: ', error)\n });\n } else {\n console.error(`Cannot find widget with id ${this.widgetConfig().widgetId}`);\n }\n }\n\n setupEditable(editable: boolean, widgetConfig?: WidgetConfigEvent): void {\n if (!editable) {\n this.keyboardActive.set(false);\n }\n widgetConfig ??= {\n primaryActions: this.widgetInstance?.primaryActions,\n secondaryActions: this.widgetInstance?.secondaryActions,\n primaryEditActions: this.widgetInstance?.primaryEditActions,\n secondaryEditActions: this.widgetInstance?.secondaryEditActions\n };\n if (editable) {\n this.editablePrimaryActions.set([]);\n if (this.isEditable()) {\n this.editablePrimaryActions.set([...this.editablePrimaryActions(), this.editAction]);\n }\n if (!this.widgetConfig().isNotRemovable) {\n this.editablePrimaryActions.set([...this.editablePrimaryActions(), this.removeAction]);\n }\n if (widgetConfig.primaryEditActions) {\n this.primaryActions.set([\n ...widgetConfig.primaryEditActions,\n ...this.editablePrimaryActions()\n ]);\n } else {\n this.primaryActions.set(this.editablePrimaryActions());\n }\n if (widgetConfig.secondaryEditActions) {\n this.secondaryActions.set([\n ...widgetConfig.secondaryEditActions,\n ...this.editableSecondaryActions()\n ]);\n } else {\n this.secondaryActions.set(this.editableSecondaryActions());\n }\n this.actionBarViewType.set('expanded');\n } else {\n this.actionBarViewType.set(this.widgetConfig().actionBarViewType ?? 'expanded');\n this.primaryActions.set(widgetConfig.primaryActions ?? []);\n this.secondaryActions.set(widgetConfig.secondaryActions ?? []);\n }\n\n if (this.widgetInstance?.editable !== undefined) {\n if (isSignal(this.widgetInstance.editable)) {\n this.widgetRef?.setInput('editable', editable);\n } else {\n this.widgetInstance.editable = editable;\n }\n }\n }\n\n private doRemove(): void {\n const card = this.card();\n if (card.isExpanded()) {\n card.restore();\n }\n const widgetConfig = this.widgetConfig();\n if (widgetConfig.id) {\n this.remove.emit(widgetConfig.id);\n }\n }\n\n private isEditable(): boolean {\n const widgetConfig = this.widgetConfig();\n return !widgetConfig.immutable && !!this.componentFactory()?.editorComponentName;\n }\n\n onEdit(): void {\n this.edit.emit(this.widgetConfig());\n }\n\n onRemove(): void {\n this.siModal\n .showActionDialog({\n type: 'delete-confirm',\n message: this.labelDialogMessage,\n heading: this.labelDialogHeading,\n deleteBtnName: this.labelDialogRemove,\n cancelBtnName: this.labelDialogCancel\n })\n .subscribe(result => {\n if (result === 'delete') {\n this.doRemove();\n }\n });\n }\n}\n","<div class=\"grid-stack-item-content p-4\">\n @if (editable()) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine()\"\n [class.elevation-2]=\"keyboardActive()\"\n [class.si-widget-keyboard-active]=\"keyboardActive()\"\n [attr.tabindex]=\"editable() ? 0 : null\"\n [attr.role]=\"editable() ? 'application' : null\"\n [attr.aria-roledescription]=\"editable() ? 'widget' : null\"\n [attr.aria-label]=\"editable() ? widgetConfig().heading : null\"\n [attr.aria-description]=\"editable() ? (a11yWidgetDescription | translate) : null\"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionBarViewType]=\"actionBarViewType()\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"widgetConfig().image?.src\"\n (keydown.enter)=\"onToggleActive($event)\"\n (keydown.space)=\"onToggleActive($event)\"\n (keydown.escape)=\"onDeactivate($event)\"\n (keydown.arrowRight)=\"onArrowKey($event)\"\n (keydown.arrowLeft)=\"onArrowKey($event)\"\n (keydown.arrowUp)=\"onArrowKey($event)\"\n (keydown.arrowDown)=\"onArrowKey($event)\"\n (keydown.shift.arrowRight)=\"onArrowKey($event)\"\n (keydown.shift.arrowLeft)=\"onArrowKey($event)\"\n (keydown.shift.arrowUp)=\"onArrowKey($event)\"\n (keydown.shift.arrowDown)=\"onArrowKey($event)\"\n (focusout)=\"onFocusOut()\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n @let footer = widgetInstanceFooter();\n @if (footer) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"footer\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n afterNextRender,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n Injector,\n input,\n NgZone,\n OnChanges,\n OnInit,\n output,\n PLATFORM_ID,\n SimpleChanges,\n viewChildren\n} from '@angular/core';\nimport { SiTranslatePipe, t } from '@spike-rabbit/element-translate-ng/translate';\nimport { GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions } from 'gridstack';\n\nimport { DEFAULT_GRIDSTACK_OPTIONS, GridConfig } from '../../model/gridstack.model';\nimport {\n WidgetComponentFactory,\n WidgetConfig,\n WidgetPositionConfig\n} from '../../model/widgets.model';\nimport { SiWidgetHostComponent } from '../widget-host/si-widget-host.component';\n\nexport interface GridWrapperEvent {\n event: Event;\n items?: GridStackNode[];\n grid: GridStack;\n el?: GridItemHTMLElement;\n}\n\n@Component({\n selector: 'si-gridstack-wrapper',\n imports: [SiWidgetHostComponent, SiTranslatePipe],\n templateUrl: './si-gridstack-wrapper.component.html',\n styleUrl: './si-gridstack-wrapper.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiGridstackWrapperComponent implements OnInit, OnChanges {\n /**\n * Grid items to render inside the gridstack\n *\n * @defaultValue []\n */\n readonly widgetConfigs = input<WidgetConfig[]>([]);\n\n /**\n * Whenever gridstack allows to drag, resize or delete the grid item\n *\n * @defaultValue false\n */\n readonly editable = input(false);\n\n /**\n * Module configuration\n */\n readonly gridConfig = input<GridConfig>();\n\n /**\n * Map of widget id to widget definition, passed through to widget hosts.\n *\n * @defaultValue new Map()\n */\n readonly widgetCatalogMap = input<Map<string, { componentFactory: WidgetComponentFactory }>>(\n new Map()\n );\n\n /**\n * Emits dashboard grid events.\n */\n readonly gridEvent = output<GridWrapperEvent>();\n /**\n * Emits the id of a widget instance that shall be removed.\n */\n readonly widgetInstanceRemove = output<string>();\n\n /**\n * Emits the id of a widget instance that shall be edited.\n */\n readonly widgetInstanceEdit = output<WidgetConfig>();\n\n private readonly widgetHosts = viewChildren(SiWidgetHostComponent);\n private readonly widgetHostsMap = computed(\n () => new Map(this.widgetHosts().map(host => [host.widgetConfig().id, host]))\n );\n protected readonly a11yWidgetsListLabel = t(\n () => $localize`:@@DASHBOARD.A11Y.WIDGETS_LIST:Dashboard widgets`\n );\n\n protected grid?: GridStack;\n\n private readonly ngZone = inject(NgZone);\n private readonly elementRef = inject(ElementRef);\n private readonly injector = inject(Injector);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n private readonly destroyRef = inject(DestroyRef);\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.widgetConfigs && !changes.widgetConfigs.firstChange) {\n const configs = changes.widgetConfigs.currentValue;\n const newIds = new Set(configs.map(w => w.id));\n const hostMap = this.widgetHostsMap();\n\n const hasAdds = configs.some(w => !hostMap.has(w.id));\n\n if (hasAdds) {\n this.startBatch();\n }\n\n if (this.isBrowser) {\n for (const [id, host] of hostMap) {\n if (!newIds.has(id)) {\n this.grid?.removeWidget(host.elementRef);\n }\n }\n }\n }\n\n if (changes.editable && !changes.editable.firstChange) {\n this.grid?.enableMove(changes.editable.currentValue);\n this.grid?.enableResize(changes.editable.currentValue);\n }\n }\n\n ngOnInit(): void {\n const initialViewMode: GridStackOptions = {\n disableDrag: !this.editable(),\n disableResize: !this.editable()\n };\n\n const options: GridStackOptions = {\n ...DEFAULT_GRIDSTACK_OPTIONS,\n ...this.gridConfig()?.gridStackOptions,\n ...initialViewMode\n };\n\n this.grid = GridStack.init(options, this.elementRef.nativeElement.firstChild as HTMLElement);\n this.startBatch();\n this.hookEvents(this.grid);\n this.destroyRef.onDestroy(() => this.grid?.destroy());\n }\n\n private startBatch(): void {\n this.grid?.batchUpdate(true);\n // this ensures that si-widget-host components are rendered before turning off batch mode.\n afterNextRender(() => this.grid?.batchUpdate(false), { injector: this.injector });\n }\n\n /**\n *\n * Returns the position of a specific widget in the grid.\n */\n getWidgetLayout(widgetId: string): WidgetPositionConfig | undefined {\n const gridItem = this.widgetHostsMap().get(widgetId);\n if (!gridItem) {\n return undefined;\n }\n const element = gridItem.elementRef;\n return {\n id: widgetId,\n x: Number(element.getAttribute('gs-x')) || 0,\n y: Number(element.getAttribute('gs-y')) || 0,\n width: Number(element.getAttribute('gs-w')) || 0,\n height: Number(element.getAttribute('gs-h')) || 0\n };\n }\n\n private hookEvents(grid: GridStack): void {\n grid.on(\n 'added removed dragstop resizestop disable enable dropped resize resizestart drag dragstart change',\n (event: Event) => {\n this.ngZone.run(() => {\n this.gridEvent.emit({\n event,\n grid\n });\n });\n }\n );\n }\n}\n","<div\n class=\"grid-stack\"\n [attr.role]=\"editable() ? null : 'list'\"\n [attr.aria-label]=\"editable() ? null : (a11yWidgetsListLabel | translate)\"\n>\n @if (grid) {\n @for (item of widgetConfigs(); track item.id) {\n <si-widget-host\n [grid]=\"grid\"\n [attr.item-id]=\"item.id\"\n [editable]=\"editable()\"\n [widgetConfig]=\"item\"\n [componentFactory]=\"widgetCatalogMap().get(item.widgetId)?.componentFactory\"\n (remove)=\"widgetInstanceRemove.emit(item.id)\"\n (edit)=\"widgetInstanceEdit.emit(item)\"\n />\n }\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n ComponentRef,\n Directive,\n EnvironmentInjector,\n inject,\n Injector,\n isSignal,\n OnDestroy,\n OutputRefSubscription,\n signal,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\n\nimport {\n WidgetComponentFactory,\n WidgetConfig,\n WidgetConfigStatus,\n WidgetInstanceEditor,\n WidgetInstanceEditorWizard,\n WidgetInstanceEditorWizardState\n} from '../model/widgets.model';\nimport { setupWidgetEditor } from '../widget-loader';\n\n/**\n * Base class encapsulating common widget editor lifecycle management.\n * Both `SiWidgetCatalogComponent` and `SiWidgetInstanceEditorDialogComponent`\n * extend this class to share editor setup, teardown, and status handling logic.\n */\n@Directive()\nexport abstract class SiWidgetEditorBase implements OnDestroy {\n /** Indicates if the current config is valid or not. */\n protected readonly invalidConfig = signal(false);\n\n /** Marks the widget configuration as modified. */\n protected readonly widgetConfigModified = signal(false);\n\n protected readonly editorWizardState = signal<WidgetInstanceEditorWizardState | undefined>(\n undefined\n );\n\n protected widgetInstanceEditor?: WidgetInstanceEditor;\n protected subscriptions: (Subscription | OutputRefSubscription)[] = [];\n\n protected readonly editorHost = viewChild.required('editorHost', { read: ViewContainerRef });\n protected injector = inject(Injector);\n protected envInjector = inject(EnvironmentInjector);\n\n ngOnDestroy(): void {\n this.tearDownEditor();\n }\n\n protected loadWidgetEditor(\n widgetComponentFactory: WidgetComponentFactory,\n host: ViewContainerRef\n ): Observable<ComponentRef<WidgetInstanceEditor>> {\n return setupWidgetEditor(widgetComponentFactory, host, this.injector, this.envInjector);\n }\n\n protected initializeEditor(\n componentRef: ComponentRef<WidgetInstanceEditor>,\n config: WidgetConfig | Omit<WidgetConfig, 'id'>\n ): void {\n this.widgetInstanceEditor = componentRef.instance;\n if (isSignal(this.widgetInstanceEditor.config)) {\n componentRef.setInput('config', config);\n } else {\n this.widgetInstanceEditor.config = config;\n }\n // To be used by webcomponent wrapper\n if ('statusChangesHandler' in this.widgetInstanceEditor) {\n this.widgetInstanceEditor.statusChangesHandler = this.handleStatusChanges.bind(this);\n }\n\n if (this.widgetInstanceEditor.statusChanges) {\n this.subscriptions.push(\n this.widgetInstanceEditor.statusChanges.subscribe(statusChanges =>\n this.handleStatusChanges(statusChanges)\n )\n );\n } else if (this.widgetInstanceEditor.configChange) {\n this.subscriptions.push(\n this.widgetInstanceEditor.configChange.subscribe(() => this.widgetConfigModified.set(true))\n );\n }\n\n if (this.isEditorWizard(this.widgetInstanceEditor)) {\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n\n if (this.widgetInstanceEditor.stateChange) {\n this.subscriptions.push(\n this.widgetInstanceEditor.stateChange.subscribe(state =>\n this.editorWizardState.set(state)\n )\n );\n }\n }\n }\n\n protected tearDownEditor(): void {\n this.invalidConfig.set(false);\n this.widgetConfigModified.set(false);\n this.editorWizardState.set(undefined);\n this.widgetInstanceEditor = undefined;\n this.subscriptions.forEach(s => s.unsubscribe());\n this.subscriptions = [];\n }\n\n protected isEditorWizard(\n editor?: WidgetInstanceEditor | WidgetInstanceEditorWizard\n ): editor is WidgetInstanceEditorWizard {\n return !!editor && 'state' in editor;\n }\n\n protected handleStatusChanges(statusChanges: Partial<WidgetConfigStatus>): void {\n if (statusChanges.invalid !== undefined) {\n this.invalidConfig.set(statusChanges.invalid);\n }\n if (statusChanges.modified !== undefined) {\n this.widgetConfigModified.set(statusChanges.modified);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n isSignal,\n model,\n OnInit,\n output\n} from '@angular/core';\nimport { SiActionDialogService } from '@spike-rabbit/element-ng/action-modal';\nimport { SiTranslatePipe, t } from '@spike-rabbit/element-translate-ng/translate';\n\nimport { Widget, WidgetConfig } from '../../model/widgets.model';\nimport { SiWidgetEditorBase } from '../si-widget-editor-base';\n\n/**\n * The Dialog component is utilized when editing a widget instance within a dashboard.\n * It dynamically loads and creates the associated widget editor and incorporates it\n * into its content. The dialog component is accountable for interacting with the dashboard\n * and offers options for saving changes or terminating the editing process.\n */\n@Component({\n selector: 'si-widget-instance-editor-dialog',\n imports: [SiTranslatePipe],\n templateUrl: './si-widget-instance-editor-dialog.component.html',\n styleUrl: './si-widget-instance-editor-dialog.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiWidgetInstanceEditorDialogComponent extends SiWidgetEditorBase implements OnInit {\n /**\n * Input for the widget instance configuration. It is used to populate the\n * widget editor.\n */\n readonly widgetConfig = model.required<WidgetConfig>();\n\n /**\n * Input for the widget definition. It is required to retrieve the component\n * factory to instantiate the widget editor.\n */\n readonly widget = input.required<Widget>();\n\n /**\n * Emits the edited widget instance configuration if the user confirms by\n * saving, or `undefined` if the user cancels the dialog.\n */\n readonly closed = output<WidgetConfig | undefined>();\n\n /**\n * Emits when the editor instantiation is completed.\n */\n readonly editorSetupCompleted = output<void>();\n\n protected readonly showNextButton = computed(() =>\n this.editorWizardState() !== undefined ? true : false\n );\n\n protected readonly disableNextButton = computed(() => {\n const wizardState = this.editorWizardState();\n\n if (!wizardState) {\n return true;\n } else if (!wizardState.hasNext) {\n return true;\n } else if (wizardState.disableNext !== undefined) {\n return wizardState.disableNext;\n } else {\n return false;\n }\n });\n\n protected readonly showPreviousButton = computed(() => !!this.editorWizardState());\n\n protected readonly disablePreviousButton = computed(() => {\n const wizardState = this.editorWizardState();\n return wizardState ? !wizardState.hasPrevious : true;\n });\n\n protected labelSave = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.SAVE:Save`);\n protected labelCancel = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.CANCEL:Cancel`);\n protected labelPrevious = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.PREVIOUS:Previous`);\n protected labelNext = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.NEXT:Next`);\n protected labelDialogMessage = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE:The widget configuration changed. Do you want to discard the changes?`\n );\n protected labelDialogHeading = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.HEADING:Widget configuration changed`\n );\n protected labelDialogSave = t(\n () => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.SAVE:Save`\n );\n protected labelDialogDiscard = t(\n () => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD:Discard`\n );\n protected labelDialogCancel = t(\n () => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL:Cancel`\n );\n\n private dialogService = inject(SiActionDialogService);\n\n ngOnInit(): void {\n this.loadWidgetEditor(this.widget().componentFactory, this.editorHost()).subscribe(\n componentRef => {\n this.initializeEditor(componentRef, this.widgetConfig()!);\n this.editorSetupCompleted.emit();\n }\n );\n }\n\n protected onCancel(): void {\n if (!this.widgetConfigModified()) {\n this.closed.emit(undefined);\n } else {\n this.dialogService\n .showActionDialog({\n type: 'edit-discard',\n disableSave: this.invalidConfig(),\n message: this.labelDialogMessage,\n heading: this.labelDialogHeading,\n saveBtnName: this.labelDialogSave,\n discardBtnName: this.labelDialogDiscard,\n cancelBtnName: this.labelDialogCancel,\n disableSaveMessage: this.labelDialogMessage,\n disableSaveDiscardBtnName: this.labelDialogDiscard\n })\n .subscribe(result => {\n if (result === 'discard') {\n this.closed.emit(undefined);\n } else if (result === 'save') {\n this.closed.emit(this.widgetConfig());\n }\n });\n }\n }\n\n protected onNext(): void {\n if (this.isEditorWizard(this.widgetInstanceEditor)) {\n this.widgetInstanceEditor.next();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n }\n }\n\n protected onPrevious(): void {\n if (this.isEditorWizard(this.widgetInstanceEditor) && this.editorWizardState()?.hasPrevious) {\n this.widgetInstanceEditor.previous();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n }\n }\n\n protected onSave(): void {\n // In case the widget instance editor did not only change values of the config\n // object, but set a new config object reference, we need to grab it and replace\n // our local config object.\n if (this.widgetInstanceEditor?.config) {\n if (isSignal(this.widgetInstanceEditor.config)) {\n this.widgetConfig.set(this.widgetInstanceEditor?.config() as WidgetConfig);\n } else {\n this.widgetConfig.set(this.widgetInstanceEditor?.config as WidgetConfig);\n }\n }\n\n this.closed.emit(this.widgetConfig());\n }\n}\n","<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n <ng-container #editorHost />\n</div>\n\n<div class=\"editor-footer px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n\n @if (showPreviousButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disablePreviousButton()\"\n (click)=\"onPrevious()\"\n >{{ labelPrevious | translate }}</button\n >\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n\n <button type=\"button\" class=\"btn btn-primary\" [disabled]=\"invalidConfig()\" (click)=\"onSave()\">{{\n labelSave | translate\n }}</button>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n SimpleChanges,\n Type,\n viewChild\n} from '@angular/core';\nimport { SiLoadingSpinnerDirective } from '@spike-rabbit/element-ng/loading-spinner';\nimport { ModalOptions, SiModalService } from '@spike-rabbit/element-ng/modal';\nimport { BehaviorSubject, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { SI_DASHBOARD_CONFIGURATION } from '../../model/configuration';\nimport { GridConfig } from '../../model/gridstack.model';\nimport { SI_WIDGET_ID_PROVIDER } from '../../model/si-widget-id-provider';\nimport { SI_WIDGET_STORE } from '../../model/si-widget-storage';\nimport { Widget, WidgetConfig } from '../../model/widgets.model';\nimport {\n GridWrapperEvent,\n SiGridstackWrapperComponent\n} from '../gridstack-wrapper/si-gridstack-wrapper.component';\nimport { SiWidgetInstanceEditorDialogComponent } from '../widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\n\n/**\n * The grid component is the actual component on which the widget instances are placed and visualized. You can think of\n * a headless dashboard, without a title, toolbar or edit buttons.\n */\n@Component({\n selector: 'si-grid',\n imports: [SiGridstackWrapperComponent, SiLoadingSpinnerDirective, AsyncPipe],\n templateUrl: './si-grid.component.html',\n styleUrl: './si-grid.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiGridComponent implements OnInit, OnChanges, OnDestroy {\n private storeSubscription?: Subscription;\n private modalService = inject(SiModalService);\n private widgetStorage = inject(SI_WIDGET_STORE);\n private widgetIdProvider = inject(SI_WIDGET_ID_PROVIDER);\n\n /**\n * Configuration options for a grid instance. Default is the optional\n * value from the {@link SI_DASHBOARD_CONFIGURATION}.\n *\n * @defaultValue inject(SI_DASHBOARD_CONFIGURATION)?.grid\n */\n readonly gridConfig = input<GridConfig | undefined>(inject(SI_DASHBOARD_CONFIGURATION)?.grid);\n\n /**\n * Sets the grid into editable mode, in which the widget instances can be moved,\n * resized, removed or new ones added.\n *\n * @defaultValue false\n */\n readonly editable = model(false);\n\n /**\n * An optional, but recommended dashboard id that is used in persistence and passed\n * to the widget store for saving and loading data.\n */\n readonly dashboardId = input<string>();\n\n /**\n * Provides the available widgets to the grid. When loading the widget configurations from\n * the storage, we need to have the widget definition available to be able to create the widget\n * instances on the grid.\n *\n * @defaultValue [] */\n readonly widgetCatalog = input<Widget[]>([]);\n\n protected readonly widgetCatalogMap = computed(\n () => new Map(this.widgetCatalog().map(widget => [widget.id, widget]))\n );\n\n /**\n * When the user clicks edit on a widget instance, an editor need to appear and the\n * widget editor component need to be loaded. When the grid is used standalone, it\n * takes care and opens a modal dialog and loads the configured widget editor component.\n * When the grid is used in a container like the flexible dashboard, the container manages\n * where the widget instance editor is displayed. In this case this options prevents the grid\n * from showing the editor in the dialog, and emits on `widgetInstanceEdit` on clicking the\n * widget `edit` action.\n *\n * @defaultValue false */\n readonly emitWidgetInstanceEditEvents = input(false);\n\n /**\n * Option to turn off the loading spinner on save and load operations.\n *\n * @defaultValue false\n */\n readonly hideProgressIndicator = input(false);\n\n /**\n * Option to configure a custom widget instance editor dialog component. The component provides the\n * editor hosting and the buttons to save and cancel.\n */\n readonly widgetInstanceEditorDialogComponent =\n input<Type<SiWidgetInstanceEditorDialogComponent>>();\n\n /**\n * Emits the modification state of the grid. It is `unmodified` when the visible state\n * is equal to the loaded state from the widget storage. When the user modifies the dashboard by\n * e.g. while moving the widgets, the dashboard is marked as `modified` and emits `true` and when the user\n * persists the change by saving, or reverts the state by canceling, the state is `unmodified`\n * again and emits `false`.\n */\n readonly isModified = output<boolean>();\n\n /**\n * Modified state that is emitted in the `isModified` output. Should only be\n changed using the {@link setModified} method.\n */\n private modified = false;\n\n /**\n * Emits to notify about edit events of widget instances. Only emits\n * if `emitWidgetInstanceEditEvents` is set to `true`.\n */\n readonly widgetInstanceEdit = output<WidgetConfig>();\n\n /**\n * All widget configuration objects of the visible widget instances.\n *\n * @internal\n */\n readonly visibleWidgetInstances$ = new BehaviorSubject<WidgetConfig[]>([]);\n\n /**\n * All widget instance configs that are on the grid by loading from the widget\n * storage. Thus, these widget are persisted.\n *\n * @defaultValue []\n * @internal\n */\n persistedWidgetInstances: WidgetConfig[] = [];\n\n /**\n * Widget instance configs that are added to the grid in edit mode, but not\n * persisted yet, as the user did not confirm the modification by save.\n *\n * @defaultValue []\n * @internal\n */\n transientWidgetInstances: WidgetConfig[] = [];\n\n /**\n * All widget instance configurations that are removed from the grid in edit mode.\n * These instances are persistently removed on save or re-added again on cancel.\n *\n * @defaultValue []\n * @internal\n */\n markedForRemoval: WidgetConfig[] = [];\n\n /** @defaultValue viewChild.required(SiGridstackWrapperComponent) */\n readonly gridStackWrapper = viewChild.required(SiGridstackWrapperComponent);\n\n /**\n * Indication for load and save operations.\n */\n readonly isLoading: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n protected initialLoad = true;\n\n protected get showEmptyState(): boolean {\n return !this.initialLoad && this.visibleWidgetInstances$.value.length === 0;\n }\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n // Reload widgets if the dashboardId changes. Do not load on initial\n // dashboardId property binding as first load will be done in ngOnInit()\n if (changes.dashboardId && !changes.dashboardId.firstChange) {\n queueMicrotask(() => this.loadAndSubscribeWidgets());\n }\n\n if (changes.editable) {\n if (changes.editable.currentValue) {\n this.resetEditState();\n } else {\n this.restoreSavedState();\n }\n }\n }\n\n ngOnInit(): void {\n queueMicrotask(() => this.loadAndSubscribeWidgets());\n }\n\n ngOnDestroy(): void {\n this.storeSubscription?.unsubscribe();\n this.isLoading.complete();\n }\n\n /**\n * Set dashboard grid in editable mode to modify widget instances.\n */\n edit(): void {\n if (!this.editable()) {\n this.editable.set(true);\n this.resetEditState();\n }\n }\n\n /**\n * Persists the current widget instances to the widget storage and\n * changes the editable and isModified modes.\n */\n save(): void {\n if (!this.editable()) {\n return;\n }\n\n this.isLoading.next(true);\n // Update position information\n const widgets = this.updateWidgetPositions(this.visibleWidgetInstances$.value);\n\n const transientWidgetIds = new Set(this.transientWidgetInstances.map(w => w.id));\n const modifiedWidgets = widgets.filter(widget => !transientWidgetIds.has(widget.id));\n const addedWidgets = widgets.filter(widget => transientWidgetIds.has(widget.id));\n this.widgetStorage\n .save(modifiedWidgets, addedWidgets, this.markedForRemoval, this.dashboardId())\n .pipe(take(1))\n .subscribe({\n next: (value: WidgetConfig[]) => {\n this.setModified(false);\n this.editable.set(false);\n this.isLoading.next(false);\n },\n error: (err: any) => {\n console.error('Saving dashboard configuration failed.', err);\n this.isLoading.next(false);\n }\n });\n }\n\n /**\n * Cancel current changes and restore last saved state.\n */\n cancel(): void {\n if (this.editable()) {\n this.editable.set(false);\n this.restoreSavedState();\n }\n }\n\n /**\n * Adds a new widget instance configuration to the dashboard grid. It is not\n * persisted yet and is added to the transient widget instances.\n *\n * @param widgetInstanceConfig - The new widget configuration.\n */\n addWidgetInstance(widgetInstanceConfig: Omit<WidgetConfig, 'id'>): void {\n const id = this.widgetIdProvider.generateWidgetId(widgetInstanceConfig, this.dashboardId());\n const newWidget: WidgetConfig = { ...widgetInstanceConfig, id };\n const nextWidgets = this.updateWidgetPositions([\n ...this.visibleWidgetInstances$.value,\n newWidget\n ]);\n this.transientWidgetInstances.push(newWidget);\n this.visibleWidgetInstances$.next(nextWidgets);\n }\n\n /**\n * Removes a widget instance from the visible widgets and puts it in the\n * {@link markedForRemoval} array.\n *\n * @param widgetInstanceId - The id of the widget instance to be removed.\n */\n removeWidgetInstance(widgetInstanceId: string): void {\n const widgetToRemove = this.visibleWidgetInstances$.value.find(\n widget => widget.id === widgetInstanceId\n );\n if (widgetToRemove) {\n if (!this.transientWidgetInstances.some(widget => widget.id === widgetToRemove.id)) {\n this.markedForRemoval.push(widgetToRemove);\n }\n let nextWidgets = this.visibleWidgetInstances$.value.filter(\n widget => widget.id !== widgetInstanceId\n );\n nextWidgets = this.updateWidgetPositions(nextWidgets);\n this.visibleWidgetInstances$.next(nextWidgets);\n }\n }\n\n /**\n * Opens the provided widget configuration in the related editor or\n * emits on {@link widgetInstanceEdit}, if {@link emitWidgetInstanceEditEvents}\n * is true.\n *\n * @param widgetInstanceConfig - The config of the widget instance to edit.\n */\n editWidgetInstance(widgetInstanceConfig: WidgetConfig): void {\n // Need to edit a clone to avoid runtime editing\n const widgetConfigClone = structuredClone(widgetInstanceConfig);\n if (this.emitWidgetInstanceEditEvents()) {\n this.widgetInstanceEdit.emit(widgetConfigClone);\n } else {\n const widget = this.widgetCatalogMap().get(widgetConfigClone.widgetId);\n const config: ModalOptions<SiWidgetInstanceEditorDialogComponent> = {\n animated: true,\n keyboard: true,\n inputValues: {\n widgetConfig: widgetConfigClone,\n widget\n },\n class: widget?.componentFactory.editorModalClass ?? 'modal-xl'\n };\n const widgetInstanceEditorDialogComponent = this.widgetInstanceEditorDialogComponent();\n const componentType =\n widgetInstanceEditorDialogComponent ?? SiWidgetInstanceEditorDialogComponent;\n const modalRef = this.modalService.show(componentType, config);\n const subscription = modalRef.content.closed.subscribe(editedWidgetConfig => {\n subscription.unsubscribe();\n modalRef.hide();\n if (editedWidgetConfig) {\n this.updateWidgetInstance(editedWidgetConfig);\n }\n });\n }\n }\n\n /**\n * Updates the visible widgets with an updated configuration. Will update the\n * user interface and emit on {@link isModified}.\n *\n * @param editedWidgetConfig - The config of the widget instance that was updated.\n */\n updateWidgetInstance(editedWidgetConfig: WidgetConfig): void {\n const index = this.visibleWidgetInstances$.value.findIndex(\n wc => wc.id === editedWidgetConfig.id\n );\n if (index >= 0) {\n let nextWidgets = this.updateWidgetPositions([...this.visibleWidgetInstances$.value]);\n nextWidgets[index] = editedWidgetConfig;\n nextWidgets = this.updateWidgetPositions(nextWidgets);\n this.visibleWidgetInstances$.next(nextWidgets);\n setTimeout(() => this.setModified(true), 0);\n }\n }\n\n protected handleGridEvent(event: GridWrapperEvent): void {\n const relevantEventTypes = ['added', 'removed', 'dragstop', 'resizestop'];\n // When widgets without explicit x/y are first added, GridStack auto-positions them.\n // Capture these resolved positions so cancel() can restore the exact layout\n // instead of re-triggering auto-positioning which may produce a different result.\n if (\n event.event.type === 'added' &&\n !this.editable() &&\n this.persistedWidgetInstances.some(w => w.x === undefined || w.y === undefined)\n ) {\n this.persistedWidgetInstances = this.updateWidgetPositions(this.persistedWidgetInstances);\n }\n if (this.editable() && relevantEventTypes.includes(event.event.type)) {\n // Make sure the widget config always holds the latest position information\n const widgets = this.updateWidgetPositions(this.visibleWidgetInstances$.value);\n this.visibleWidgetInstances$.next(widgets);\n setTimeout(() => this.setModified(true), 0);\n }\n }\n\n private loadAndSubscribeWidgets(): void {\n this.storeSubscription?.unsubscribe();\n // remove existing widgets\n this.visibleWidgetInstances$.next([]);\n\n // Only when we change the dashboard id, this method is invoked\n // directly. In this case we start the progress here and we stop\n // it in the `next` subscription. The subscription stays hot and\n // also get called when save() is invoked. In this case, we do not\n // want to decrease the progress counter as we do it in the save\n // subscription. To handle this, we use the boolean marker `initialLoad`.\n this.initialLoad = true;\n this.isLoading.next(true);\n this.storeSubscription = this.widgetStorage.load(this.dashboardId()).subscribe({\n next: widgets => {\n this.visibleWidgetInstances$.next(widgets);\n this.persistedWidgetInstances = widgets;\n if (this.initialLoad) {\n this.initialLoad = false;\n this.isLoading.next(false);\n }\n },\n error: err => {\n console.error('Loading dashboard configuration failed', err);\n this.isLoading.next(false);\n }\n });\n }\n\n private updateWidgetPositions(widgetConfigs: WidgetConfig[]): WidgetConfig[] {\n const wrapper = this.gridStackWrapper();\n const widgets = widgetConfigs.map(widget => {\n const position = wrapper.getWidgetLayout(widget.id);\n if (\n position &&\n (widget.x !== position.x ||\n widget.y !== position.y ||\n widget.width !== position.width ||\n widget.height !== position.height)\n ) {\n return {\n ...widget,\n x: position.x,\n y: position.y,\n width: position.width,\n height: position.height\n };\n } else {\n return widget;\n }\n });\n return widgets || [];\n }\n\n private resetEditState(): void {\n this.transientWidgetInstances = [];\n this.markedForRemoval = [];\n this.setModified(false);\n }\n\n private restoreSavedState(): void {\n if (this.modified) {\n this.visibleWidgetInstances$.next([...this.persistedWidgetInstances]);\n this.setModified(false);\n }\n }\n\n private setModified(modified: boolean): void {\n if (this.modified !== modified) {\n this.modified = modified;\n this.isModified.emit(this.modified);\n }\n }\n}\n","@if (showEmptyState) {\n <ng-content select=\"[empty-state]\" />\n}\n<si-gridstack-wrapper\n [widgetConfigs]=\"(visibleWidgetInstances$ | async) ?? []\"\n [gridConfig]=\"gridConfig()\"\n [editable]=\"editable()\"\n [widgetCatalogMap]=\"widgetCatalogMap()\"\n [siLoading]=\"!hideProgressIndicator() && initialLoad && (isLoading | async)!\"\n [blocking]=\"false\"\n (gridEvent)=\"handleGridEvent($event)\"\n (widgetInstanceRemove)=\"removeWidgetInstance($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n/>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { EventEmitter, InputSignal, OutputEmitterRef, TemplateRef, Type } from '@angular/core';\nimport { AccentLineType, MenuItem as MenuItemLegacy } from '@spike-rabbit/element-ng/common';\nimport { ContentActionBarMainItem, ViewType } from '@spike-rabbit/element-ng/content-action-bar';\nimport { MenuItem } from '@spike-rabbit/element-ng/menu';\nimport { TranslatableString } from '@spike-rabbit/element-translate-ng/translate';\nimport { Subject } from 'rxjs';\n\n/**\n * Widgets describe the entries within the widget catalog and holds all\n * default configuration and factory functionality to instantiate a widget\n * instance, represented as {@link WidgetConfig} objects.\n */\nexport interface Widget {\n /** A unique id of the widget. */\n id: string;\n /** An optional version string. */\n version?: string;\n /** The name of the widget that is presented in the widget catalog. */\n name: TranslatableString;\n /** An optional description that is visible in the widget catalog. */\n description?: TranslatableString;\n /** A CSS icon class that specifies the widget icon, displayed in the catalog. */\n iconClass?: string;\n /** The factory to instantiate a widget instance component that is added to the dashboard. */\n componentFactory: WidgetComponentFactory;\n /** Optional default values that can be set to widget instances. */\n defaults?: Pick<\n WidgetConfig,\n | 'width'\n | 'height'\n | 'minWidth'\n | 'minHeight'\n | 'heading'\n | 'expandable'\n | 'immutable'\n | 'image'\n | 'accentLine'\n >;\n /** Optional default payload object that is copied into every widget instance {@link WidgetConfig}. */\n payload?: any;\n}\n\n/** Factory type that is either a {@link WidgetComponentTypeFactory}, {@link FederatedModule}, {@link FederatedBridgeModule} or {@link WebComponent}. */\nexport type WidgetComponentFactory =\n WidgetComponentTypeFactory | FederatedModule | WebComponent | FederatedBridgeModule;\n\ntype CommonFactoryFields = {\n componentName: string;\n editorComponentName?: string;\n /**\n * CSS class that is added to the modal dialog when component editor dialog is shown.\n * Provides the option to change the size if the dialog.\n */\n editorModalClass?: string;\n};\n\ntype WidgetComponentTypeBaseConfig = {\n factoryType?: 'default';\n [index: string]: any;\n};\n\n/** Use when component is not standalone and part of a module */\ntype ModuleOptions = WidgetComponentTypeBaseConfig & {\n moduleName: string;\n moduleLoader: (name: string) => Promise<any>;\n componentLoader?: never;\n};\n\n/** Use when component is standalone */\ntype StandaloneOptions = WidgetComponentTypeBaseConfig & {\n componentLoader: <T = unknown>(componentName: string) => Promise<Type<T>>;\n moduleName?: never;\n moduleLoader?: never;\n};\n\nexport type WidgetComponentTypeFactory = CommonFactoryFields & (ModuleOptions | StandaloneOptions);\n\n/**\n * Factory configuration for loading widget components from a federated module.\n * Supports both Module Federation and Native Federation patterns for micro-frontend architectures.\n * Use this when the widget component is hosted in a separate, independently deployed application.\n */\nexport type FederatedModule = CommonFactoryFields &\n LoadRemoteModuleOptions & {\n factoryType: 'module-federation' | 'native-federation';\n [index: string]: any;\n };\n\n/**\n * Use this when having native federation shell and remote module is using module federation.\n */\nexport type FederatedBridgeModule = CommonFactoryFields &\n LoadRemoteBridgeOptions & {\n factoryType: 'native-federation-module-bridge';\n [index: string]: any;\n };\n\nexport type WebComponent = CommonFactoryFields & {\n factoryType: 'web-component';\n url: string;\n [index: string]: any;\n};\n\n/**\n * ObjectFit configuration options for a widget image.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit}\n */\nexport type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';\n\n/**\n * Image is used to configure an image to be displayed on a widget instance.\n */\nexport interface WidgetImage {\n /**\n * The image URL (See [<img>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src)).\n */\n src: string;\n /**\n * The HTMLImageElement property [alt](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#usage_notes)\n * provides fallback (alternate) text to display when the image specified by the <img> element is not loaded.\n */\n alt: string;\n /**\n * Defines if an image is placed on top or start (left) of the card.\n */\n dir?: 'horizontal' | 'vertical';\n /**\n * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property.\n */\n objectFit?: ObjectFit;\n /**\n * Sets the image [object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) CSS property.\n */\n objectPosition?: string;\n}\n\n/**\n * A {@link WidgetConfig} holds the configuration of a widget instance component that is visible on a dashboard.\n * It can be persisted and used to restore a dashboards state.\n */\nexport interface WidgetConfig {\n /** A unique id of a widget instance */\n id: string;\n /**\n * The id of the widget descriptor that was used to instantiate\n * the `WidgetConfig` and the widget instance component.\n */\n widgetId: string;\n /**\n * Optionally, the version widget description that was used to create the widget config.\n */\n version?: string;\n /**\n * Width of the grid item, where number represents how many columns it spans (default?: 1)\n */\n width?: number;\n /**\n * Height of the grid item, where number represents how many rows it takes. (default?: 1)\n */\n height?: number;\n /**\n * Grid item position on x axis of the grid (default?: 0)\n */\n x?: number;\n /**\n * Grid item position on y axis of the grid (default?: 0)\n */\n y?: number;\n /**\n * minimum width allowed during resize/creation (default?: undefined = un-constrained)\n */\n minWidth?: number;\n /**\n * maximum height allowed during resize/creation (default?: undefined = un-constrained)\n */\n minHeight?: number;\n /**\n * grid item header text.\n */\n heading?: TranslatableString;\n /** Defines whether the widget instance component can be expanded and enlarged over the dashboard. */\n expandable?: boolean;\n /** A widget specific payload object. Placeholder to pass in additional configuration. */\n payload?: any;\n actionBarViewType?: ViewType;\n isNotRemovable?: boolean;\n immutable?: boolean;\n /**\n * Optional configuration for an image to be displayed on the widget instance.\n */\n image?: WidgetImage;\n /**\n * Optional type of the accent line.\n */\n accentLine?: AccentLineType;\n}\n\n/**\n * Object is used to inform the editor hosting component about configuration\n * changes to configure (e.g. enable/disable) the control buttons accordingly.\n */\nexport interface WidgetConfigStatus {\n /**\n * Indicates that the configuration was changed. If true, canceling\n * the editor will first show a dialog to confirm the discard.\n */\n modified: boolean;\n\n /**\n * If true, save or add button will be disabled.\n */\n invalid: boolean;\n}\n\n/**\n * An editor component for a widget instance need to implement this interface.\n * After initializing the instance editor component, with widget configuration\n * is set. Optionally, the component can emit changes during editing to control\n * e.g. the dialog behavior like disabling the save button.\n */\nexport interface WidgetInstanceEditor {\n /**\n * The hosting component of the widget instance editor sets the configuration\n * after initialization. The editor component should use the configuration as\n * input and persist all relevant changes within the config. The hosting component\n * takes the config after adding of saving the widget instance and updates the\n * dashboard.\n */\n config:\n WidgetConfig | Omit<WidgetConfig, 'id'> | InputSignal<WidgetConfig | Omit<WidgetConfig, 'id'>>;\n /**\n * Optionally, emit updated widget configuration using an event emitter.\n */\n configChange?:\n | Subject<WidgetConfig | Omit<WidgetConfig, 'id'>>\n | OutputEmitterRef<WidgetConfig | Omit<WidgetConfig, 'id'>>;\n\n /**\n * Optionally, inform the hosting component about widget configuration status changes.\n */\n statusChanges?:\n Subject<Partial<WidgetConfigStatus>> | OutputEmitterRef<Partial<WidgetConfigStatus>>;\n}\n\n/**\n * State to control the behavior of a widget instance editor wizard.\n * The wizard state is used to control the behavior of the dialog buttons\n * provided by the catalog and editor components.\n */\nexport interface WidgetInstanceEditorWizardState {\n hasNext: boolean;\n hasPrevious: boolean;\n disableNext?: boolean;\n}\n\n/**\n * A widget instance editor component that shall support a multi-page\n * widget configuration can implement this interface. The wizard-like\n * page state {@link WidgetInstanceEditorWizardState} needs to be managed\n * by the editor itself and is used to control wizard dialog buttons\n * that are provided by the catalog and editor component.\n */\nexport interface WidgetInstanceEditorWizard extends WidgetInstanceEditor {\n /**\n * The current state of the multi-page widget instance editor. The state\n * is access after `#next()` or `#previous()` is invoked.\n */\n state: WidgetInstanceEditorWizardState;\n /**\n * Emit changes as needed during the user interaction with the editor.\n */\n stateChange?:\n Subject<WidgetInstanceEditorWizardState> | OutputEmitterRef<WidgetInstanceEditorWizardState>;\n /**\n * Is invoked from the next button. Display next page as consequence.\n * For web components, implementing `next()` requires adding an event listener\n * for the `next` event on the element.\n */\n next(): void;\n /**\n * Is invoked from the previous button. Display previous page as consequence.\n * For web components, implementing `previous()` requires adding an event listener\n * for the `previous` event on the element.\n */\n previous(): void;\n}\n\n/**\n * Event type used when a widget config is changed from within\n * a widget instance. For example, a widget instance component\n * may assign and change the primary actions. It needs to publish the\n * change so that the UI in the hosting dashboard card can be updated.\n */\nexport type WidgetConfigEvent = {\n /** Primary actions that are visible in normal view mode. */\n primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in normal view mode. */\n secondaryActions?: (MenuItemLegacy | MenuItem)[];\n /** Primary actions that are visible in editable dashboard mode. */\n primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in editable dashboard mode. */\n secondaryEditActions?: (MenuItemLegacy | MenuItem)[];\n};\n\n/**\n * Every widget component implementation needs to implement the {@link WidgetInstance}\n * interface. It provides the interface between the component implementation and the\n * dashboard.\n */\nexport interface WidgetInstance {\n /** The WidgetConfig is set after instantiating the widget component. */\n config: WidgetConfig | InputSignal<WidgetConfig>;\n\n /**\n * The dashboard will set the editable property to `true`, if the dashboard\n * enters the editable mode. The attribute is used to inform every\n * widget instance.\n */\n editable?: boolean;\n\n /** Primary actions that are visible in normal view mode. */\n primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in normal view mode. */\n secondaryActions?: (MenuItemLegacy | MenuItem)[];\n /** Primary actions that are visible in editable dashboard mode. */\n primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];\n /** Secondary (collapsed) actions that are visible in editable dashboard mode. */\n secondaryEditActions?: (MenuItemLegacy | MenuItem)[];\n\n /** {@link WidgetInstance} component implementations should emit change\n * events after changing the instance configuration like the actions.\n */\n configChange?: EventEmitter<WidgetConfigEvent>;\n /**\n * An optional footer template that is added into the dashboard card's footer.\n */\n footer?: TemplateRef<unknown>;\n}\n\n/**\n * Type to define the position of a widget instance, consisting of\n * the instance id and x, y, width and height.\n */\nexport type WidgetPositionConfig = Pick<WidgetConfig, 'id' | 'x' | 'y' | 'width' | 'height'>;\n\n/**\n * Function creates a new {@link WidgetConfig} without id from a {@link Widget} and\n * copies all default values into the {@link WidgetConfig}.\n * @param widget - The source to create the new {@link WidgetConfig} from.\n * @returns The created {@link WidgetConfig} without id.\n */\nexport const createWidgetConfig = (widget: Widget): Omit<WidgetConfig, 'id'> => {\n const widgetConfig: Omit<WidgetConfig, 'id'> = {\n heading: widget.name,\n widgetId: widget.id,\n version: widget.version,\n minWidth: 3,\n ...widget.defaults,\n payload: { ...widget.payload }\n };\n return widgetConfig;\n};\n\n/**\n * The Remote Module definition is based on `@angular-architects`.\n * We take it over into this file to prevent adding a hard dependency.\n */\nexport type LoadRemoteModuleOptions =\n LoadRemoteModuleScriptOptions | LoadRemoteModuleEsmOptions | LoadRemoteModuleManifestOptions;\n\n/**\n * Definition is based on `@module-federation/enhanced` loadRemote options.\n * We take it over into this file to prevent adding a hard dependency.\n */\nexport type LoadRemoteBridgeOptions = {\n id: string;\n options?:\n | {\n loadFactory?: boolean | undefined;\n from: 'build' | 'runtime';\n }\n | undefined;\n};\n\nexport type LoadRemoteModuleScriptOptions = {\n type?: 'script';\n remoteEntry?: string;\n remoteName: string;\n exposedModule: string;\n /**\n * Optional nonce value applied to the script element for Content Security Policy (CSP) support.\n * Supported in Module Federation v21.2.0+; safely ignored by earlier versions.\n */\n nonce?: string;\n};\n\nexport type LoadRemoteModuleEsmOptions = {\n type: 'module';\n remoteEntry: string;\n exposedModule: string;\n};\n\nexport type LoadRemoteModuleManifestOptions = {\n type: 'manifest';\n remoteName: string;\n exposedModule: string;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkListbox, CdkOption } from '@angular/cdk/listbox';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n isSignal,\n OnInit,\n output,\n signal,\n viewChild\n} from '@angular/core';\nimport { SiActionDialogService } from '@spike-rabbit/element-ng/action-modal';\nimport { SiCircleStatusComponent } from '@spike-rabbit/element-ng/circle-status';\nimport { SiEmptyStateComponent } from '@spike-rabbit/element-ng/empty-state';\nimport { SiSearchBarComponent } from '@spike-rabbit/element-ng/search-bar';\nimport {\n injectSiTranslateService,\n SiTranslatePipe,\n t\n} from '@spike-rabbit/element-translate-ng/translate';\n\nimport { createWidgetConfig, Widget, WidgetConfig } from '../../model/widgets.model';\nimport { SiWidgetEditorBase } from '../si-widget-editor-base';\n\n/**\n * Default widget catalog implementation to show all available widgets that can be added\n * to a dashboard. It consists of a list view, that lists all available widgets and after\n * selection, a host in which the widget specific editor is loaded. Applications can either\n * stay with the default catalog or implement their own by extending this class.\n */\n@Component({\n selector: 'si-widget-catalog',\n imports: [\n SiSearchBarComponent,\n SiCircleStatusComponent,\n SiEmptyStateComponent,\n SiTranslatePipe,\n CdkListbox,\n CdkOption\n ],\n templateUrl: './si-widget-catalog.component.html',\n styleUrl: './si-widget-catalog.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiWidgetCatalogComponent extends SiWidgetEditorBase implements OnInit {\n /**\n * Placeholder text for the search input field in the widget catalog.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n * ```\n */\n readonly searchPlaceholder = input(\n t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n );\n /**\n * Emits when the catalog is `closed`, either by canceling or by adding or saving\n * a widget configuration. On cancel `undefined` is emitted, otherwise the related\n * widget configuration is emitted.\n */\n readonly closed = output<Omit<WidgetConfig, 'id'> | undefined>();\n\n /**\n * View defines if the catalog widget list or the widget editor is visible.\n *\n * @internal\n * @defaultValue 'list'\n */\n readonly view = signal<'list' | 'editor' | 'editor-only'>('list');\n\n /**\n * Property to provide the available widgets to the catalog. The flexible\n * dashboard creates the catalog by Angular's `createComponent()` method\n * and sets the available widgets to this attribute.\n *\n * @defaultValue [] */\n widgetCatalog: Widget[] = [];\n\n /**\n * Holds the search term from the catalog to be visible when going back\n * by pressing the previous button from the widget edit view.\n */\n protected searchTerm = '';\n /**\n * Array used to hold the search result on the widget catalog.\n * @defaultValue [] */\n protected filteredWidgetCatalog: Widget[] = [];\n protected readonly selected = signal<Widget | undefined>(undefined);\n private widgetConfig?: Omit<WidgetConfig, 'id'>;\n private readonly hasEditor = computed(\n () => !!this.selected()?.componentFactory.editorComponentName\n );\n\n private readonly translateService = injectSiTranslateService();\n\n protected labelCancel = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.CANCEL:Cancel`);\n protected labelPrevious = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.PREVIOUS:Previous`);\n protected labelNext = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.NEXT:Next`);\n protected labelAdd = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.ADD:Add`);\n protected labelEmpty = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.EMPTY:Empty`);\n\n protected labelDialogHeading = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.HEADING:Widget configuration changed`\n );\n protected labelDialogCancel = t(\n () => $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL:Cancel`\n );\n protected labelDialogMessage = t(\n () =>\n $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE:The widget configuration changed. Do you want to discard the changes?`\n );\n protected labelDialogDiscard = t(\n () => $localize`:@@DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD:Discard`\n );\n protected labelWidgetCatalogList = t(\n () => $localize`:@@DASHBOARD.WIDGET_LIBRARY.WIDGET_CATALOG_LIST:Widget catalog list`\n );\n\n protected readonly showAddButton = computed(() =>\n this.view() === 'list' ? !this.hasEditor() : true\n );\n\n protected readonly showNextButton = computed(() =>\n this.view() === 'list' ? this.hasEditor() : this.editorWizardState() !== undefined\n );\n\n protected readonly showPreviousButton = computed(() => this.view() === 'editor');\n\n protected readonly disableAddButton = computed(() => !this.selected() || this.invalidConfig());\n protected readonly disableNextButton = computed(() => {\n const wizardState = this.editorWizardState();\n if (this.view() === 'list') {\n return !this.selected();\n } else if (!wizardState) {\n return true;\n } else if (!wizardState.hasNext) {\n return true;\n } else if (wizardState.disableNext !== undefined) {\n return wizardState.disableNext;\n } else {\n return false;\n }\n });\n\n private dialogService = inject(SiActionDialogService);\n private readonly widgetCdkListbox = viewChild(CdkListbox<Widget>);\n\n ngOnInit(): void {\n this.filteredWidgetCatalog = this.widgetCatalog;\n if (this.widgetCatalog.length > 0) {\n this.selectWidget(this.widgetCatalog[0]);\n }\n }\n\n protected onSearch(searchTerm?: string): void {\n if (!searchTerm || searchTerm.trim().length === 0) {\n this.searchTerm = '';\n this.filteredWidgetCatalog = this.widgetCatalog;\n } else {\n this.searchTerm = searchTerm;\n const term = searchTerm.trim().toLowerCase();\n this.filteredWidgetCatalog = this.widgetCatalog.filter(wd => {\n const name = this.translateService.translateSync(wd.name);\n return name.toLowerCase().includes(term);\n });\n }\n if (this.filteredWidgetCatalog.length > 0) {\n this.selectWidget(this.filteredWidgetCatalog[0]);\n } else {\n this.selectWidget(undefined);\n }\n }\n\n protected onCancel(): void {\n if (!this.widgetConfigModified()) {\n this.closed.emit(undefined);\n } else {\n this.dialogService\n .showActionDialog({\n type: 'edit-discard',\n disableSave: true,\n heading: this.labelDialogHeading,\n cancelBtnName: this.labelDialogCancel,\n disableSaveMessage: this.labelDialogMessage,\n disableSaveDiscardBtnName: this.labelDialogDiscard\n })\n .subscribe(result => {\n if (result === 'discard') {\n this.closed.emit(undefined);\n }\n });\n }\n }\n\n protected onNext(): void {\n if (this.view() === 'list') {\n this.setupWidgetInstanceEditor();\n } else {\n if (this.isEditorWizard(this.widgetInstanceEditor)) {\n this.widgetInstanceEditor.next();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n }\n }\n }\n\n protected onPrevious(): void {\n if (this.isEditorWizard(this.widgetInstanceEditor) && this.editorWizardState()?.hasPrevious) {\n this.widgetInstanceEditor.previous();\n this.editorWizardState.set(this.widgetInstanceEditor.state);\n } else if (!this.widgetConfigModified()) {\n this.setupCatalog();\n } else {\n this.dialogService\n .showActionDialog({\n type: 'edit-discard',\n disableSave: true,\n heading: this.labelDialogHeading,\n cancelBtnName: this.labelDialogCancel,\n message: this.labelDialogMessage,\n discardBtnName: this.labelDialogDiscard\n })\n .subscribe(result => {\n if (result === 'discard') {\n this.setupCatalog();\n }\n });\n }\n }\n\n private setupWidgetInstanceEditor(): void {\n const selected = this.selected();\n if (!selected) {\n return;\n }\n this.tearDownEditor();\n this.view.set('editor');\n this.widgetConfig = createWidgetConfig(selected);\n\n this.loadWidgetEditor(selected.componentFactory, this.editorHost()).subscribe({\n next: componentRef => {\n this.initializeEditor(componentRef, this.widgetConfig!);\n },\n error: error => {\n console.error(error);\n }\n });\n }\n\n private setupCatalog(): void {\n this.editorHost().clear();\n this.tearDownEditor();\n this.widgetConfig = undefined;\n this.view.set('list');\n }\n\n protected onAddWidget(): void {\n const selected = this.selected();\n if (!selected) {\n return;\n }\n\n if (!this.widgetConfig) {\n this.widgetConfig = createWidgetConfig(selected);\n } else {\n // Make sure we use the same config object as the editor\n if (isSignal(this.widgetInstanceEditor?.config)) {\n this.widgetConfig = this.widgetInstanceEditor?.config() ?? this.widgetConfig;\n } else {\n this.widgetConfig = this.widgetInstanceEditor?.config ?? this.widgetConfig;\n }\n }\n this.closed.emit(this.widgetConfig);\n }\n\n protected selectWidget(widget?: Widget): void {\n this.selected.set(widget);\n if (widget) {\n // need to keep this in setTimeout to avoid ExpressionChangedAfterItHasBeenCheckedError\n setTimeout(() => {\n this.widgetCdkListbox()?.selectValue(widget);\n });\n }\n }\n}\n","<div class=\"si-layout-fixed-height mb-8 mx-0 overflow-auto px-2 pt-2\">\n @if (view() === 'list') {\n <div class=\"si-layout-fixed-height\">\n <div class=\"mx-0\">\n <si-search-bar\n class=\"w-100\"\n colorVariant=\"base-1\"\n showIcon=\"true\"\n [placeholder]=\"searchPlaceholder() | translate\"\n [value]=\"searchTerm\"\n (searchChange)=\"onSearch($event)\"\n />\n </div>\n <div class=\"si-layout-fixed-height text-pre-wrap text-break mt-6 bg-base-1 rounded-2\">\n @if (filteredWidgetCatalog.length > 0) {\n <span id=\"widget-catalog-list-description\" class=\"visually-hidden\">\n {{ labelWidgetCatalogList | translate }}\n </span>\n <ul\n class=\"si-layout-fixed-height list-group overflow-auto mb-0\"\n aria-labelledby=\"widget-catalog-list-description\"\n cdkListbox\n [cdkListboxValue]=\"[]\"\n (cdkListboxValueChange)=\"selectWidget($event.value[0])\"\n >\n @for (widget of filteredWidgetCatalog; track $index) {\n <li\n class=\"list-group-item list-group-item-action d-flex\"\n [cdkOption]=\"widget\"\n [class.active]=\"selected() === widget\"\n >\n <si-circle-status class=\"my-n4 me-5\" [icon]=\"widget.iconClass\" />\n <div class=\"d-flex flex-column align-items-start align-self-center\">\n <span class=\"si-h5\">{{ widget.name | translate }}</span>\n <span class=\"si-body\">{{ widget.description?.trim() | translate }}</span>\n </div>\n </li>\n }\n </ul>\n } @else {\n <div>\n <si-empty-state icon=\"element-report\" [heading]=\"labelEmpty\" />\n </div>\n }\n </div>\n </div>\n }\n <ng-container #editorHost />\n</div>\n\n<div class=\"catalog-footer pb-4 px-2\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">{{\n labelCancel | translate\n }}</button>\n @if (showPreviousButton()) {\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onPrevious()\">{{\n labelPrevious | translate\n }}</button>\n }\n @if (showNextButton()) {\n <button\n type=\"button\"\n class=\"btn\"\n [class.btn-primary]=\"view() === 'list'\"\n [class.btn-secondary]=\"view() !== 'list'\"\n [disabled]=\"disableNextButton()\"\n (click)=\"onNext()\"\n >{{ labelNext | translate }}</button\n >\n }\n @if (showAddButton()) {\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"disableAddButton()\"\n (click)=\"onAddWidget()\"\n >{{ labelAdd | translate }}</button\n >\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n inputBinding,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n outputBinding,\n signal,\n SimpleChanges,\n Type,\n viewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { MenuItem } from '@spike-rabbit/element-ng/common';\nimport { SiDashboardComponent } from '@spike-rabbit/element-ng/dashboard';\nimport { t } from '@spike-rabbit/element-translate-ng/translate';\nimport { BehaviorSubject, combineLatest, of, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport {\n Config,\n SI_DASHBOARD_CONFIGURATION,\n SI_DASHBOARD_TOOLBAR_ITEMS\n} from '../../model/configuration';\nimport { DashboardToolbarItem } from '../../model/si-dashboard-toolbar.model';\nimport { SI_WIDGET_STORE } from '../../model/si-widget-storage';\nimport { Widget, WidgetConfig } from '../../model/widgets.model';\nimport { SiDashboardToolbarComponent } from '../dashboard-toolbar/si-dashboard-toolbar.component';\nimport { SiGridComponent } from '../grid/si-grid.component';\nimport { SiWidgetCatalogComponent } from '../widget-catalog/si-widget-catalog.component';\nimport { SiWidgetInstanceEditorDialogComponent } from '../widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\n\n/**\n * Dashboard has three state: displaying the *dashboard* (default),\n * showing the *catalog* to add a new widget, or showing an *editor*\n * to edit an existing widget.\n */\ntype ViewState = 'dashboard' | 'catalog' | 'editor';\n\n/**\n * The component implements a dashboard with adding, removing and resizing widgets.\n * It consists and connects a toolbar, a grid with widgets, and a widget catalog.\n */\n@Component({\n selector: 'si-flexible-dashboard',\n imports: [SiDashboardComponent, SiDashboardToolbarComponent, SiGridComponent, AsyncPipe],\n templateUrl: './si-flexible-dashboard.component.html',\n styleUrl: './si-flexible-dashboard.component.scss',\n changeDetection: ChangeDetectionStrategy.Eager\n})\nexport class SiFlexibleDashboardComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Input to change the dashboard editable state.\n *\n * @defaultValue false\n */\n readonly editable = model(false);\n\n /**\n * Heading for the dashboard.\n */\n readonly heading = input<string>();\n\n /**\n * Optionally, provide a custom subclass of the SiWidgetCatalogComponent\n * to use your own catalog component.\n */\n readonly widgetCatalogComponent = input<Type<SiWidgetCatalogComponent>>();\n\n /**\n * Optionally, provide a custom subclass of the {@link SiWidgetInstanceEditorDialogComponent}\n * to use your own implementation.\n */\n readonly widgetInstanceEditorDialogComponent =\n input<Type<SiWidgetInstanceEditorDialogComponent>>();\n\n /**\n * Optionally, but it is recommended to include an id for a dashboard.\n * The id is utilized in the persistence calls on the {@link SiWidgetStorage}.\n */\n readonly dashboardId = input<string>();\n\n /**\n * Sets the available widgets for the widget catalog to the dashboard.\n *\n * @defaultValue [] */\n readonly widgetCatalog = input<Widget[]>([]);\n\n /**\n * Option to remove the add widget instance button from the primary toolbar.\n *\n * @defaultValue false\n */\n readonly hideAddWidgetInstanceButton = input(false);\n\n /**\n * Option to hide the dashboard edit button.\n *\n * @defaultValue false\n */\n readonly hideEditButton = input(false);\n\n /**\n * Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.\n *\n * @defaultValue false\n */\n readonly showEditButtonLabel = input(false);\n\n /**\n * Option to turn off the loading spinner on save and load operations.\n *\n * @defaultValue false\n */\n readonly hideProgressIndicator = input(false);\n\n /**\n * Option to configure a dashboard instance. Default is the optional value from\n * the {@link SI_DASHBOARD_CONFIGURATION}.\n *\n * @defaultValue inject(SI_DASHBOARD_CONFIGURATION)\n */\n readonly config = input<Config | undefined>(inject(SI_DASHBOARD_CONFIGURATION));\n\n /**\n * Placeholder text for the search input field in the widget catalog.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n * ```\n */\n readonly searchPlaceholder = input(\n t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`)\n );\n\n /**\n * Primary action menu items shown in the edit mode of the dashboard.\n * @defaultValue []\n */\n readonly primaryEditActions = input<DashboardToolbarItem[]>([]);\n\n /**\n * Secondary action menu items shown in the edit mode of the dashboard.\n * @defaultValue []\n */\n readonly secondaryEditActions = input<DashboardToolbarItem[]>([]);\n\n /**\n * The grid component is the actual container for the widgets.\n */\n readonly grid = viewChild.required<SiGridComponent>('grid');\n\n /** Property to access the dashboard component instance.\n */\n readonly dashboard = viewChild.required<SiDashboardComponent>('dashboard');\n\n /** The view child holds the container that hosts the widget catalog.\n */\n protected readonly catalogHost = viewChild.required('catalogHost', { read: ViewContainerRef });\n\n /**\n * Emits the modification state of the grid. It is `unmodified` when the visible state\n * is equal to the loaded state from the widget storage. When the user modifies the dashboard by\n * e.g. while moving the widgets, the dashboard is marked as `modified` and emits `true` and when the user\n * persists the change by saving, or reverts the state by canceling, the state is `unmodified`\n * again and emits `false`.\n */\n readonly isModified = output<boolean>();\n\n protected labelAddWidget = t(() => $localize`:@@DASHBOARD.ADD_WIDGET:Add widget`);\n protected labelEditor = t(() => $localize`:@@DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE:Edit`);\n protected labelCatalog = t(() => $localize`:@@DASHBOARD.WIDGET_LIBRARY.TITLE:Add widget`);\n\n protected addWidgetInstanceAction: DashboardToolbarItem = {\n type: 'action',\n label: this.labelAddWidget,\n action: () => this.showWidgetCatalog()\n };\n\n /**\n * The primary action menu items shown in the edit mode of the dashboard.\n */\n readonly primaryEditActions$ = new BehaviorSubject<(MenuItem | DashboardToolbarItem)[]>([\n this.addWidgetInstanceAction\n ]);\n /**\n * The secondary action menu items shown in the edit mode of the dashboard. When all menu items are more than\n * three, they will be placed in the secondary menu of the content action bar.\n */\n readonly secondaryEditActions$ = new BehaviorSubject<(MenuItem | DashboardToolbarItem)[]>([]);\n\n /**\n * @returns True, if the dashboard shows its widgets and not a catalog or and editor.\n */\n readonly isDashboardVisible = computed(() => this.viewState() === 'dashboard');\n\n /**\n * The page title of the dashboard, which is either {@link SiFlexibleDashboardComponent.heading} for the\n * default widget view or `DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE` or 'DASHBOARD.WIDGET_LIBRARY.TITLE' when\n * adding new or editing widgets.\n */\n readonly pageTitle = computed(() => {\n const viewState = this.viewState();\n switch (viewState) {\n case 'editor':\n return this.labelEditor;\n case 'catalog':\n return this.labelCatalog;\n default:\n return this.heading();\n }\n });\n\n private readonly viewState = signal<ViewState>('dashboard');\n private widgetStorage = inject(SI_WIDGET_STORE);\n private hideAddWidgetInstanceButton$ = new BehaviorSubject(this.hideAddWidgetInstanceButton());\n private dashboardId$ = new Subject<string | undefined>();\n private readonly toolbar = viewChild.required<SiDashboardToolbarComponent>('toolbar');\n private readonly globalEditActions = inject(SI_DASHBOARD_TOOLBAR_ITEMS, { optional: true }) ?? {\n primary: [],\n secondary: []\n };\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.dashboardId) {\n const dashboard = this.dashboard();\n if (dashboard.isExpanded) {\n dashboard.restore();\n }\n if (this.editable()) {\n this.editable.set(false);\n this.viewState.set('dashboard');\n this.catalogHost().clear();\n }\n this.dashboardId$.next(changes.dashboardId.currentValue);\n this.setupMenuItems();\n }\n\n if (changes.hideAddWidgetInstanceButton) {\n this.hideAddWidgetInstanceButton$.next(changes.hideAddWidgetInstanceButton.currentValue);\n }\n }\n\n ngOnInit(): void {\n this.setupMenuItems();\n }\n\n ngOnDestroy(): void {\n this.dashboardId$.next(undefined);\n }\n\n /**\n * Shows the widget catalog of the dashboard. If a widget instance is expanded\n * it restores the widget instances before.\n */\n showWidgetCatalog(): void {\n const dashboard = this.dashboard();\n if (dashboard.isExpanded) {\n dashboard.restore();\n }\n if (!this.editable()) {\n this.editable.set(true);\n }\n this.viewState.set('catalog');\n const componentType = this.widgetCatalogComponent() ?? SiWidgetCatalogComponent;\n const catalogRef = this.catalogHost().createComponent<SiWidgetCatalogComponent>(componentType, {\n bindings: [\n inputBinding('searchPlaceholder', this.searchPlaceholder),\n outputBinding<Omit<WidgetConfig, 'id'> | undefined>('closed', widgetConfig => {\n this.viewState.set('dashboard');\n this.catalogHost().clear();\n if (widgetConfig) {\n this.grid().addWidgetInstance(widgetConfig);\n }\n })\n ]\n });\n catalogRef.instance.widgetCatalog = this.widgetCatalog();\n }\n\n protected onModified(event: boolean): void {\n this.isModified.emit(event);\n this.toolbar().disableSaveButton.set(!event);\n }\n\n private setupMenuItems(): void {\n const primaryEditActions = [...this.primaryEditActions(), ...this.globalEditActions.primary];\n const secondaryEditActions = [\n ...this.secondaryEditActions(),\n ...this.globalEditActions.secondary\n ];\n const primaryMenuItems = primaryEditActions.length\n ? of(primaryEditActions)\n : this.widgetStorage.getToolbarMenuItems\n ? this.widgetStorage.getToolbarMenuItems(this.dashboardId()).primary\n : of([]);\n combineLatest([primaryMenuItems, this.hideAddWidgetInstanceButton$])\n .pipe(takeUntil(this.dashboardId$))\n .subscribe(([items, hideAddButton]) => this.setupPrimaryMenuItems(items, hideAddButton));\n\n const secondaryMenuItems = secondaryEditActions.length\n ? of(secondaryEditActions)\n : this.widgetStorage.getToolbarMenuItems\n ? this.widgetStorage.getToolbarMenuItems(this.dashboardId()).secondary\n : undefined;\n\n if (secondaryMenuItems) {\n secondaryMenuItems\n .pipe(takeUntil(this.dashboardId$))\n .subscribe(items => this.secondaryEditActions$.next(items));\n }\n }\n\n private setupPrimaryMenuItems(\n items: (MenuItem | DashboardToolbarItem)[],\n hideAddWidgetInstanceButton: boolean\n ): void {\n const next: (MenuItem | DashboardToolbarItem)[] = hideAddWidgetInstanceButton\n ? []\n : [this.addWidgetInstanceAction];\n next.push(...items);\n this.primaryEditActions$.next(next);\n }\n\n protected editWidgetInstance(widgetConfig: WidgetConfig): void {\n const dashboard = this.dashboard();\n if (dashboard.isExpanded) {\n dashboard.restore();\n }\n const widget = this.getWidget(widgetConfig.widgetId);\n const widgetInstanceEditorDialogComponent = this.widgetInstanceEditorDialogComponent();\n const componentType =\n widgetInstanceEditorDialogComponent ?? SiWidgetInstanceEditorDialogComponent;\n\n this.viewState.set('editor');\n this.catalogHost().createComponent<SiWidgetInstanceEditorDialogComponent>(componentType, {\n bindings: [\n inputBinding('widgetConfig', () => widgetConfig),\n inputBinding('widget', () => widget),\n outputBinding<WidgetConfig | undefined>('closed', editedWidgetConfig => {\n this.viewState.set('dashboard');\n this.catalogHost().clear();\n if (editedWidgetConfig) {\n this.grid().updateWidgetInstance(editedWidgetConfig);\n }\n })\n ]\n });\n }\n\n private getWidget(id: string): Widget | undefined {\n return this.widgetCatalog().find(widget => widget.id === id);\n }\n}\n","<si-dashboard #dashboard [heading]=\"pageTitle()\" [sticky]=\"true\">\n <si-dashboard-toolbar\n #toolbar\n menubar\n [class.d-none]=\"!isDashboardVisible()\"\n [primaryEditActions]=\"(primaryEditActions$ | async) ?? []\"\n [secondaryEditActions]=\"(secondaryEditActions$ | async) ?? []\"\n [disabled]=\"(grid.isLoading | async) ?? false\"\n [hideEditButton]=\"hideEditButton()\"\n [showEditButtonLabel]=\"showEditButtonLabel()\"\n [grid]=\"grid\"\n [(editable)]=\"editable\"\n (save)=\"grid.save()\"\n >\n <ng-content select=\"[filters-slot]\" filters-slot />\n </si-dashboard-toolbar>\n\n <div dashboard class=\"d-contents\">\n <si-grid\n #grid\n [class.d-none]=\"!isDashboardVisible()\"\n [gridConfig]=\"config()?.grid\"\n [dashboardId]=\"dashboardId()\"\n [widgetCatalog]=\"widgetCatalog()\"\n [hideProgressIndicator]=\"hideProgressIndicator()\"\n [widgetInstanceEditorDialogComponent]=\"widgetInstanceEditorDialogComponent()\"\n [emitWidgetInstanceEditEvents]=\"true\"\n [(editable)]=\"editable\"\n (isModified)=\"onModified($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n >\n <ng-content select=\"[empty-state]\" empty-state />\n </si-grid>\n <ng-container #catalogHost />\n </div>\n</si-dashboard>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { Widget, WidgetConfig } from '../../model/widgets.model';\nimport { SiWidgetHostComponent } from '../widget-host/si-widget-host.component';\n\n/**\n * A presentational (dumb) component that renders a single widget instance from a\n * {@link WidgetConfig} using the provided {@link Widget} definition. It delegates\n * the actual rendering to the {@link SiWidgetHostComponent}.\n *\n * **Intended Usage**\n *\n * This component renders an individual widget outside of a dashboard or grid,\n * without requiring manual host wiring. It is a self-contained widget cell that\n * can be placed anywhere a single widget needs to be shown, for example in kiosk\n * mode or within a custom layout such as a carousel.\n *\n * **Example**\n *\n * ```html\n * <!-- Render a single widget instance -->\n * <si-widget-renderer [widgetConfig]=\"widgetConfig\" [widget]=\"widget\" />\n * ```\n */\n@Component({\n selector: 'si-widget-renderer',\n imports: [SiWidgetHostComponent],\n templateUrl: './si-widget-renderer.component.html',\n styleUrl: './si-widget-renderer.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiWidgetRendererComponent {\n /** The configuration of the widget instance to render. */\n readonly widgetConfig = input.required<WidgetConfig>();\n\n /**\n * The {@link Widget} definition used to render the given {@link widgetConfig}.\n * It must match the config's `widgetId`.\n */\n readonly widget = input.required<Widget>();\n}\n","<si-widget-host\n class=\"h-100\"\n [widgetConfig]=\"widgetConfig()\"\n [componentFactory]=\"widget().componentFactory\"\n/>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef, Type } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n/**\n * Common factory configuration fields required for federated module loading.\n * @internal\n */\nexport interface FederationFactoryBase {\n exposedModule?: string;\n [key: string]: unknown;\n}\n\n/**\n * Module loaded from federation, containing exported components keyed by name.\n * @internal\n */\nexport type FederatedModuleExports<T> = Record<string, Type<T>>;\n\n/**\n * Options for handling federated module loading.\n */\ninterface FederatedModuleLoadOptions<T> {\n loadPromise: Promise<FederatedModuleExports<T> | null | undefined>;\n factory: FederationFactoryBase;\n componentName: string;\n host: ViewContainerRef;\n injector: Injector;\n environmentInjector: EnvironmentInjector;\n}\n\n/**\n * Formats an error message for failed module loading.\n */\nconst formatLoadingError = (factory: FederationFactoryBase, rejection: unknown): string =>\n rejection\n ? `Loading widget module ${factory.exposedModule} failed with ${String(rejection)}`\n : `Loading widget module ${factory.exposedModule} failed`;\n\n/**\n * Handles the result of a federated module loading promise.\n * This is the main utility function that encapsulates the common loading pattern\n * used across module-federation, native-federation, and mf-bridge loaders.\n *\n * @param options - Configuration options for loading and creating the component\n * @returns Observable that emits the ComponentRef once the component is created\n * @internal\n */\nexport const handleFederatedModuleLoad = <T>({\n loadPromise,\n factory,\n componentName,\n host,\n injector,\n environmentInjector\n}: FederatedModuleLoadOptions<T>): Observable<ComponentRef<T>> => {\n const result = new Subject<ComponentRef<T>>();\n\n loadPromise.then(\n module => {\n if (module) {\n const componentType = module[factory[componentName] as string];\n const widgetInstanceRef = host.createComponent<T>(componentType, {\n injector,\n environmentInjector\n });\n result.next(widgetInstanceRef);\n }\n result.complete();\n },\n rejection => result.error(formatLoadingError(factory, rejection))\n );\n\n return result;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiFlexibleDashboardComponent } from './components/flexible-dashboard/si-flexible-dashboard.component';\nimport { SiGridComponent } from './components/grid/si-grid.component';\nimport { SiWidgetCatalogComponent } from './components/widget-catalog/si-widget-catalog.component';\nimport { SiWidgetInstanceEditorDialogComponent } from './components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\n\n@NgModule({\n imports: [\n SiFlexibleDashboardComponent,\n SiGridComponent,\n SiWidgetCatalogComponent,\n SiWidgetInstanceEditorDialogComponent\n ],\n exports: [\n SiFlexibleDashboardComponent,\n SiGridComponent,\n SiWidgetCatalogComponent,\n SiWidgetInstanceEditorDialogComponent\n ]\n})\nexport class SiDashboardsNgModule {}\n\n/**\n * @deprecated Use {@link SiDashboardsNgModule} instead. The `Simpl` prefix is deprecated and will be removed in v51.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SimplDashboardsNgModule = SiDashboardsNgModule;\n\n/**\n * @deprecated Use {@link SiDashboardsNgModule} instead. The `Simpl` prefix is deprecated and will be removed in v51.\n */\nexport type SimplDashboardsNgModule = SiDashboardsNgModule;\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './components/flexible-dashboard/si-flexible-dashboard.component';\nexport * from './components/grid/si-grid.component';\nexport * from './components/widget-catalog/si-widget-catalog.component';\nexport * from './components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';\nexport * from './components/widget-renderer/si-widget-renderer.component';\n\nexport * from './model/configuration';\nexport * from './model/gridstack.model';\nexport * from './model/si-widget-storage';\nexport * from './model/widgets.model';\nexport * from './model/si-dashboard-toolbar.model';\nexport * from './model/si-widget-id-provider';\nexport * from './widget-loader';\nexport * from './services/federation-loader.util';\n\nexport * from '@spike-rabbit/dashboards-ng/translate';\nexport * from './public-api.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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