@siemens/dashboards-ng 47.8.0 → 48.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.
Files changed (28) hide show
  1. package/fesm2022/siemens-dashboards-ng-module-federation.mjs.map +1 -1
  2. package/fesm2022/siemens-dashboards-ng.mjs +81 -83
  3. package/fesm2022/siemens-dashboards-ng.mjs.map +1 -1
  4. package/index.d.ts +1070 -3
  5. package/module-federation/index.d.ts +3 -1
  6. package/package.json +5 -5
  7. package/translate/index.d.ts +43 -2
  8. package/components/dashboard-toolbar/si-dashboard-toolbar.component.d.ts +0 -80
  9. package/components/flexible-dashboard/si-flexible-dashboard.component.d.ts +0 -151
  10. package/components/grid/si-grid.component.d.ts +0 -189
  11. package/components/gridstack-wrapper/si-gridstack-wrapper.component.d.ts +0 -70
  12. package/components/web-component-wrapper/si-web-component-editor-wrapper.component.d.ts +0 -27
  13. package/components/web-component-wrapper/si-web-component-wrapper-base.component.d.ts +0 -18
  14. package/components/web-component-wrapper/si-web-component-wrapper.component.d.ts +0 -27
  15. package/components/widget-catalog/si-widget-catalog.component.d.ts +0 -101
  16. package/components/widget-host/si-widget-host.component.d.ts +0 -80
  17. package/components/widget-instance-editor-dialog/si-widget-instance-editor-dialog.component.d.ts +0 -73
  18. package/model/configuration.d.ts +0 -22
  19. package/model/gridstack.model.d.ts +0 -15
  20. package/model/si-dashboard-toolbar.model.d.ts +0 -37
  21. package/model/si-widget-storage.d.ts +0 -78
  22. package/model/widgets.model.d.ts +0 -316
  23. package/public-api.d.ts +0 -16
  24. package/public-api.module.d.ts +0 -38
  25. package/services/si-grid.service.d.ts +0 -17
  26. package/translate/si-translatable-keys.interface.d.ts +0 -35
  27. package/translate/si-translatable-overrides.provider.d.ts +0 -7
  28. package/widget-loader.d.ts +0 -18
@@ -1 +1,3 @@
1
- export declare const registerModuleFederatedWidgetLoader: () => void;
1
+ declare const registerModuleFederatedWidgetLoader: () => void;
2
+
3
+ export { registerModuleFederatedWidgetLoader };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@siemens/dashboards-ng",
3
3
  "description": "Element Dashboards library.",
4
- "version": "47.8.0",
4
+ "version": "48.0.0-next.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,11 +18,11 @@
18
18
  "bugs": "https://github.com/siemens/element/issues/new",
19
19
  "type": "module",
20
20
  "peerDependencies": {
21
- "@angular/common": "19 - 20",
22
- "@angular/core": "19 - 20",
21
+ "@angular/common": "20",
22
+ "@angular/core": "20",
23
23
  "@ngx-translate/core": "15 - 16",
24
- "@siemens/element-ng": "47.8.0",
25
- "@siemens/element-theme": "47.8.0",
24
+ "@siemens/element-ng": "48.0.0-next.1",
25
+ "@siemens/element-theme": "48.0.0-next.1",
26
26
  "gridstack": "^11.1.0"
27
27
  },
28
28
  "module": "fesm2022/siemens-dashboards-ng.mjs",
