@siemens/dashboards-ng 47.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +230 -0
  3. package/assets/i18n/de.json +46 -0
  4. package/assets/i18n/en.json +46 -0
  5. package/components/dashboard-toolbar/si-dashboard-toolbar.component.d.ts +80 -0
  6. package/components/flexible-dashboard/si-flexible-dashboard.component.d.ts +151 -0
  7. package/components/grid/si-grid.component.d.ts +189 -0
  8. package/components/gridstack-wrapper/si-gridstack-wrapper.component.d.ts +70 -0
  9. package/components/web-component-wrapper/si-web-component-editor-wrapper.component.d.ts +27 -0
  10. package/components/web-component-wrapper/si-web-component-wrapper-base.component.d.ts +18 -0
  11. package/components/web-component-wrapper/si-web-component-wrapper.component.d.ts +27 -0
  12. package/components/widget-catalog/si-widget-catalog.component.d.ts +101 -0
  13. package/components/widget-host/si-widget-host.component.d.ts +80 -0
  14. package/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.d.ts +73 -0
  15. package/fesm2022/siemens-dashboards-ng-module-federation.mjs +37 -0
  16. package/fesm2022/siemens-dashboards-ng-module-federation.mjs.map +1 -0
  17. package/fesm2022/siemens-dashboards-ng-translate.mjs +21 -0
  18. package/fesm2022/siemens-dashboards-ng-translate.mjs.map +1 -0
  19. package/fesm2022/siemens-dashboards-ng.mjs +2184 -0
  20. package/fesm2022/siemens-dashboards-ng.mjs.map +1 -0
  21. package/index.d.ts +5 -0
  22. package/model/configuration.d.ts +22 -0
  23. package/model/gridstack.model.d.ts +15 -0
  24. package/model/si-dashboard-toolbar.model.d.ts +37 -0
  25. package/model/si-widget-storage.d.ts +78 -0
  26. package/model/widgets.model.d.ts +316 -0
  27. package/module-federation/index.d.ts +1 -0
  28. package/module-federation/package.json +3 -0
  29. package/package.json +51 -0
  30. package/public-api.d.ts +16 -0
  31. package/public-api.module.d.ts +38 -0
  32. package/services/si-grid.service.d.ts +17 -0
  33. package/template-i18n.json +35 -0
  34. package/translate/index.d.ts +6 -0
  35. package/translate/package.json +3 -0
  36. package/translate/si-translatable-keys.interface.d.ts +35 -0
  37. package/translate/si-translatable-overrides.provider.d.ts +7 -0
  38. package/widget-loader.d.ts +18 -0
