@spike-rabbit/dashboards-ng 49.0.0-next.1

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.
@@ -0,0 +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,yBAAyB,GAAqB;AACzD,IAAA,MAAM,EAAE,oBAAoB;AAC5B,IAAA,UAAU,EAAE,GAAG;AACf,IAAA,UAAU,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3E,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,MAAM,EAAE,GAAG;AACX,IAAA,gBAAgB,EAAE;;;AC3BpB;;;AAGG;AAaH;;;AAGG;MACU,0BAA0B,GAAG,IAAI,cAAc,CAC1D,0CAA0C,EAC1C;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,EAAE;AAC1E,CAAA;AAGH;;AAEG;AACI,MAAM,YAAY,GAAG;;AC/B5B;;;AAGG;AAQH;;;AAGG;AACI,MAAM,eAAe,GAAG,IAAI,cAAc,CAC/C,gEAAgE,EAChE,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,sBAAsB,EAAE,EAAE;AAGrE;;;;;AAKG;MACmB,eAAe,CAAA;AAqBnC;;;AAGG;AACH,IAAA,mBAAmB;AAIpB;AAED;;;AAGG;AACI,MAAM,WAAW,GAAG;AAE3B;;;;;;;;;;;AAWG;MACU,4BAA4B,GAAG,IAAI,cAAc,CAC5D,qCAAqC;AAGvC;;;;;AAKG;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