@@ -1,6 +1,47 @@
1
+ import { Provider } from '@angular/core';
2
+
3
+ interface SiTranslatableKeys {
4
+ 'DASHBOARD.ADD_WIDGET'?: string;
5
+ 'DASHBOARD.CANCEL'?: string;
6
+ 'DASHBOARD.EDIT'?: string;
7
+ 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.CANCEL'?: string;
8
+ 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.HEADING'?: string;
9
+ 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.MESSAGE'?: string;
10
+ 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.REMOVE'?: string;
11
+ 'DASHBOARD.SAVE'?: string;
12
+ 'DASHBOARD.WIDGET.EDIT'?: string;
13
+ 'DASHBOARD.WIDGET.EXPAND'?: string;
14
+ 'DASHBOARD.WIDGET.REMOVE'?: string;
15
+ 'DASHBOARD.WIDGET.RESTORE'?: string;
16
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.CANCEL'?: string;
17
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL'?: string;
18
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD'?: string;
19
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.HEADING'?: string;
20
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE'?: string;
21
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.SAVE'?: string;
22
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.NEXT'?: string;
23
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.PREVIOUS'?: string;
24
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.SAVE'?: string;
25
+ 'DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE'?: string;
26
+ 'DASHBOARD.WIDGET_LIBRARY.ADD'?: string;
27
+ 'DASHBOARD.WIDGET_LIBRARY.CANCEL'?: string;
28
+ 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL'?: string;
29
+ 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD'?: string;
30
+ 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.HEADING'?: string;
31
+ 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE'?: string;
32
+ 'DASHBOARD.WIDGET_LIBRARY.EMPTY'?: string;
33
+ 'DASHBOARD.WIDGET_LIBRARY.NEXT'?: string;
34
+ 'DASHBOARD.WIDGET_LIBRARY.PREVIOUS'?: string;
35
+ 'DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER'?: string;
36
+ 'DASHBOARD.WIDGET_LIBRARY.TITLE'?: string;
37
+ }
38
+
1
39
  /**
2
40
  * Copyright (c) Siemens 2016 - 2025
3
41
  * SPDX-License-Identifier: MIT
4
42
  */