@@ -0,0 +1,189 @@
1
+ import { OnChanges, OnDestroy, OnInit, SimpleChanges, Type } from '@angular/core';
2
+ import { SiLoadingService } from '@siemens/element-ng/loading-spinner';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { GridConfig } from '../../model/gridstack.model';
5
+ import { Widget, WidgetConfig } from '../../model/widgets.model';
6
+ import { GridWrapperEvent, SiGridstackWrapperComponent } from '../gridstack-wrapper/si-gridstack-wrapper.component';
7
+ import { SiWidgetInstanceEditorDialogComponent } from '../widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';
8
+ import * as i0 from "@angular/core";
9
+ export declare const NEW_WIDGET_PREFIX = "new-widget-";
10
+ /**
11
+ * The grid component is the actual component on which the widget instances are placed and visualized. You can think of
12
+ * a headless dashboard, without a title, toolbar or edit buttons.
13
+ */
14
+ export declare class SiGridComponent implements OnInit, OnChanges, OnDestroy {
15
+ private storeSubscription?;
16
+ private gridService;
17
+ private modalService;
18
+ private widgetStorage;
19
+ /**
20
+ * Configuration options for a grid instance. Default is the optional
21
+ * value from the {@link SI_DASHBOARD_CONFIGURATION}.
22
+ *
23
+ * @defaultValue inject(SI_DASHBOARD_CONFIGURATION)?.grid
24
+ */
25
+ readonly gridConfig: import("@angular/core").InputSignal<GridConfig | undefined>;
26
+ /**
27
+ * Sets the grid into editable mode, in which the widget instances can be moved,
28
+ * resized, removed or new ones added.
29
+ *
30
+ * @defaultValue false
31
+ */
32
+ readonly editable: import("@angular/core").ModelSignal<boolean>;
33
+ /**
34
+ * This is the internal owner of the current editable state and is used to track if
35
+ * editable or not. Not editable can be changed by either calling the `edit()` api
36
+ * method or by setting the `editable` input. When setting the input, the `ngOnChanges(...)`
37
+ * hook is used to call the `edit()` method. Similar, to get from editable to not editable,
38
+ * `cancel()` or `save()` is used and can be triggered from `ngOnChanges(...)`.
39
+ */
40
+ private editableInternal;
41
+ /**
42
+ * An optional, but recommended dashboard id that is used in persistence and passed
43
+ * to the widget store for saving and loading data.
44
+ */
45
+ readonly dashboardId: import("@angular/core").InputSignal<string | undefined>;
46
+ /**
47
+ * Provides the available widgets to the grid. When loading the widget configurations from
48
+ * the storage, we need to have the widget definition available to be able to create the widget
49
+ * instances on the grid.
50
+ *
51
+ * @defaultValue [] */
52
+ readonly widgetCatalog: import("@angular/core").InputSignal<Widget[]>;
53
+ /**
54
+ * When the user clicks edit on a widget instance, an editor need to appear and the
55
+ * widget editor component need to be loaded. When the grid is used standalone, it
56
+ * takes care and opens a modal dialog and loads the configured widget editor component.
57
+ * When the grid is used in a container like the flexible dashboard, the container manages
58
+ * where the widget instance editor is displayed. In this case this options prevents the grid
59
+ * from showing the editor in the dialog, and emits on `widgetInstanceEdit` on clicking the
60
+ * widget `edit` action.
61
+ *
62
+ * @defaultValue false */
63
+ readonly emitWidgetInstanceEditEvents: import("@angular/core").InputSignal<boolean>;
64
+ /**
65
+ * Option to turn off the loading spinner on save and load operations.
66
+ *
67
+ * @defaultValue false
68
+ */
69
+ readonly hideProgressIndicator: import("@angular/core").InputSignal<boolean>;
70
+ /**
71
+ * Option to configure a custom widget instance editor dialog component. The component provides the
72
+ * editor hosting and the buttons to save and cancel.
73
+ */
74
+ readonly widgetInstanceEditorDialogComponent: import("@angular/core").InputSignal<Type<SiWidgetInstanceEditorDialogComponent> | undefined>;
75
+ /**
76
+ * Emits the modification state of the grid. It is `unmodified` when the visible state
77
+ * is equal to the loaded state from the widget storage. When the user modifies the dashboard by
78
+ * e.g. while moving the widgets, the dashboard is marked as `modified` and emits `true` and when the user
79
+ * persists the change by saving, or reverts the state by canceling, the state is `unmodified`
80
+ * again and emits `false`.
81
+ */
82
+ readonly isModified: import("@angular/core").OutputEmitterRef<boolean>;
83
+ /**
84
+ * Modified state that is emitted in the `isModified` output. Should only be
85
+ changed using the {@link setModified} method.
86
+ */
87
+ private modified;
88
+ /**
89
+ * Emits to notify about edit events of widget instances. Only emits
90
+ * if `emitWidgetInstanceEditEvents` is set to `true`.
91
+ */
92
+ readonly widgetInstanceEdit: import("@angular/core").OutputEmitterRef<WidgetConfig>;
93
+ /**
94
+ * All widget configuration objects of the visible widget instances.
95
+ *
96
+ * @internal
97
+ */
98
+ readonly visibleWidgetInstances$: BehaviorSubject<WidgetConfig[]>;
99
+ /**
100
+ * All widget instance configs that are on the grid by loading from the widget
101
+ * storage. Thus, these widget are persisted.
102
+ *
103
+ * @defaultValue []
104
+ * @internal
105
+ */
106
+ persistedWidgetInstances: WidgetConfig[];
107
+ /**
108
+ * Widget instance configs that are added to the grid in edit mode, but not
109
+ * persisted yet, as the user did not confirm the modification by save.
110
+ *
111
+ * @defaultValue []
112
+ * @internal
113
+ */
114
+ transientWidgetInstances: WidgetConfig[];
115
+ /**
116
+ * All widget instance configurations that are removed from the grid in edit mode.
117
+ * These instances are persistently removed on save or re-added again on cancel.
118
+ *
119
+ * @defaultValue []
120
+ * @internal
121
+ */
122
+ markedForRemoval: WidgetConfig[];
123
+ /** @defaultValue viewChild.required(SiGridstackWrapperComponent) */
124
+ readonly gridStackWrapper: import("@angular/core").Signal<SiGridstackWrapperComponent>;
125
+ /**
126
+ * Service used to indicate load and save indication.
127
+ * @deprecated Use `isLoading` instead.
128
+ *
129
+ * @defaultValue inject(SiLoadingService)
130
+ */
131
+ loadingService: SiLoadingService;
132
+ /**
133
+ * Indication for load and save operations.
134
+ */
135
+ readonly isLoading: BehaviorSubject<boolean>;
136
+ protected initialLoad: boolean;
137
+ protected get showEmptyState(): boolean;
138
+ ngOnChanges(changes: SimpleChanges): void;
139
+ ngOnInit(): void;
140
+ ngOnDestroy(): void;
141
+ /**
142
+ * Set dashboard grid in editable mode to modify widget instances.
143
+ */
144
+ edit(): void;
145
+ /**
146
+ * Persists the current widget instances to the widget storage and
147
+ * changes the editable and isModified modes.
148
+ */
149
+ save(): void;
150
+ /**
151
+ * Cancel current changes and restore last saved state.
152
+ */
153
+ cancel(): void;
154
+ /**
155
+ * Adds a new widget instance configuration to the dashboard grid. It is not
156
+ * persisted yet and is added to the transient widget instances.
157
+ *
158
+ * @param widgetInstanceConfig - The new widget configuration.
159
+ */
160
+ addWidgetInstance(widgetInstanceConfig: Omit<WidgetConfig, 'id'>): void;
161
+ /**
162
+ * Removes a widget instance from the visible widgets and puts it in the
163
+ * {@link markedForRemoval} array.
164
+ *
165
+ * @param widgetInstanceId - The id of the widget instance to be removed.
166
+ */
167
+ removeWidgetInstance(widgetInstanceId: string): void;
168
+ /**
169
+ * Opens the provided widget configuration in the related editor or
170
+ * emits on {@link widgetInstanceEdit}, if {@link emitWidgetInstanceEditEvents}
171
+ * is true.
172
+ *
173
+ * @param widgetInstanceConfig - The config of the widget instance to edit.
174
+ */
175
+ editWidgetInstance(widgetInstanceConfig: WidgetConfig): void;
176
+ /**
177
+ * Updates the visible widgets with an updated configuration. Will update the
178
+ * user interface and emit on {@link isModified}.
179
+ *
180
+ * @param editedWidgetConfig - The config of the widget instance that was updated.
181
+ */
182
+ updateWidgetInstance(editedWidgetConfig: WidgetConfig): void;
183
+ protected handleGridEvent(event: GridWrapperEvent): void;
184
+ private loadAndSubscribeWidgets;
185
+ private updateWidgetPositions;
186
+ private setModified;
187
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiGridComponent, never>;
188
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiGridComponent, "si-grid", never, { "gridConfig": { "alias": "gridConfig"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "dashboardId": { "alias": "dashboardId"; "required": false; "isSignal": true; }; "widgetCatalog": { "alias": "widgetCatalog"; "required": false; "isSignal": true; }; "emitWidgetInstanceEditEvents": { "alias": "emitWidgetInstanceEditEvents"; "required": false; "isSignal": true; }; "hideProgressIndicator": { "alias": "hideProgressIndicator"; "required": false; "isSignal": true; }; "widgetInstanceEditorDialogComponent": { "alias": "widgetInstanceEditorDialogComponent"; "required": false; "isSignal": true; }; }, { "editable": "editableChange"; "isModified": "isModified"; "widgetInstanceEdit": "widgetInstanceEdit"; }, never, ["[empty-state]"], true, never>;
189
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { OnChanges, OnDestroy, OnInit, SimpleChanges, ViewContainerRef } from '@angular/core';
6
+ import { GridItemHTMLElement, GridStack, GridStackNode } from 'gridstack';
7
+ import { GridConfig } from '../../model/gridstack.model';
8
+ import { WidgetConfig, WidgetPositionConfig } from '../../model/widgets.model';
9
+ import * as i0 from "@angular/core";
10
+ export interface GridWrapperEvent {
11
+ event: Event;
12
+ items?: GridStackNode[];
13
+ grid: GridStack;
14
+ el?: GridItemHTMLElement;
15
+ }
16
+ export declare class SiGridstackWrapperComponent implements OnInit, OnChanges, OnDestroy {
17
+ /**
18
+ * Grid items to render inside the gridstack
19
+ *
20
+ * @defaultValue []
21
+ */
22
+ readonly widgetConfigs: import("@angular/core").InputSignal<WidgetConfig[]>;
23
+ /**
24
+ * Whenever gridstack allows to drag, resize or delete the grid item
25
+ *
26
+ * @defaultValue false
27
+ */
28
+ readonly editable: import("@angular/core").InputSignal<boolean>;
29
+ /**
30
+ * Module configuration
31
+ */
32
+ readonly gridConfig: import("@angular/core").InputSignal<GridConfig | undefined>;
33
+ /**
34
+ * Emits dashboard grid events.
35
+ */
36
+ readonly gridEvent: import("@angular/core").OutputEmitterRef<GridWrapperEvent>;
37
+ /**
38
+ * Emits the id of a widget instance that shall be removed.
39
+ */
40
+ readonly widgetInstanceRemove: import("@angular/core").OutputEmitterRef<string>;
41
+ /**
42
+ * Emits the id of a widget instance that shall be edited.
43
+ */
44
+ readonly widgetInstanceEdit: import("@angular/core").OutputEmitterRef<WidgetConfig>;
45
+ readonly gridstackContainer: import("@angular/core").Signal<ViewContainerRef | undefined>;
46
+ private grid;
47
+ private markedForRender;
48
+ private gridItems;
49
+ private readonly itemIdAttr;
50
+ private widgetIdSubscriptionMap;
51
+ private ngZone;
52
+ private elementRef;
53
+ ngOnChanges(changes: SimpleChanges): void;
54
+ ngOnInit(): void;
55
+ ngOnDestroy(): void;
56
+ mount(items: WidgetConfig[]): void;
57
+ unmount(items: WidgetConfig[]): void;
58
+ getLayout(): WidgetPositionConfig[];
59
+ private updateLayout;
60
+ private addToView;
61
+ private removeFromView;
62
+ /**
63
+ * GridItemComponents are created dynamically, change detection won't trigger as there is no \@Input binding.
64
+ * We have to update instance and run ChangeDetectionRef manually.
65
+ */
66
+ private updateViewComponents;
67
+ private hookEvents;
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiGridstackWrapperComponent, never>;
69
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiGridstackWrapperComponent, "si-gridstack-wrapper", never, { "widgetConfigs": { "alias": "widgetConfigs"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "gridConfig": { "alias": "gridConfig"; "required": false; "isSignal": true; }; }, { "gridEvent": "gridEvent"; "widgetInstanceRemove": "widgetInstanceRemove"; "widgetInstanceEdit": "widgetInstanceEdit"; }, never, never, true, never>;
70
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { AfterViewInit, OnDestroy } from '@angular/core';
6
+ import { Subject } from 'rxjs';
7
+ import { WidgetConfig, WidgetConfigStatus, WidgetInstanceEditor, WidgetInstanceEditorWizard, WidgetInstanceEditorWizardState } from '../../model/widgets.model';
8
+ import { SiWebComponentWrapperBaseComponent } from './si-web-component-wrapper-base.component';
9
+ import * as i0 from "@angular/core";
10
+ export declare class SiWebComponentEditorWrapperComponent extends SiWebComponentWrapperBaseComponent implements WidgetInstanceEditor, WidgetInstanceEditorWizard, AfterViewInit, OnDestroy {
11
+ state: WidgetInstanceEditorWizardState;
12
+ stateChange: Subject<WidgetInstanceEditorWizardState>;
13
+ configChange: Subject<WidgetConfig | Omit<WidgetConfig, "id">>;
14
+ /**
15
+ * This will be set when setupWidgetInstanceEditor is executed
16
+ */
17
+ statusChangesHandler?: (statusChanges: Partial<WidgetConfigStatus>) => void;
18
+ private webComponentEventListener;
19
+ private webComponentStateChangeListener;
20
+ private webComponentStatusChangesListener;
21
+ ngAfterViewInit(): void;
22
+ ngOnDestroy(): void;
23
+ next(): void;
24
+ previous(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiWebComponentEditorWrapperComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiWebComponentEditorWrapperComponent, "si-web-component-editor-wrapper", never, {}, {}, never, never, true, never>;
27
+ }
@@ -0,0 +1,18 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import { WidgetConfig } from '../../model/widgets.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SiWebComponentWrapperBaseComponent implements AfterViewInit {
5
+ private _config;
6
+ get config(): WidgetConfig;
7
+ set config(config: WidgetConfig);
8
+ elementTagName: string;
9
+ url: string;
10
+ protected webComponentHost: ElementRef;
11
+ protected webComponent?: HTMLElement;
12
+ private renderer2;
13
+ private document;
14
+ ngAfterViewInit(): void;
15
+ private isScriptLoaded;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiWebComponentWrapperBaseComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiWebComponentWrapperBaseComponent, "ng-component", never, { "config": { "alias": "config"; "required": false; }; "elementTagName": { "alias": "elementTagName"; "required": false; }; "url": { "alias": "url"; "required": false; }; }, {}, never, never, true, never>;
18
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { AfterViewInit, EventEmitter, OnDestroy } from '@angular/core';
6
+ import { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';
7
+ import { ContentActionBarMainItem } from '@siemens/element-ng/content-action-bar';
8
+ import { MenuItem } from '@siemens/element-ng/menu';
9
+ import { WidgetConfigEvent, WidgetInstance } from '../../model/widgets.model';
10
+ import { SiWebComponentWrapperBaseComponent } from './si-web-component-wrapper-base.component';
11
+ import * as i0 from "@angular/core";
12
+ export declare class SiWebComponentWrapperComponent extends SiWebComponentWrapperBaseComponent implements WidgetInstance, AfterViewInit, OnDestroy {
13
+ private _editable?;
14
+ get editable(): boolean;
15
+ set editable(editable: boolean);
16
+ primaryActions?: (MenuItemLegacy | ContentActionBarMainItem)[];
17
+ secondaryActions?: (MenuItemLegacy | MenuItem)[];
18
+ primaryEditActions?: (MenuItemLegacy | ContentActionBarMainItem)[];
19
+ secondaryEditActions?: (MenuItemLegacy | MenuItem)[];
20
+ configChange: EventEmitter<WidgetConfigEvent>;
21
+ private webComponentEventListener;
22
+ ngAfterViewInit(): void;
23
+ ngOnDestroy(): void;
24
+ private configChanged;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiWebComponentWrapperComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiWebComponentWrapperComponent, "si-web-component-wrapper", never, { "editable": { "alias": "editable"; "required": false; }; }, {}, never, never, true, never>;
27
+ }
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
6
+ import { Widget, WidgetConfig } from '../../model/widgets.model';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Default widget catalog implementation to show all available widgets that can be added
10
+ * to a dashboard. It consists of a list view, that lists all available widgets and after
11
+ * selection, a host in which the widget specific editor is loaded. Applications can either
12
+ * stay with the default catalog or implement their own by extending this class.
13
+ */
14
+ export declare class SiWidgetCatalogComponent implements OnInit, OnDestroy {
15
+ /**
16
+ * Placeholder text for the search input field in the widget catalog.
17
+ *
18
+ * @defaultValue
19
+ * ```
20
+ * $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`
21
+ * ```
22
+ */
23
+ readonly searchPlaceholder: import("@angular/core").InputSignal<import("@siemens/element-translate-ng/translate").TranslatableString>;
24
+ /**
25
+ * Emits when the catalog is `closed`, either by canceling or by adding or saving
26
+ * a widget configuration. On cancel `undefined` is emitted, otherwise the related
27
+ * widget configuration is emitted.
28
+ */
29
+ readonly closed: import("@angular/core").OutputEmitterRef<Omit<WidgetConfig, "id"> | undefined>;
30
+ /**
31
+ * View defines if the catalog widget list or the widget editor is visible.
32
+ *
33
+ * @internal
34
+ * @defaultValue 'list'
35
+ */
36
+ readonly view: import("@angular/core").WritableSignal<"list" | "editor" | "editor-only">;
37
+ protected readonly editorHost: import("@angular/core").Signal<ViewContainerRef>;
38
+ /**
39
+ * Property to provide the available widgets to the catalog. The flexible
40
+ * dashboard creates the catalog by Angular's `createComponent()` method
41
+ * and sets the available widgets to this attribute.
42
+ *
43
+ * @defaultValue [] */
44
+ widgetCatalog: Widget[];
45
+ /**
46
+ * Holds the search term from the catalog to be visible when going back
47
+ * by pressing the previous button from the widget edit view.
48
+ */
49
+ protected searchTerm: string;
50
+ /**
51
+ * Array used to hold the search result on the widget catalog.
52
+ * @defaultValue [] */
53
+ protected filteredWidgetCatalog: Widget[];
54
+ protected readonly selected: import("@angular/core").WritableSignal<Widget | undefined>;
55
+ private widgetConfig?;
56
+ private readonly hasEditor;
57
+ protected labelCancel: import("@siemens/element-translate-ng/translate").TranslatableString;
58
+ protected labelPrevious: import("@siemens/element-translate-ng/translate").TranslatableString;
59
+ protected labelNext: import("@siemens/element-translate-ng/translate").TranslatableString;
60
+ protected labelAdd: import("@siemens/element-translate-ng/translate").TranslatableString;
61
+ protected labelEmpty: import("@siemens/element-translate-ng/translate").TranslatableString;
62
+ protected labelDialogHeading: import("@siemens/element-translate-ng/translate").TranslatableString;
63
+ protected labelDialogCancel: import("@siemens/element-translate-ng/translate").TranslatableString;
64
+ protected labelDialogMessage: import("@siemens/element-translate-ng/translate").TranslatableString;
65
+ protected labelDialogDiscard: import("@siemens/element-translate-ng/translate").TranslatableString;
66
+ protected readonly showAddButton: import("@angular/core").Signal<boolean>;
67
+ protected readonly showNextButton: import("@angular/core").Signal<boolean>;
68
+ protected readonly showPreviousButton: import("@angular/core").Signal<boolean>;
69
+ protected readonly disableAddButton: import("@angular/core").Signal<boolean>;
70
+ protected readonly disableNextButton: import("@angular/core").Signal<boolean>;
71
+ /** Indicates if the current config is valid or not. If invalid, the add button is disabled. */
72
+ private readonly invalidConfig;
73
+ /**
74
+ * Marks the widget configuration as modified. Is set when widget editor instance
75
+ * emits configChange events. Triggers edit discard confirmation dialog when widget config
76
+ * is modified but not added to the dashboard.
77
+ * */
78
+ private widgetConfigModified;
79
+ private widgetInstanceEditor?;
80
+ private readonly editorWizardState;
81
+ private widgetInstanceEditorRef?;
82
+ private subscriptions;
83
+ private dialogService;
84
+ private injector;
85
+ private envInjector;
86
+ ngOnInit(): void;
87
+ ngOnDestroy(): void;
88
+ protected onSearch(searchTerm?: string): void;
89
+ protected onCancel(): void;
90
+ protected onNext(): void;
91
+ protected onPrevious(): void;
92
+ private setupWidgetInstanceEditor;
93
+ private tearDownEditor;
94
+ private setupCatalog;
95
+ protected onAddWidget(): void;
96
+ protected selectWidget(widget?: Widget): void;
97
+ private isEditorWizdard;
98
+ private handleStatusChanges;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiWidgetCatalogComponent, never>;
100
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiWidgetCatalogComponent, "si-widget-catalog", never, { "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
101
+ }
@@ -0,0 +1,80 @@
1
+ import { ComponentRef, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import type { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';
3
+ import { ContentActionBarMainItem, ViewType } from '@siemens/element-ng/content-action-bar';
4
+ import { SiDashboardCardComponent } from '@siemens/element-ng/dashboard';
5
+ import { MenuItem } from '@siemens/element-ng/menu';
6
+ import { WidgetConfig, WidgetConfigEvent, WidgetInstance } from '../../model/widgets.model';
7
+ import * as i0 from "@angular/core";
8
+ export declare class SiWidgetHostComponent implements OnInit, OnDestroy, OnChanges {
9
+ private siModal;
10
+ private gridService;
11
+ private injector;
12
+ private envInjector;
13
+ private unsubscribe;
14
+ readonly widgetConfig: import("@angular/core").InputSignal<WidgetConfig>;
15
+ readonly remove: import("@angular/core").OutputEmitterRef<string>;
16
+ readonly edit: import("@angular/core").OutputEmitterRef<WidgetConfig>;
17
+ readonly initCompleted: import("@angular/core").OutputEmitterRef<void>;
18
+ readonly card: import("@angular/core").Signal<SiDashboardCardComponent>;
19
+ readonly widgetHost: import("@angular/core").Signal<ViewContainerRef>;
20
+ protected labelEdit: import("@siemens/element-translate-ng/translate-types").TranslatableString;
21
+ protected labelRemove: import("@siemens/element-translate-ng/translate-types").TranslatableString;
22
+ protected labelExpand: import("@siemens/element-translate-ng/translate-types").TranslatableString;
23
+ protected labelRestore: import("@siemens/element-translate-ng/translate-types").TranslatableString;
24
+ protected labelDialogMessage: import("@siemens/element-translate-ng/translate-types").TranslatableString;
25
+ protected labelDialogHeading: import("@siemens/element-translate-ng/translate-types").TranslatableString;
26
+ protected labelDialogRemove: import("@siemens/element-translate-ng/translate-types").TranslatableString;
27
+ protected labelDialogCancel: import("@siemens/element-translate-ng/translate-types").TranslatableString;
28
+ widgetInstance?: WidgetInstance;
29
+ widgetRef?: ComponentRef<WidgetInstance>;
30
+ /** @defaultValue [] */
31
+ primaryActions: (MenuItemLegacy | ContentActionBarMainItem)[];
32
+ /** @defaultValue [] */
33
+ secondaryActions: (MenuItemLegacy | MenuItem)[];
34
+ /** @defaultValue 'expanded' */
35
+ actionBarViewType: ViewType;
36
+ editable$: import("rxjs").BehaviorSubject<boolean>;
37
+ /** @defaultValue [] */
38
+ editablePrimaryActions: (MenuItemLegacy | ContentActionBarMainItem)[];
39
+ /** @defaultValue [] */
40
+ editableSecondaryActions: (MenuItemLegacy | MenuItem)[];
41
+ /**
42
+ * @defaultValue
43
+ * ```
44
+ * {
45
+ * type: 'action',
46
+ * label: this.labelEdit,
47
+ * icon: 'element-edit',
48
+ * iconOnly: true,
49
+ * action: () => this.onEdit()
50
+ * }
51
+ * ```
52
+ */
53
+ editAction: ContentActionBarMainItem;
54
+ /**
55
+ * @defaultValue
56
+ * ```
57
+ * {
58
+ * type: 'action',
59
+ * label: this.labelRemove,
60
+ * icon: 'element-delete',
61
+ * iconOnly: true,
62
+ * action: () => this.onRemove()
63
+ * }
64
+ * ```
65
+ */
66
+ removeAction: ContentActionBarMainItem;
67
+ protected widgetInstanceFooter?: TemplateRef<unknown>;
68
+ protected get accentLine(): string;
69
+ ngOnChanges(changes: SimpleChanges): void;
70
+ ngOnInit(): void;
71
+ ngOnDestroy(): void;
72
+ private attachWidgetInstance;
73
+ setupEditable(editable: boolean, widgetConfig?: WidgetConfigEvent): void;
74
+ private doRemove;
75
+ private isEditable;
76
+ onEdit(): void;
77
+ onRemove(): void;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiWidgetHostComponent, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiWidgetHostComponent, "si-widget-host", never, { "widgetConfig": { "alias": "widgetConfig"; "required": true; "isSignal": true; }; }, { "remove": "remove"; "edit": "edit"; "initCompleted": "initCompleted"; }, never, never, true, never>;
80
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
6
+ import { Widget, WidgetConfig } from '../../model/widgets.model';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * The Dialog component is utilized when editing a widget instance within a dashboard.
10
+ * It dynamically loads and creates the associated widget editor and incorporates it
11
+ * into its content. The dialog component is accountable for interacting with the dashboard
12
+ * and offers options for saving changes or terminating the editing process.
13
+ */
14
+ export declare class SiWidgetInstanceEditorDialogComponent implements OnInit, OnDestroy {
15
+ /**
16
+ * Input for the widget instance configuration. It is used to populate the
17
+ * widget editor.
18
+ */
19
+ readonly widgetConfig: import("@angular/core").ModelSignal<WidgetConfig>;
20
+ /**
21
+ * Input for the widget definition. It is required to retrieve the component
22
+ * factory to instantiate the widget editor.
23
+ */
24
+ readonly widget: import("@angular/core").InputSignal<Widget>;
25
+ /**
26
+ * Emits the edited widget instance configuration if the user confirms by
27
+ * saving, or `undefined` if the user cancels the dialog.
28
+ */
29
+ readonly closed: import("@angular/core").OutputEmitterRef<WidgetConfig | undefined>;
30
+ /**
31
+ * Emits when the editor instantiation is completed.
32
+ */
33
+ readonly editorSetupCompleted: import("@angular/core").OutputEmitterRef<void>;
34
+ protected readonly editorHost: import("@angular/core").Signal<ViewContainerRef>;
35
+ /** Indicates if the current config is valid or not. If invalid, the save button will be disabled. */
36
+ protected readonly invalidConfig: import("@angular/core").WritableSignal<boolean>;
37
+ protected readonly showNextButton: import("@angular/core").Signal<boolean>;
38
+ protected readonly disableNextButton: import("@angular/core").Signal<boolean>;
39
+ protected readonly showPreviousButton: import("@angular/core").Signal<boolean>;
40
+ protected readonly disablePreviousButton: import("@angular/core").Signal<boolean>;
41
+ protected labelSave: import("@siemens/element-translate-ng/translate").TranslatableString;
42
+ protected labelCancel: import("@siemens/element-translate-ng/translate").TranslatableString;
43
+ protected labelPrevious: import("@siemens/element-translate-ng/translate").TranslatableString;
44
+ protected labelNext: import("@siemens/element-translate-ng/translate").TranslatableString;
45
+ protected labelDialogMessage: import("@siemens/element-translate-ng/translate").TranslatableString;
46
+ protected labelDialogHeading: import("@siemens/element-translate-ng/translate").TranslatableString;
47
+ protected labelDialogSave: import("@siemens/element-translate-ng/translate").TranslatableString;
48
+ protected labelDialogDiscard: import("@siemens/element-translate-ng/translate").TranslatableString;
49
+ protected labelDialogCancel: import("@siemens/element-translate-ng/translate").TranslatableString;
50
+ /**
51
+ * Marks the widget configuration as modified. Is set when widget editor instance
52
+ * emits configChange events. Triggers edit discard confirmation dialog when widget config
53
+ * is modified but not dialog is canceled.
54
+ * */
55
+ private readonly widgetConfigModified;
56
+ private widgetInstanceEditor?;
57
+ private readonly editorWizardState;
58
+ private subscriptions;
59
+ private injector;
60
+ private envInjector;
61
+ private dialogService;
62
+ ngOnInit(): void;
63
+ ngOnDestroy(): void;
64
+ protected onCancel(): void;
65
+ protected onNext(): void;
66
+ protected onPrevious(): void;
67
+ protected onSave(): void;
68
+ private tearDownEditor;
69
+ private isEditorWizdard;
70
+ private handleStatusChanges;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiWidgetInstanceEditorDialogComponent, never>;
72
+ static ɵcmp: i0.ɵɵComponentDeclaration<SiWidgetInstanceEditorDialogComponent, "si-widget-instance-editor-dialog", never, { "widgetConfig": { "alias": "widgetConfig"; "required": true; "isSignal": true; }; "widget": { "alias": "widget"; "required": true; "isSignal": true; }; }, { "widgetConfig": "widgetConfigChange"; "closed": "closed"; "editorSetupCompleted": "editorSetupCompleted"; }, never, never, true, never>;
73
+ }
@@ -0,0 +1,37 @@
1
+ import { loadRemoteModule } from '@angular-architects/module-federation';
2
+ import { widgetFactoryRegistry } from '@siemens/dashboards-ng';
3
+ import { Subject } from 'rxjs';
4
+
5
+ /**
6
+ * Copyright (c) Siemens 2016 - 2025
7
+ * SPDX-License-Identifier: MIT
8
+ */
9
+ const setupRemoteComponent = (factory, componentName, host, injector, environmentInjector) => {
10
+ const result = new Subject();
11
+ loadRemoteModule(factory).then((module) => {
12
+ const componentType = module[factory[componentName]];
13
+ const widgetInstanceRef = host.createComponent(componentType, {
14
+ injector,
15
+ environmentInjector
16
+ });
17
+ result.next(widgetInstanceRef);
18
+ result.complete();
19
+ }, rejection => {
20
+ const msg = rejection
21
+ ? `Loading widget module ${factory.exposedModule} failed with ${JSON.stringify(rejection.toString())}`
22
+ : `Loading widget module ${factory.exposedModule} failed`;
23
+ result.error(msg);
24
+ result.complete();
25
+ });
26
+ return result;
27
+ };
28
+ const registerModuleFederatedWidgetLoader = () => {
29
+ widgetFactoryRegistry.register('module-federation', setupRemoteComponent);
30
+ };
31
+
32
+ /**
33
+ * Generated bundle index. Do not edit.
34
+ */
35
+
36
+ export { registerModuleFederatedWidgetLoader };
37
+ //# sourceMappingURL=siemens-dashboards-ng-module-federation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"siemens-dashboards-ng-module-federation.mjs","sources":["../../../../projects/dashboards-ng/module-federation/index.ts","../../../../projects/dashboards-ng/module-federation/siemens-dashboards-ng-module-federation.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef } from '@angular/core';\nimport { FederatedModule, SetupComponentFn, widgetFactoryRegistry } from '@siemens/dashboards-ng';\nimport { Observable, Subject } from 'rxjs';\n\nconst setupRemoteComponent = <T>(\n factory: FederatedModule,\n componentName: string,\n host: ViewContainerRef,\n injector: Injector,\n environmentInjector: EnvironmentInjector\n): Observable<ComponentRef<T>> => {\n const result = new Subject<ComponentRef<T>>();\n\n loadRemoteModule(factory).then(\n (module: any) => {\n const componentType = module[factory[componentName]];\n const widgetInstanceRef = host.createComponent<T>(componentType, {\n injector,\n environmentInjector\n });\n result.next(widgetInstanceRef);\n result.complete();\n },\n rejection => {\n const msg = rejection\n ? `Loading widget module ${factory.exposedModule} failed with ${JSON.stringify(\n rejection.toString()\n )}`\n : `Loading widget module ${factory.exposedModule} failed`;\n result.error(msg);\n result.complete();\n }\n );\n return result;\n};\n\nexport const registerModuleFederatedWidgetLoader = (): void => {\n widgetFactoryRegistry.register('module-federation', setupRemoteComponent as SetupComponentFn);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;AAMH,MAAM,oBAAoB,GAAG,CAC3B,OAAwB,EACxB,aAAqB,EACrB,IAAsB,EACtB,QAAkB,EAClB,mBAAwC,KACT;AAC/B,IAAA,MAAM,MAAM,GAAG,IAAI,OAAO,EAAmB;IAE7C,gBAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,CAC5B,CAAC,MAAW,KAAI;QACd,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AACpD,QAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAI,aAAa,EAAE;YAC/D,QAAQ;YACR;AACD,SAAA,CAAC;AACF,QAAA,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;QAC9B,MAAM,CAAC,QAAQ,EAAE;KAClB,EACD,SAAS,IAAG;QACV,MAAM,GAAG,GAAG;AACV,cAAE,CAAA,sBAAA,EAAyB,OAAO,CAAC,aAAa,CAAgB,aAAA,EAAA,IAAI,CAAC,SAAS,CAC1E,SAAS,CAAC,QAAQ,EAAE,CACrB,CAAE;AACL,cAAE,CAAyB,sBAAA,EAAA,OAAO,CAAC,aAAa,SAAS;AAC3D,QAAA,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QACjB,MAAM,CAAC,QAAQ,EAAE;AACnB,KAAC,CACF;AACD,IAAA,OAAO,MAAM;AACf,CAAC;AAEM,MAAM,mCAAmC,GAAG,MAAW;AAC5D,IAAA,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,EAAE,oBAAwC,CAAC;AAC/F;;AC3CA;;AAEG;;;;"}
@@ -0,0 +1,21 @@
1
+ import { SI_TRANSLATABLE_VALUES } from '@siemens/element-translate-ng/translate';
2
+
3
+ /* eslint-disable */
4
+
5
+ const provideSiDashboardsTranslatableOverrides = values => ({
6
+ useValue: values,
7
+ multi: true,
8
+ provide: SI_TRANSLATABLE_VALUES
9
+ });
10
+
11
+ /**
12
+ * Copyright (c) Siemens 2016 - 2025
13
+ * SPDX-License-Identifier: MIT
14
+ */
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { provideSiDashboardsTranslatableOverrides };
21
+ //# sourceMappingURL=siemens-dashboards-ng-translate.mjs.map