@spike-rabbit/dashboards-ng 49.0.1 → 49.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) Siemens 2016 - 2025
3
+ Copyright (c) Siemens 2016 - 2026
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the “Software”), to deal in
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Usage
4
4
 
5
- Check out our [dashboard demo project](../dashboards-demo/) for examples on how
5
+ Check out our [dashboard demo project](https://github.com/siemens/element/blob/main/projects/dashboards-demo/) for examples on how
6
6
  to integrate the Siemens Dashboards library in your project.
7
7
 
8
8
  ### Install dependencies
@@ -16,8 +16,7 @@ npm install --save @spike-rabbit/dashboards-ng gridstack
16
16
 
17
17
  ### Add libraries to your project
18
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.
19
+ The library supports standalone components and modules.
21
20
 
22
21
  ### Standalone
23
22
 
@@ -29,17 +28,14 @@ providers: [
29
28
  provideRouter(routes, withHashLocation()),
30
29
  { provide: SI_WIDGET_STORE, useClass: AppWidgetStorage },
31
30
  { 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(),
31
+ provideTranslateService({
32
+ loader: {
33
+ provide: TranslateLoader,
34
+ useFactory: createTranslateLoader,
35
+ deps: [HttpBackend]
36
+ },
37
+ missingTranslationHandler: provideMissingTranslationHandlerForElement()
38
+ }),
43
39
  provideNgxTranslateForElement(),
44
40
  provideHttpClient(withInterceptorsFromDi())
45
41
  ];
@@ -63,7 +59,7 @@ import { SiTranslateModule } from '@spike-rabbit/element-translate-ng/translate'
63
59
  BrowserModule,
64
60
 
65
61
  // Import this library
66
- SiDashboardsNgModule.forRoot({})
62
+ SiDashboardsNgModule
67
63
  ],
68
64
  providers: [
69
65
  provideNgxTranslateForElement()
@@ -73,14 +69,13 @@ import { SiTranslateModule } from '@spike-rabbit/element-translate-ng/translate'
73
69
  export class AppModule { }
74
70
  ```
75
71
 
76
- Add `gridstack` CSS files to you application by editing
72
+ Add `gridstack` CSS files to your application by editing
77
73
  the `angular.json` file.
78
74
 
79
75
  ```json
80
76
  "styles": [
81
77
  "src/styles.scss",
82
- "node_modules/gridstack/dist/gridstack.css",
83
- "node_modules/gridstack/dist/gridstack-extra.css"
78
+ "node_modules/gridstack/dist/gridstack.css"
84
79
  ],
85
80
  "allowedCommonJsDependencies": [
86
81
  "gridstack"
@@ -89,7 +84,7 @@ the `angular.json` file.
89
84
 
90
85
  ### Add the dashboard to your application
91
86
 
92
- To add the dashboard to your application, add the `si-flexible-dashboard component
87
+ To add the dashboard to your application, add the `si-flexible-dashboard` component
93
88
  to your template. Configure the widget catalog by setting the _widgetCatalog_ input
94
89
  property.
95
90
 
@@ -124,7 +119,7 @@ The correct approach is to use the full page height as explained at
124
119
 
125
120
  ### Translations
126
121
 
127
- The dashboards comes with a couple of components with i18n support.
122
+ The dashboard comes with a couple of components with i18n support.
128
123
  The library uses translation keys in the components and ships English
129
124
  and German (`en.json`, `de.json`) translations for demonstration. The
130
125
  files are located at the folder `node_modules/@spike-rabbit/dashboards-ng/assets/i18n/`
@@ -154,7 +149,7 @@ export function createTranslateLoader(_httpBackend: HttpBackend) {
154
149
 
155
150
  ...
156
151
 
157
- TranslateModule.forRoot({
152
+ provideTranslateService({
158
153
  loader: {
159
154
  provide: TranslateLoader,
160
155
  useFactory: (createTranslateLoader),
@@ -166,29 +161,186 @@ TranslateModule.forRoot({
166
161
  ### Widget development
167
162
 
168
163
  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
164
+ have to be provided by an Angular module or standalone and described by a `Widget` object, that includes
170
165
  the meta information and the Angular widget instance component and editor names that are
171
166
  used to instantiate the widget at runtime.
172
167
 
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.
168
+ The widget instance component must implement the `WidgetInstance` interface and the
169
+ editor must implement the `WidgetInstanceEditor` interface. You must provide either
170
+ a module loader function with module name or a component loader function for standalone components
171
+ that is used to load the widget when needed.
176
172
 
177
- The library ships with a [hello-widget](./src/app/widgets/hello-widget/) example for illustration.
173
+ The library ships with a [hello-widget](https://github.com/siemens/element/blob/main/projects/dashboards-demo/src/app/widgets/hello-widget/) example for illustration.
178
174
 
179
175
  E.g. a widget implements a user interface that is added at runtime into the body of a dashboard card.
180
176
  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).
177
+ `<ng-template #footer><a [siLink]="link">Go to issues</a></ng-template>` in the [value-widget](https://github.com/siemens/element/blob/main/projects/dashboards-demo/src/app/widgets/charts/value-widget.component.ts).
182
178
  The Angular component should export the template as the public attribute `footer`.
183
179
 
184
180
  ```ts
185
- `@ViewChild('footer', { static: true }) footer?: TemplateRef<unknown>;`;
181
+ @ViewChild('footer', { static: true }) footer?: TemplateRef<unknown>;
182
+ ```
183
+
184
+ ### Remote Widget Loading (Microfrontends)
185
+
186
+ The flexible dashboard supports loading widgets as remote microfrontends, allowing widgets to be deployed and updated independently from the host application. Three integration options are available:
187
+
188
+ #### Pure Module Federation (Webpack-based)
189
+
190
+ Uses `@angular-architects/module-federation` to share code between host and remote applications. Both host and remotes must use Webpack as the bundler.
191
+
192
+ Register the loader in your application bootstrap:
193
+
194
+ ```ts
195
+ import { registerModuleFederatedWidgetLoader } from '@spike-rabbit/dashboards-ng/module-federation';
196
+
197
+ registerModuleFederatedWidgetLoader();
198
+ ```
199
+
200
+ ```
201
+ +-------------------------+ +----------------------------------+
202
+ | Host App | | @angular-architects/ |
203
+ | Module Federation |------>| module-federation |
204
+ | (webpack) | | |
205
+ +------------+------------+ +---------------^------------------+
206
+ | |
207
+ registerModuleFederatedWidgetLoader |
208
+ | |
209
+ +------------v------------+ +---------------+------------------+
210
+ | @spike-rabbit/dashboards-ng/ | | Remote Widget |
211
+ | module-federation | | Module Federation |
212
+ +-------------------------+ | (webpack) |
213
+ +----------------------------------+
214
+ ```
215
+
216
+ #### Pure Native Federation (ESM-based)
217
+
218
+ Uses `@angular-architects/native-federation` with ES Module-based federation, independent of the bundler. Works with any build tool (esbuild, Vite, Webpack). Recommended for modern Angular applications.
219
+
220
+ Register the loader in your application bootstrap:
221
+
222
+ ```ts
223
+ import { registerNativeFederatedWidgetLoader } from '@spike-rabbit/dashboards-ng/native-federation';
224
+
225
+ registerNativeFederatedWidgetLoader();
226
+ ```
227
+
228
+ ```
229
+ +-------------------------+ +----------------------------------+
230
+ | Host App | | @angular-architects/ |
231
+ | Native Federation |------>| native-federation |
232
+ | (esbuild/Vite/webpack) | | |
233
+ +------------+------------+ +---------------^------------------+
234
+ | |
235
+ registerNativeFederatedWidgetLoader |
236
+ | |
237
+ +------------v------------+ +---------------+------------------+
238
+ | @spike-rabbit/dashboards-ng/ | | Remote Widget |
239
+ | native-federation | | Native Federation |
240
+ +-------------------------+ | (esbuild) |
241
+ +----------------------------------+
242
+ ```
243
+
244
+ #### Hybrid/Bridge (Native Federation + Module Federation)
245
+
246
+ Enables a Native Federation shell to load Module Federation remotes using `@module-federation/runtime`. Useful for gradual migration or when integrating existing Webpack-based remotes into a modern ESM-based host.
247
+
248
+ Register the loader with your Module Federation instance:
249
+
250
+ ```ts
251
+ import { registerModuleFederatedWidgetLoader } from '@spike-rabbit/dashboards-ng/native-federation/mf-bridge';
252
+
253
+ registerModuleFederatedWidgetLoader(mfInstance);
254
+ ```
255
+
256
+ ```
257
+ +-------------------------+ +----------------------------------+
258
+ | Host App | | @angular-architects/ |
259
+ | Native Federation |------>| native-federation |
260
+ | (esbuild) | | |
261
+ +------------+------------+ +----------------------------------+
262
+ |
263
+ | registerModuleFederatedWidgetLoader(mfInstance)
264
+ |
265
+ +------------v-----------------------+
266
+ | @spike-rabbit/dashboards-ng/ |
267
+ | native-federation/mf-bridge |
268
+ +------------+-----------------------+
269
+ |
270
+ | loads
271
+ |
272
+ +------------v------------+ +----------------------------------+
273
+ | @module-federation/ | | Remote Widget |
274
+ | runtime |------>| Module Federation |
275
+ +-------------------------+ | (webpack) |
276
+ +----------------------------------+
277
+ ```
278
+
279
+ For more details, refer to [Combining Native Federation and Module Federation](https://www.angulararchitects.io/blog/combining-native-federation-and-module-federation/).
280
+
281
+ #### Running the Demo Application
282
+
283
+ The [dashboard demo project](https://github.com/siemens/element/blob/main/projects/dashboards-demo/) includes examples of all microfrontend modes. Use these npm scripts to run locally:
284
+
285
+ ```sh
286
+ # Module Federation mode (Webpack-based host and remotes)
287
+ pnpm run dashboards-demo:run-all:local
288
+
289
+ # Native Federation mode with Hybrid/Bridge support (ESM-based host with both Native and Module Federation remotes)
290
+ pnpm run dashboards-demo:run-all:esm:local
291
+ ```
292
+
293
+ ### Widget instance ID generation
294
+
295
+ Each widget instance on a dashboard requires a unique ID for identification and persistence. The library
296
+ provides a flexible system for generating these IDs through the `SiWidgetIdProvider` abstract class.
297
+
298
+ #### Default ID generation
299
+
300
+ By default, the library uses `SiWidgetDefaultIdProvider`, which generates unique IDs using
301
+ a RFC4122 version 4 UUID (e.g.,`'550e8400-e29b-41d4-a716-446655440000'`). This default implementation
302
+ uses `crypto.randomUUID()` to ensure cryptographically secure uniqueness with 122 bits of entropy.
303
+
304
+ #### Custom ID generation
305
+
306
+ To implement custom ID generation logic (e.g., UUID-based, sequential or
307
+ context-aware IDs), create a class that extends `SiWidgetIdProvider` and implement the
308
+ `generateWidgetId` method:
309
+
310
+ ```ts
311
+ import { Injectable } from '@angular/core';
312
+ import { SiWidgetIdProvider } from '@spike-rabbit/dashboards-ng';
313
+
314
+ @Injectable()
315
+ export class CustomWidgetIdProvider extends SiWidgetIdProvider {
316
+ override generateWidgetId(widget: WidgetConfig, dashboardId?: string): string {
317
+ // Example: Create a composite ID from dashboard and widget type
318
+ const prefix = dashboardId ?? 'default';
319
+ const timestamp = Date.now();
320
+ return `${prefix}-${widget.widgetId}-${timestamp}`;
321
+ }
322
+ }
323
+ ```
324
+
325
+ #### Providing a custom ID provider
326
+
327
+ To use your custom ID provider, register it in your application's providers:
328
+
329
+ ```ts
330
+ // For standalone applications
331
+ providers: [{ provide: SI_WIDGET_ID_PROVIDER, useClass: CustomWidgetIdProvider }];
332
+
333
+ // For module-based applications
334
+ @NgModule({
335
+ providers: [{ provide: SI_WIDGET_ID_PROVIDER, useClass: CustomWidgetIdProvider }]
336
+ })
337
+ export class AppModule {}
186
338
  ```
187
339
 
188
340
  ### Dashboard persistence
189
341
 
190
342
  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
343
+ of the API [SiWidgetStorage](https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts). The
192
344
  `SiDefaultWidgetStorage` uses the `Storage` implementation `sessionStorage`. You can set a different
193
345
  `Storage` like the `localStorage` by providing the `DEFAULT_WIDGET_STORAGE_TOKEN` in the related module.
194
346
 
@@ -197,34 +349,28 @@ providers: [..., { provide: DEFAULT_WIDGET_STORAGE_TOKEN, useValue: localStorage
197
349
  ```
198
350
 
199
351
  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.
352
+ [SiWidgetStorage](https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/si-widget-storage.ts) and provide it in
353
+ your module providers or application config.
202
354
 
203
355
  ```ts
204
- SiDashboardsNgModule.forRoot({
205
- config: {},
206
- dashboardApi: {
207
- provide: SiWidgetStorage,
208
- useClass: CustomWidgetStorage
209
- }
210
- });
356
+ providers: [{ provide: SI_WIDGET_STORE, useClass: CustomWidgetStorage }];
211
357
  ```
212
358
 
213
359
  ### Configuration
214
360
 
215
361
  The dashboard is configurable through the Angular inputs of the exposed components and by
216
362
  the usage of the configuration object `Config`, which includes a `GridConfig` and including
217
- the [GridStackOptions](./projects/dashboards-ng/src/model/gridstack.model.ts).
363
+ the [GridStackOptions](https://github.com/siemens/element/blob/main/projects/dashboards-ng/src/model/gridstack.model.ts).
218
364
 
219
- To configure all dashboard instances, you can leverage dependency injection when importing
220
- the `SiDashboardsNgModule` using `SiDashboardsNgModule.forRoot({...})`.
365
+ To configure all dashboard instances, you can leverage dependency injection by providing
366
+ the `SI_DASHBOARD_CONFIGURATION` token in your providers.
221
367
  Alternatively, you have the option to configure individual dashboard instances by setting
222
368
  the input property `SiFlexibleDashboardComponent.config = {...}`.
223
369
 
224
- Here is the [demo](./src/app/pages/fixed-widgets-dashboard/fixed-widgets-dashboard.component.ts)
370
+ Here is the [demo](https://github.com/siemens/element/blob/main/projects/dashboards-demo/src/app/pages/fixed-widgets-dashboard/fixed-widgets-dashboard.component.ts)
225
371
 
226
372
  ## License
227
373
 
228
- Code and documentation copyright 2021-2025 Siemens AG.
374
+ Code and documentation Copyright (c) Siemens 2016 - 2026
229
375
 
230
- See [LICENSE.md](../../LICENSE.md).
376
+ MIT, see [LICENSE.md](LICENSE.md).
@@ -1,34 +1,27 @@
1
1
  import { loadRemoteModule } from '@angular-architects/module-federation';
2
- import { widgetFactoryRegistry } from '@spike-rabbit/dashboards-ng';
3
- import { Subject } from 'rxjs';
2
+ import { handleFederatedModuleLoad, widgetFactoryRegistry } from '@spike-rabbit/dashboards-ng';
4
3
 
5
4
  /**
6
- * Copyright (c) Siemens 2016 - 2025
5
+ * Copyright (c) Siemens 2016 - 2026
7
6
  * SPDX-License-Identifier: MIT
8
7
  */
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
- };
8
+ const setupRemoteComponent = (factory, componentName, host, injector, environmentInjector) => handleFederatedModuleLoad({
9
+ loadPromise: loadRemoteModule(factory),
10
+ factory,
11
+ componentName,
12
+ host,
13
+ injector,
14
+ environmentInjector
15
+ });
28
16
  const registerModuleFederatedWidgetLoader = () => {
29
17
  widgetFactoryRegistry.register('module-federation', setupRemoteComponent);
30
18
  };
31
19
 
20
+ /**
21
+ * Copyright (c) Siemens 2016 - 2026
22
+ * SPDX-License-Identifier: MIT
23
+ */
24
+
32
25
  /**
33
26
  * Generated bundle index. Do not edit.
34
27
  */
@@ -1 +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;;;;"}
1
+ {"version":3,"file":"spike-rabbit-dashboards-ng-module-federation.mjs","sources":["../../../../projects/dashboards-ng/module-federation/register-loader.ts","../../../../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 - 2026\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 FederatedModuleExports,\n handleFederatedModuleLoad,\n SetupComponentFn,\n widgetFactoryRegistry\n} from '@spike-rabbit/dashboards-ng';\nimport { Observable } 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 handleFederatedModuleLoad({\n loadPromise: loadRemoteModule<FederatedModuleExports<T>>(factory),\n factory,\n componentName,\n host,\n injector,\n environmentInjector\n });\n\nexport const registerModuleFederatedWidgetLoader = (): void => {\n widgetFactoryRegistry.register('module-federation', setupRemoteComponent as SetupComponentFn);\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport { registerModuleFederatedWidgetLoader } from './register-loader';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AAYH,MAAM,oBAAoB,GAAG,CAC3B,OAAwB,EACxB,aAAqB,EACrB,IAAsB,EACtB,QAAkB,EAClB,mBAAwC,KAExC,yBAAyB,CAAC;AACxB,IAAA,WAAW,EAAE,gBAAgB,CAA4B,OAAO,CAAC;IACjE,OAAO;IACP,aAAa;IACb,IAAI;IACJ,QAAQ;IACR;AACD,CAAA,CAAC;AAEG,MAAM,mCAAmC,GAAG,MAAW;AAC5D,IAAA,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,EAAE,oBAAwC,CAAC;AAC/F;;ACjCA;;;AAGG;;ACHH;;AAEG;;;;"}
@@ -0,0 +1,31 @@
1
+ import { handleFederatedModuleLoad, widgetFactoryRegistry } from '@spike-rabbit/dashboards-ng';
2
+
3
+ function setupRemoteComponent(factory, componentName, host, injector, environmentInjector) {
4
+ return handleFederatedModuleLoad({
5
+ loadPromise: this.loadRemote(factory.id, factory.options),
6
+ factory,
7
+ componentName,
8
+ host,
9
+ injector,
10
+ environmentInjector
11
+ });
12
+ }
13
+ /**
14
+ * Use this when having native federation shell and remote module is using module federation.
15
+ * @param mfInstance - The ModuleFederation instance returned by `createInstance` from '\@module-federation/runtime'
16
+ */
17
+ const registerModuleFederatedWidgetLoader = (mfInstance) => {
18
+ widgetFactoryRegistry.register('native-federation-module-bridge', setupRemoteComponent.bind(mfInstance));
19
+ };
20
+
21
+ /**
22
+ * Copyright (c) Siemens 2016 - 2026
23
+ * SPDX-License-Identifier: MIT
24
+ */
25
+
26
+ /**
27
+ * Generated bundle index. Do not edit.
28
+ */
29
+
30
+ export { registerModuleFederatedWidgetLoader };
31
+ //# sourceMappingURL=spike-rabbit-dashboards-ng-native-federation-mf-bridge.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spike-rabbit-dashboards-ng-native-federation-mf-bridge.mjs","sources":["../../../../projects/dashboards-ng/native-federation/mf-bridge/register-loader.ts","../../../../projects/dashboards-ng/native-federation/mf-bridge/index.ts","../../../../projects/dashboards-ng/native-federation/mf-bridge/spike-rabbit-dashboards-ng-native-federation-mf-bridge.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef } from '@angular/core';\nimport { ModuleFederation } from '@module-federation/runtime';\nimport {\n FederatedBridgeModule,\n FederatedModuleExports,\n handleFederatedModuleLoad,\n SetupComponentFn,\n widgetFactoryRegistry\n} from '@spike-rabbit/dashboards-ng';\nimport { Observable } from 'rxjs';\n\nfunction setupRemoteComponent<T>(\n this: ModuleFederation,\n factory: FederatedBridgeModule,\n componentName: string,\n host: ViewContainerRef,\n injector: Injector,\n environmentInjector: EnvironmentInjector\n): Observable<ComponentRef<T>> {\n return handleFederatedModuleLoad({\n loadPromise: this.loadRemote<FederatedModuleExports<T>>(factory.id, factory.options),\n factory,\n componentName,\n host,\n injector,\n environmentInjector\n });\n}\n\n/**\n * Use this when having native federation shell and remote module is using module federation.\n * @param mfInstance - The ModuleFederation instance returned by `createInstance` from '\\@module-federation/runtime'\n */\nexport const registerModuleFederatedWidgetLoader = (mfInstance: ModuleFederation): void => {\n widgetFactoryRegistry.register(\n 'native-federation-module-bridge',\n setupRemoteComponent.bind(mfInstance) as SetupComponentFn\n );\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport { registerModuleFederatedWidgetLoader } from './register-loader';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAeA,SAAS,oBAAoB,CAE3B,OAA8B,EAC9B,aAAqB,EACrB,IAAsB,EACtB,QAAkB,EAClB,mBAAwC,EAAA;AAExC,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,WAAW,EAAE,IAAI,CAAC,UAAU,CAA4B,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC;QACpF,OAAO;QACP,aAAa;QACb,IAAI;QACJ,QAAQ;QACR;AACD,KAAA,CAAC;AACJ;AAEA;;;AAGG;AACI,MAAM,mCAAmC,GAAG,CAAC,UAA4B,KAAU;AACxF,IAAA,qBAAqB,CAAC,QAAQ,CAC5B,iCAAiC,EACjC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAqB,CAC1D;AACH;;AC1CA;;;AAGG;;ACHH;;AAEG;;;;"}
@@ -0,0 +1,30 @@
1
+ import { loadRemoteModule } from '@angular-architects/native-federation';
2
+ import { handleFederatedModuleLoad, widgetFactoryRegistry } from '@spike-rabbit/dashboards-ng';
3
+
4
+ /**
5
+ * Copyright (c) Siemens 2016 - 2026
6
+ * SPDX-License-Identifier: MIT
7
+ */
8
+ const setupRemoteComponent = (factory, componentName, host, injector, environmentInjector) => handleFederatedModuleLoad({
9
+ loadPromise: loadRemoteModule(factory),
10
+ factory,
11
+ componentName,
12
+ host,
13
+ injector,
14
+ environmentInjector
15
+ });
16
+ const registerNativeFederatedWidgetLoader = () => {
17
+ widgetFactoryRegistry.register('native-federation', setupRemoteComponent);
18
+ };
19
+
20
+ /**
21
+ * Copyright (c) Siemens 2016 - 2026
22
+ * SPDX-License-Identifier: MIT
23
+ */
24
+
25
+ /**
26
+ * Generated bundle index. Do not edit.
27
+ */
28
+
29
+ export { registerNativeFederatedWidgetLoader };
30
+ //# sourceMappingURL=spike-rabbit-dashboards-ng-native-federation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spike-rabbit-dashboards-ng-native-federation.mjs","sources":["../../../../projects/dashboards-ng/native-federation/register-loader.ts","../../../../projects/dashboards-ng/native-federation/index.ts","../../../../projects/dashboards-ng/native-federation/spike-rabbit-dashboards-ng-native-federation.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { loadRemoteModule } from '@angular-architects/native-federation';\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef } from '@angular/core';\nimport {\n FederatedModule,\n FederatedModuleExports,\n handleFederatedModuleLoad,\n SetupComponentFn,\n widgetFactoryRegistry\n} from '@spike-rabbit/dashboards-ng';\nimport { Observable } 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 handleFederatedModuleLoad({\n loadPromise: loadRemoteModule<FederatedModuleExports<T>>(factory),\n factory,\n componentName,\n host,\n injector,\n environmentInjector\n });\n\nexport const registerNativeFederatedWidgetLoader = (): void => {\n widgetFactoryRegistry.register('native-federation', setupRemoteComponent as SetupComponentFn);\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport { registerNativeFederatedWidgetLoader } from './register-loader';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AAYH,MAAM,oBAAoB,GAAG,CAC3B,OAAwB,EACxB,aAAqB,EACrB,IAAsB,EACtB,QAAkB,EAClB,mBAAwC,KAExC,yBAAyB,CAAC;AACxB,IAAA,WAAW,EAAE,gBAAgB,CAA4B,OAAO,CAAC;IACjE,OAAO;IACP,aAAa;IACb,IAAI;IACJ,QAAQ;IACR;AACD,CAAA,CAAC;AAEG,MAAM,mCAAmC,GAAG,MAAW;AAC5D,IAAA,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,EAAE,oBAAwC,CAAC;AAC/F;;ACjCA;;;AAGG;;ACHH;;AAEG;;;;"}
@@ -9,7 +9,7 @@ const provideSiDashboardsTranslatableOverrides = values => ({
9
9
  });
10
10
 
11
11
  /**
12
- * Copyright (c) Siemens 2016 - 2025
12
+ * Copyright (c) Siemens 2016 - 2026
13
13
  * SPDX-License-Identifier: MIT
14
14
  */
15
15
 
@@ -1 +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;;;;"}
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 'npx update-translatable-keys' to update.\n\nexport interface SiTranslatableKeys {\n 'DASHBOARD.A11Y.WIDGETS_LIST'?: string;\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.A11Y.ACTIVATED'?: string;\n 'DASHBOARD.WIDGET.A11Y.DEACTIVATED'?: string;\n 'DASHBOARD.WIDGET.A11Y.DESCRIPTION'?: string;\n 'DASHBOARD.WIDGET.A11Y.MOVED'?: string;\n 'DASHBOARD.WIDGET.A11Y.RESIZED'?: 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 'DASHBOARD.WIDGET_LIBRARY.WIDGET_CATALOG_LIST'?: string;\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\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 - 2026\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;;;;"}