5
- export * from './si-translatable-keys.interface';
6
- export * from './si-translatable-overrides.provider';
43
+
44
+ declare const provideSiDashboardsTranslatableOverrides: (values: SiTranslatableKeys) => Provider;
45
+
46
+ export { provideSiDashboardsTranslatableOverrides };
47
+ export type { SiTranslatableKeys };
@@ -1,80 +0,0 @@
1
- import { ActivatedRoute } from '@angular/router';
2
- import { MenuItem } from '@siemens/element-ng/common';
3
- import { SiResponsiveContainerDirective } from '@siemens/element-ng/resize-observer';
4
- import { DashboardToolbarItem } from '../../model/si-dashboard-toolbar.model';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * The toolbar of the flexible dashboard is either `editable` or not. When not
8
- * `editable`, it supports content projection for applications to inject toolbar
9
- * controls for e.g. filtering. Use the attribute `filters-slot` to inject the filters.
10
- * In addition it shows the button to switch to the `editable`. When `editable`, it support
11
- * the cancel and save buttons, as well as displaying primary and secondary actions.
12
- */
13
- export declare class SiDashboardToolbarComponent {
14
- /**
15
- * Set primary actions that are in `editable` mode first visible or in
16
- * the expanded content action bar of the toolbar.
17
- *
18
- * @defaultValue []
19
- */
20
- readonly primaryEditActions: import("@angular/core").InputSignal<(MenuItem | DashboardToolbarItem)[]>;
21
- /**
22
- * Set secondary actions that are in `editable` mode second visible or in
23
- * the dropdown part of the content action bar of the toolbar.
24
- *
25
- * @defaultValue [] */
26
- readonly secondaryEditActions: import("@angular/core").InputSignal<(MenuItem | DashboardToolbarItem)[]>;
27
- /**
28
- * Input to disable the save button. Note, the input `disabled` disables all
29
- * actions and the save button of the toolbar.
30
- *
31
- * @defaultValue true
32
- */
33
- readonly disableSaveButton: import("@angular/core").ModelSignal<boolean>;
34
- /**
35
- * Input to disable all actions and buttons of the toolbar.
36
- *
37
- * @defaultValue false */
38
- readonly disabled: import("@angular/core").InputSignal<boolean>;
39
- /**
40
- * Input option to set the `editable` mode. When editable
41
- * the toolbar shows a cancel and save button. Otherwise,
42
- * it displays an edit button.
43
- *
44
- * @defaultValue false */
45
- readonly editable: import("@angular/core").ModelSignal<boolean>;
46
- /**
47
- * Option to hide the dashboard edit button.
48
- *
49
- * @defaultValue false
50
- */
51
- readonly hideEditButton: import("@angular/core").InputSignal<boolean>;
52
- /**
53
- * Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.
54
- *
55
- * @defaultValue false
56
- */
57
- readonly showEditButtonLabel: import("@angular/core").InputSignal<boolean>;
58
- /**
59
- * Emits on save button click.
60
- */
61
- readonly save: import("@angular/core").OutputEmitterRef<void>;
62
- /**
63
- * Emits on cancel button click.
64
- */
65
- readonly cancel: import("@angular/core").OutputEmitterRef<void>;
66
- protected labelEdit: import("@siemens/element-translate-ng/translate").TranslatableString;
67
- protected labelCancel: import("@siemens/element-translate-ng/translate").TranslatableString;
68
- protected labelSave: import("@siemens/element-translate-ng/translate").TranslatableString;
69
- protected readonly activatedRoute: ActivatedRoute | null;
70
- protected dashboardToolbarContainer: SiResponsiveContainerDirective;
71
- protected readonly showContentActionBar: import("@angular/core").Signal<boolean>;
72
- protected readonly editActions: import("@angular/core").Signal<(MenuItem | DashboardToolbarItem)[]>;
73
- protected onEdit(): void;
74
- protected onSave(): void;
75
- protected onCancel(): void;
76
- protected isToolbarItem(item: MenuItem | DashboardToolbarItem): item is DashboardToolbarItem;
77
- protected showEditButtonLabelDesktop(): boolean;
78
- static ɵfac: i0.ɵɵFactoryDeclaration<SiDashboardToolbarComponent, never>;
79
- static ɵcmp: i0.ɵɵComponentDeclaration<SiDashboardToolbarComponent, "si-dashboard-toolbar", never, { "primaryEditActions": { "alias": "primaryEditActions"; "required": false; "isSignal": true; }; "secondaryEditActions": { "alias": "secondaryEditActions"; "required": false; "isSignal": true; }; "disableSaveButton": { "alias": "disableSaveButton"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "hideEditButton": { "alias": "hideEditButton"; "required": false; "isSignal": true; }; "showEditButtonLabel": { "alias": "showEditButtonLabel"; "required": false; "isSignal": true; }; }, { "disableSaveButton": "disableSaveButtonChange"; "editable": "editableChange"; "save": "save"; "cancel": "cancel"; }, never, ["[filters-slot]"], true, never>;
80
- }
@@ -1,151 +0,0 @@
1
- import { OnChanges, OnDestroy, OnInit, SimpleChanges, Type, ViewContainerRef } from '@angular/core';
2
- import { MenuItem } from '@siemens/element-ng/common';
3
- import { SiDashboardComponent } from '@siemens/element-ng/dashboard';
4
- import { BehaviorSubject } from 'rxjs';
5
- import { Config } from '../../model/configuration';
6
- import { DashboardToolbarItem } from '../../model/si-dashboard-toolbar.model';
7
- import { Widget } from '../../model/widgets.model';
8
- import { SiGridComponent } from '../grid/si-grid.component';
9
- import { SiWidgetCatalogComponent } from '../widget-catalog/si-widget-catalog.component';
10
- import { SiWidgetInstanceEditorDialogComponent } from '../widget-instance-editor-dialog/si-widget-instance-editor-dialog.component';
11
- import * as i0 from "@angular/core";
12
- /**
13
- * The component implements a dashboard with adding, removing and resizing widgets.
14
- * It consists and connects a toolbar, a grid with widgets, and a widget catalog.
15
- */
16
- export declare class SiFlexibleDashboardComponent implements OnInit, OnChanges, OnDestroy {
17
- /**
18
- * Input to change the dashboard editable state.
19
- *
20
- * @defaultValue false
21
- */
22
- readonly editable: import("@angular/core").ModelSignal<boolean>;
23
- /**
24
- * Heading for the dashboard.
25
- */
26
- readonly heading: import("@angular/core").InputSignal<string | undefined>;
27
- /**
28
- * Optionally, provide a custom subclass of the SiWidgetCatalogComponent
29
- * to use your own catalog component.
30
- */
31
- readonly widgetCatalogComponent: import("@angular/core").InputSignal<Type<SiWidgetCatalogComponent> | undefined>;
32
- /**
33
- * Optionally, provide a custom subclass of the {@link SiWidgetInstanceEditorDialogComponent}
34
- * to use your own implementation.
35
- */
36
- readonly widgetInstanceEditorDialogComponent: import("@angular/core").InputSignal<Type<SiWidgetInstanceEditorDialogComponent> | undefined>;
37
- /**
38
- * Optionally, but it is recommended to include an id for a dashboard.
39
- * The id is utilized in the persistence calls on the {@link SiWidgetStorage}.
40
- */
41
- readonly dashboardId: import("@angular/core").InputSignal<string | undefined>;
42
- /**
43
- * Sets the available widgets for the widget catalog to the dashboard.
44
- *
45
- * @defaultValue [] */
46
- readonly widgetCatalog: import("@angular/core").InputSignal<Widget[]>;
47
- /**
48
- * Option to remove the add widget instance button from the primary toolbar.
49
- *
50
- * @defaultValue false
51
- */
52
- readonly hideAddWidgetInstanceButton: import("@angular/core").InputSignal<boolean>;
53
- /**
54
- * Option to hide the dashboard edit button.
55
- *
56
- * @defaultValue false
57
- */
58
- readonly hideEditButton: import("@angular/core").InputSignal<boolean>;
59
- /**
60
- * Option to display the edit button as a text button instead, only if the window is larger than xs {@link SiResponsiveContainerDirective}.
61
- *
62
- * @defaultValue false
63
- */
64
- readonly showEditButtonLabel: import("@angular/core").InputSignal<boolean>;
65
- /**
66
- * Option to turn off the loading spinner on save and load operations.
67
- *
68
- * @defaultValue false
69
- */
70
- readonly hideProgressIndicator: import("@angular/core").InputSignal<boolean>;
71
- /**
72
- * Option to configure a dashboard instance. Default is the optional value from
73
- * the {@link SI_DASHBOARD_CONFIGURATION}.
74
- *
75
- * @defaultValue inject(SI_DASHBOARD_CONFIGURATION)
76
- */
77
- readonly config: import("@angular/core").InputSignal<Config | undefined>;
78
- /**
79
- * Placeholder text for the search input field in the widget catalog.
80
- *
81
- * @defaultValue
82
- * ```
83
- * $localize`:@@DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER:Search widget`
84
- * ```
85
- */
86
- readonly searchPlaceholder: import("@angular/core").InputSignal<import("@siemens/element-translate-ng/translate-types").TranslatableString>;
87
- /**
88
- * The grid component is the actual container for the widgets.
89
- */
90
- readonly grid: import("@angular/core").Signal<SiGridComponent>;
91
- /** Property to access the dashboard component instance.
92
- */
93
- readonly dashboard: import("@angular/core").Signal<SiDashboardComponent>;
94
- /** The view child holds the container that hosts the widget catalog.
95
- */
96
- protected readonly catalogHost: import("@angular/core").Signal<ViewContainerRef>;
97
- /**
98
- * Emits the modification state of the grid. It is `unmodified` when the visible state
99
- * is equal to the loaded state from the widget storage. When the user modifies the dashboard by
100
- * e.g. while moving the widgets, the dashboard is marked as `modified` and emits `true` and when the user
101
- * persists the change by saving, or reverts the state by canceling, the state is `unmodified`
102
- * again and emits `false`.
103
- */
104
- readonly isModified: import("@angular/core").OutputEmitterRef<boolean>;
105
- protected labelAddWidget: import("@siemens/element-translate-ng/translate-types").TranslatableString;
106
- protected labelEditor: import("@siemens/element-translate-ng/translate-types").TranslatableString;
107
- protected labelCatalog: import("@siemens/element-translate-ng/translate-types").TranslatableString;
108
- protected addWidgetInstanceAction: DashboardToolbarItem;
109
- /**
110
- * The primary action menu items shown in the edit mode of the dashboard.
111
- */
112
- readonly primaryEditActions$: BehaviorSubject<(MenuItem | DashboardToolbarItem)[]>;
113
- /**
114
- * The secondary action menu items shown in the edit mode of the dashboard. When all menu items are more than
115
- * three, they will be places in the secondary menu of the content action bar.
116
- */
117
- readonly secondaryEditActions$: BehaviorSubject<(MenuItem | DashboardToolbarItem)[]>;
118
- /**
119
- * @returns True, if the dashboard shows its widgets and not a catalog or and editor.
120
- */
121
- readonly isDashboardVisible: import("@angular/core").Signal<boolean>;
122
- /**
123
- * The page title of the dashboard, which is either {@link SiFlexibleDashboardComponent.heading} for the
124
- * default widget view or `DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE` or 'DASHBOARD.WIDGET_LIBRARY.TITLE' when
125
- * adding new or editing widgets.
126
- */
127
- readonly pageTitle: import("@angular/core").Signal<string | undefined>;
128
- private readonly viewState;
129
- private subscriptions;
130
- private widgetStorage;
131
- private hideAddWidgetInstanceButton$;
132
- private dashboardId$;
133
- private outputRefSubscription;
134
- private readonly toolbar;
135
- ngOnChanges(changes: SimpleChanges): void;
136
- ngOnInit(): void;
137
- ngOnDestroy(): void;
138
- /**
139
- * Shows the widget catalog of the dashboard. If a widget instance is expanded
140
- * it restores the widget instances before.
141
- */
142
- showWidgetCatalog(): void;
143
- protected onModified(event: boolean): void;
144
- private setupMenuItems;
145
- private setupPrimaryMenuItems;
146
- private editWidgetInstance;
147
- private proxyMenuItemAction;
148
- private getWidget;
149
- static ɵfac: i0.ɵɵFactoryDeclaration<SiFlexibleDashboardComponent, never>;
150
- static ɵcmp: i0.ɵɵComponentDeclaration<SiFlexibleDashboardComponent, "si-flexible-dashboard", never, { "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "widgetCatalogComponent": { "alias": "widgetCatalogComponent"; "required": false; "isSignal": true; }; "widgetInstanceEditorDialogComponent": { "alias": "widgetInstanceEditorDialogComponent"; "required": false; "isSignal": true; }; "dashboardId": { "alias": "dashboardId"; "required": false; "isSignal": true; }; "widgetCatalog": { "alias": "widgetCatalog"; "required": false; "isSignal": true; }; "hideAddWidgetInstanceButton": { "alias": "hideAddWidgetInstanceButton"; "required": false; "isSignal": true; }; "hideEditButton": { "alias": "hideEditButton"; "required": false; "isSignal": true; }; "showEditButtonLabel": { "alias": "showEditButtonLabel"; "required": false; "isSignal": true; }; "hideProgressIndicator": { "alias": "hideProgressIndicator"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; }, { "editable": "editableChange"; "isModified": "isModified"; }, never, ["[filters-slot]", "[empty-state]"], true, never>;
151
- }
@@ -1,189 +0,0 @@
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
- }
@@ -1,70 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
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
- }
@@ -1,18 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
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
- }