@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.
- package/LICENSE.md +20 -0
- package/README.md +230 -0
- package/assets/i18n/de.json +46 -0
- package/assets/i18n/en.json +46 -0
- package/fesm2022/spike-rabbit-dashboards-ng-module-federation.mjs +37 -0
- package/fesm2022/spike-rabbit-dashboards-ng-module-federation.mjs.map +1 -0
- package/fesm2022/spike-rabbit-dashboards-ng-translate.mjs +21 -0
- package/fesm2022/spike-rabbit-dashboards-ng-translate.mjs.map +1 -0
- package/fesm2022/spike-rabbit-dashboards-ng.mjs +2184 -0
- package/fesm2022/spike-rabbit-dashboards-ng.mjs.map +1 -0
- package/index.d.ts +1071 -0
- package/module-federation/index.d.ts +3 -0
- package/module-federation/package.json +3 -0
- package/package.json +51 -0
- package/template-i18n.json +35 -0
- package/translate/index.d.ts +47 -0
- package/translate/package.json +3 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Siemens 2016 - 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the “Software”), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Siemens Dashboards
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
Check out our [dashboard demo project](../dashboards-demo/) for examples on how
|
|
6
|
+
to integrate the Siemens Dashboards library in your project.
|
|
7
|
+
|
|
8
|
+
### Install dependencies
|
|
9
|
+
|
|
10
|
+
To use the Siemens Dashboards in your project, add it to your dependencies
|
|
11
|
+
by executing:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install --save @spike-rabbit/dashboards-ng gridstack
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Add libraries to your project
|
|
18
|
+
|
|
19
|
+
The library supports standalone components and modules. However, the widgets when not using web components
|
|
20
|
+
or module federation still need a module definition.
|
|
21
|
+
|
|
22
|
+
### Standalone
|
|
23
|
+
|
|
24
|
+
Import and include the `SiFlexibleDashboardComponent` in the component that shall provide the dashboard.
|
|
25
|
+
Optionally, configure the grid and the widget storage in the global app configuration providers.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
providers: [
|
|
29
|
+
provideRouter(routes, withHashLocation()),
|
|
30
|
+
{ provide: SI_WIDGET_STORE, useClass: AppWidgetStorage },
|
|
31
|
+
{ provide: SI_DASHBOARD_CONFIGURATION, useValue: config },
|
|
32
|
+
importProvidersFrom(
|
|
33
|
+
TranslateModule.forRoot({
|
|
34
|
+
loader: {
|
|
35
|
+
provide: TranslateLoader,
|
|
36
|
+
useFactory: createTranslateLoader,
|
|
37
|
+
deps: [HttpBackend]
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
SiTranslateNgxTModule
|
|
41
|
+
),
|
|
42
|
+
provideAnimations(),
|
|
43
|
+
provideNgxTranslateForElement(),
|
|
44
|
+
provideHttpClient(withInterceptorsFromDi())
|
|
45
|
+
];
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Modules
|
|
49
|
+
|
|
50
|
+
Import the library to your Angular `AppModule`, mostly residing in your
|
|
51
|
+
`src/app/app.modules.ts` file as follows:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// [...]
|
|
55
|
+
// Import this library
|
|
56
|
+
import { SiDashboardsNgModule } from '@spike-rabbit/dashboards-ng';
|
|
57
|
+
// Import needed peer dependency
|
|
58
|
+
import { SiTranslateModule } from '@spike-rabbit/element-translate-ng/translate';
|
|
59
|
+
|
|
60
|
+
@NgModule({
|
|
61
|
+
declarations: [AppComponent],
|
|
62
|
+
imports: [
|
|
63
|
+
BrowserModule,
|
|
64
|
+
|
|
65
|
+
// Import this library
|
|
66
|
+
SiDashboardsNgModule.forRoot({})
|
|
67
|
+
],
|
|
68
|
+
providers: [
|
|
69
|
+
provideNgxTranslateForElement()
|
|
70
|
+
]
|
|
71
|
+
bootstrap: [AppComponent]
|
|
72
|
+
})
|
|
73
|
+
export class AppModule { }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Add `gridstack` CSS files to you application by editing
|
|
77
|
+
the `angular.json` file.
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
"styles": [
|
|
81
|
+
"src/styles.scss",
|
|
82
|
+
"node_modules/gridstack/dist/gridstack.css",
|
|
83
|
+
"node_modules/gridstack/dist/gridstack-extra.css"
|
|
84
|
+
],
|
|
85
|
+
"allowedCommonJsDependencies": [
|
|
86
|
+
"gridstack"
|
|
87
|
+
],
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Add the dashboard to your application
|
|
91
|
+
|
|
92
|
+
To add the dashboard to your application, add the `si-flexible-dashboard component
|
|
93
|
+
to your template. Configure the widget catalog by setting the _widgetCatalog_ input
|
|
94
|
+
property.
|
|
95
|
+
|
|
96
|
+
The component expects to be added to a flex container with a defined height, as it grows in height
|
|
97
|
+
to the available space, following the [Fixed-height](https://element.siemens.io/fundamentals/layouts/content/#fixed-height)
|
|
98
|
+
concept.
|
|
99
|
+
|
|
100
|
+
For testing, set `style="display: flex; block-size: 800px;"` to the parent element. Please
|
|
101
|
+
note that the `si-flexible-dashboard` comes with the correct page margins.
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<div style="display: flex; block-size: 800px;">
|
|
105
|
+
<si-flexible-dashboard heading="Sample Dashboard" [widgetCatalog]="[]">
|
|
106
|
+
<div filters-slot><button class="btn btn-secondary">My Menu</button></div>
|
|
107
|
+
</si-flexible-dashboard>
|
|
108
|
+
</div>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The correct approach is to use the full page height as explained at
|
|
112
|
+
[Fixed-height](https://element.siemens.io/fundamentals/layouts/content/#fixed-height).
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<div class="has-navbar-fixed-top si-layout-fixed-height h-100">
|
|
116
|
+
<si-application-header> ... </si-application-header>
|
|
117
|
+
<div class="si-layout-fixed-height">
|
|
118
|
+
<si-flexible-dashboard heading="Sample Dashboard" [widgetCatalog]="[]">
|
|
119
|
+
<div filters-slot><button class="btn btn-secondary">My Menu</button></div>
|
|
120
|
+
</si-flexible-dashboard>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Translations
|
|
126
|
+
|
|
127
|
+
The dashboards comes with a couple of components with i18n support.
|
|
128
|
+
The library uses translation keys in the components and ships English
|
|
129
|
+
and German (`en.json`, `de.json`) translations for demonstration. The
|
|
130
|
+
files are located at the folder `node_modules/@spike-rabbit/dashboards-ng/assets/i18n/`
|
|
131
|
+
and provides you all used keys. You should include the keys in your translation
|
|
132
|
+
files and update the translations to your need.
|
|
133
|
+
|
|
134
|
+
For a quick test you can include the files from the library in your app.
|
|
135
|
+
Copy the files to your target by updated the `assets` definition in the `angular.json`
|
|
136
|
+
file.
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"glob": "**/*",
|
|
141
|
+
"input": "node_modules/@spike-rabbit/dashboards-ng/assets/i18n",
|
|
142
|
+
"output": "./assets/i18n/dashboard/"
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Use the `MultiTranslateHttpLoader` to load your and the library translation
|
|
147
|
+
files.
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
...
|
|
151
|
+
export function createTranslateLoader(_httpBackend: HttpBackend) {
|
|
152
|
+
return new MultiTranslateHttpLoader(_httpBackend, ['/assets/i18n/', '/assets/i18n/dashboard/']);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
...
|
|
156
|
+
|
|
157
|
+
TranslateModule.forRoot({
|
|
158
|
+
loader: {
|
|
159
|
+
provide: TranslateLoader,
|
|
160
|
+
useFactory: (createTranslateLoader),
|
|
161
|
+
deps: [HttpBackend]
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Widget development
|
|
167
|
+
|
|
168
|
+
You can develop your own widgets that are managed by the dashboard. One or multiple widgets
|
|
169
|
+
have to be provided by an Angular module and described by a `Widget` object, that includes
|
|
170
|
+
the meta information and the Angular widget instance component and editor names that are
|
|
171
|
+
used to instantiate the widget at runtime.
|
|
172
|
+
|
|
173
|
+
The widget instance component has to implement the `WidgetInstance` interface and the
|
|
174
|
+
editor has to implement the `WidgetInstanceEditor` interface. You have to provide a
|
|
175
|
+
module loader function that is used to load the widget when needed.
|
|
176
|
+
|
|
177
|
+
The library ships with a [hello-widget](./src/app/widgets/hello-widget/) example for illustration.
|
|
178
|
+
|
|
179
|
+
E.g. a widget implements a user interface that is added at runtime into the body of a dashboard card.
|
|
180
|
+
Optionally, the widget template may include a `<ng-template/>` to provides a footer implementation like
|
|
181
|
+
`<ng-template #footer><a [siLink]="link">Go to issues</a></ng-template>` in the [value-widget](./src/app/widgets/charts/value-widget.component.ts).
|
|
182
|
+
The Angular component should export the template as the public attribute `footer`.
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
`@ViewChild('footer', { static: true }) footer?: TemplateRef<unknown>;`;
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Dashboard persistence
|
|
189
|
+
|
|
190
|
+
The library persists a dashboard configuration by the default `SiDefaultWidgetStorage` implementation
|
|
191
|
+
of the API [SiWidgetStorage](./projects/dashboards-ng/src/model/si-widget-storage.ts). The
|
|
192
|
+
`SiDefaultWidgetStorage` uses the `Storage` implementation `sessionStorage`. You can set a different
|
|
193
|
+
`Storage` like the `localStorage` by providing the `DEFAULT_WIDGET_STORAGE_TOKEN` in the related module.
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
providers: [..., { provide: DEFAULT_WIDGET_STORAGE_TOKEN, useValue: localStorage }],
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
For persistence in a backend service, you should implement your own
|
|
200
|
+
[SiWidgetStorage](./projects/dashboards-ng/src/model/si-widget-storage.ts) and provide it in
|
|
201
|
+
the library module definition.
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
SiDashboardsNgModule.forRoot({
|
|
205
|
+
config: {},
|
|
206
|
+
dashboardApi: {
|
|
207
|
+
provide: SiWidgetStorage,
|
|
208
|
+
useClass: CustomWidgetStorage
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Configuration
|
|
214
|
+
|
|
215
|
+
The dashboard is configurable through the Angular inputs of the exposed components and by
|
|
216
|
+
the usage of the configuration object `Config`, which includes a `GridConfig` and including
|
|
217
|
+
the [GridStackOptions](./projects/dashboards-ng/src/model/gridstack.model.ts).
|
|
218
|
+
|
|
219
|
+
To configure all dashboard instances, you can leverage dependency injection when importing
|
|
220
|
+
the `SiDashboardsNgModule` using `SiDashboardsNgModule.forRoot({...})`.
|
|
221
|
+
Alternatively, you have the option to configure individual dashboard instances by setting
|
|
222
|
+
the input property `SiFlexibleDashboardComponent.config = {...}`.
|
|
223
|
+
|
|
224
|
+
Here is the [demo](./src/app/pages/fixed-widgets-dashboard/fixed-widgets-dashboard.component.ts)
|
|
225
|
+
|
|
226
|
+
## License
|
|
227
|
+
|
|
228
|
+
Code and documentation copyright 2021-2025 Siemens AG.
|
|
229
|
+
|
|
230
|
+
See [LICENSE.md](../../LICENSE.md).
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"DASHBOARD": {
|
|
3
|
+
"EDIT": "Bearbeiten",
|
|
4
|
+
"SAVE": "Speichern",
|
|
5
|
+
"CANCEL": "Abbrechen",
|
|
6
|
+
"ADD_WIDGET": "Widget hinzufügen",
|
|
7
|
+
"REMOVE_WIDGET_CONFIRMATION_DIALOG": {
|
|
8
|
+
"HEADING": "Widget entfernen",
|
|
9
|
+
"MESSAGE": "Möchten Sie wirklich das Widget entfernen?",
|
|
10
|
+
"REMOVE": "Entfernen",
|
|
11
|
+
"CANCEL": "Abbrechen"
|
|
12
|
+
},
|
|
13
|
+
"WIDGET_LIBRARY": {
|
|
14
|
+
"TITLE": "Widget hinzufügen",
|
|
15
|
+
"CANCEL": "Abbrechen",
|
|
16
|
+
"ADD": "Hinzufügen",
|
|
17
|
+
"NEXT": "Weiter",
|
|
18
|
+
"PREVIOUS": "Zurück",
|
|
19
|
+
"EMPTY": "Es sind keine Widgets vorhanden.",
|
|
20
|
+
"DISCARD_CONFIG_CHANGE_DIALOG": {
|
|
21
|
+
"HEADING": "Widgetkonfiguration geändert",
|
|
22
|
+
"MESSAGE": "Die Widgetkonfiguration wurde geändert. Möchten Sie die Änderungen verwerfen?",
|
|
23
|
+
"DISCARD": "Verwerfen",
|
|
24
|
+
"CANCEL": "Abbrechen"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"WIDGET_EDITOR_DIALOG": {
|
|
28
|
+
"TITLE": "Bearbeiten",
|
|
29
|
+
"CANCEL": "Abbrechen",
|
|
30
|
+
"SAVE": "Speichern",
|
|
31
|
+
"DISCARD_CONFIG_CHANGE_DIALOG": {
|
|
32
|
+
"HEADING": "Widgetkonfiguration geändert",
|
|
33
|
+
"MESSAGE": "Die Widgetkonfiguration wurde geändert. Möchten Sie die Änderungen verwerfen?",
|
|
34
|
+
"SAVE": "Speichern",
|
|
35
|
+
"DISCARD": "Verwerfen",
|
|
36
|
+
"CANCEL": "Abbrechen"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"WIDGET": {
|
|
40
|
+
"REMOVE": "Entfernen",
|
|
41
|
+
"EDIT": "Bearbeiten",
|
|
42
|
+
"EXPAND": "Vergrößern",
|
|
43
|
+
"RESTORE": "Verkleinern"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"DASHBOARD": {
|
|
3
|
+
"EDIT": "Edit",
|
|
4
|
+
"SAVE": "Save",
|
|
5
|
+
"CANCEL": "Cancel",
|
|
6
|
+
"ADD_WIDGET": "Add widget",
|
|
7
|
+
"REMOVE_WIDGET_CONFIRMATION_DIALOG": {
|
|
8
|
+
"HEADING": "Remove widget",
|
|
9
|
+
"MESSAGE": "Do you really want to remove the widget?",
|
|
10
|
+
"REMOVE": "Remove",
|
|
11
|
+
"CANCEL": "Cancel"
|
|
12
|
+
},
|
|
13
|
+
"WIDGET_LIBRARY": {
|
|
14
|
+
"TITLE": "Add widget",
|
|
15
|
+
"CANCEL": "Cancel",
|
|
16
|
+
"ADD": "Add",
|
|
17
|
+
"NEXT": "Next",
|
|
18
|
+
"PREVIOUS": "Previous",
|
|
19
|
+
"EMPTY": "No widgets available.",
|
|
20
|
+
"DISCARD_CONFIG_CHANGE_DIALOG": {
|
|
21
|
+
"HEADING": "Widget configuration changed",
|
|
22
|
+
"MESSAGE": "The widget configuration changed. Do you want to discard the changes?",
|
|
23
|
+
"DISCARD": "Discard",
|
|
24
|
+
"CANCEL": "Cancel"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"WIDGET_EDITOR_DIALOG": {
|
|
28
|
+
"TITLE": "Edit",
|
|
29
|
+
"CANCEL": "Cancel",
|
|
30
|
+
"SAVE": "Save",
|
|
31
|
+
"DISCARD_CONFIG_CHANGE_DIALOG": {
|
|
32
|
+
"HEADING": "Widget configuration changed",
|
|
33
|
+
"MESSAGE": "The widget configuration changed. Do you want to discard the changes?",
|
|
34
|
+
"SAVE": "Save",
|
|
35
|
+
"DISCARD": "Discard",
|
|
36
|
+
"CANCEL": "Cancel"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"WIDGET": {
|
|
40
|
+
"REMOVE": "Remove",
|
|
41
|
+
"EDIT": "Edit",
|
|
42
|
+
"EXPAND": "Expand",
|
|
43
|
+
"RESTORE": "Restore"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { loadRemoteModule } from '@angular-architects/module-federation';
|
|
2
|
+
import { widgetFactoryRegistry } from '@spike-rabbit/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=spike-rabbit-dashboards-ng-module-federation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spike-rabbit-dashboards-ng-module-federation.mjs","sources":["../../../../projects/dashboards-ng/module-federation/index.ts","../../../../projects/dashboards-ng/module-federation/spike-rabbit-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 {\n FederatedModule,\n SetupComponentFn,\n widgetFactoryRegistry\n} from '@spike-rabbit/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;AAUH,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,CAAA,aAAA,EAAgB,IAAI,CAAC,SAAS,CAC1E,SAAS,CAAC,QAAQ,EAAE,CACrB,CAAA;AACH,cAAE,CAAA,sBAAA,EAAyB,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;;AC/CA;;AAEG;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SI_TRANSLATABLE_VALUES } from '@spike-rabbit/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=spike-rabbit-dashboards-ng-translate.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spike-rabbit-dashboards-ng-translate.mjs","sources":["../../../../projects/dashboards-ng/translate/si-translatable-keys.interface.ts","../../../../projects/dashboards-ng/translate/si-translatable-overrides.provider.ts","../../../../projects/dashboards-ng/translate/index.ts","../../../../projects/dashboards-ng/translate/spike-rabbit-dashboards-ng-translate.ts"],"sourcesContent":["/* eslint-disable */\n\n// Auto-generated file. Run 'yarn update-translatable-keys' to update.\n\nexport interface SiTranslatableKeys {\n 'DASHBOARD.ADD_WIDGET'?: string;\n 'DASHBOARD.CANCEL'?: string;\n 'DASHBOARD.EDIT'?: string;\n 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.CANCEL'?: string;\n 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.HEADING'?: string;\n 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.MESSAGE'?: string;\n 'DASHBOARD.REMOVE_WIDGET_CONFIRMATION_DIALOG.REMOVE'?: string;\n 'DASHBOARD.SAVE'?: string;\n 'DASHBOARD.WIDGET.EDIT'?: string;\n 'DASHBOARD.WIDGET.EXPAND'?: string;\n 'DASHBOARD.WIDGET.REMOVE'?: string;\n 'DASHBOARD.WIDGET.RESTORE'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.CANCEL'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.HEADING'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.DISCARD_CONFIG_CHANGE_DIALOG.SAVE'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.NEXT'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.PREVIOUS'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.SAVE'?: string;\n 'DASHBOARD.WIDGET_EDITOR_DIALOG.TITLE'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.ADD'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.CANCEL'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.CANCEL'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.DISCARD'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.HEADING'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.DISCARD_CONFIG_CHANGE_DIALOG.MESSAGE'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.EMPTY'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.NEXT'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.PREVIOUS'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.SEARCH_PLACEHOLDER'?: string;\n 'DASHBOARD.WIDGET_LIBRARY.TITLE'?: string;\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Provider } from '@angular/core';\nimport { SI_TRANSLATABLE_VALUES } from '@spike-rabbit/element-translate-ng/translate';\n\nimport { SiTranslatableKeys } from './si-translatable-keys.interface';\n\nexport const provideSiDashboardsTranslatableOverrides: (\n values: SiTranslatableKeys\n) => Provider = values => ({\n useValue: values,\n multi: true,\n provide: SI_TRANSLATABLE_VALUES\n});\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-translatable-keys.interface';\nexport * from './si-translatable-overrides.provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;MCSa,wCAAwC,GAErC,MAAM,KAAK;AACzB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,OAAO,EAAE;AACV,CAAA;;ACfD;;;AAGG;;ACHH;;AAEG;;;;"}
|