@siemens/dashboards-ng 49.0.0-rc.2 → 49.0.0-rc.3
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/fesm2022/siemens-dashboards-ng-module-federation.mjs +9 -21
- package/fesm2022/siemens-dashboards-ng-module-federation.mjs.map +1 -1
- package/fesm2022/siemens-dashboards-ng-native-federation-mf-bridge.mjs +8 -20
- package/fesm2022/siemens-dashboards-ng-native-federation-mf-bridge.mjs.map +1 -1
- package/fesm2022/siemens-dashboards-ng-native-federation.mjs +9 -23
- package/fesm2022/siemens-dashboards-ng-native-federation.mjs.map +1 -1
- package/fesm2022/siemens-dashboards-ng.mjs +34 -3
- package/fesm2022/siemens-dashboards-ng.mjs.map +1 -1
- package/package.json +3 -3
- package/types/siemens-dashboards-ng.d.ts +42 -2
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { loadRemoteModule } from '@angular-architects/module-federation';
|
|
2
|
-
import { widgetFactoryRegistry } from '@siemens/dashboards-ng';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
2
|
+
import { handleFederatedModuleLoad, widgetFactoryRegistry } from '@siemens/dashboards-ng';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Copyright (c) Siemens 2016 - 2025
|
|
7
6
|
* SPDX-License-Identifier: MIT
|
|
8
7
|
*/
|
|
9
|
-
const setupRemoteComponent = (factory, componentName, host, injector, environmentInjector) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-dashboards-ng-module-federation.mjs","sources":["../../../../projects/dashboards-ng/module-federation/index.ts","../../../../projects/dashboards-ng/module-federation/siemens-dashboards-ng-module-federation.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef
|
|
1
|
+
{"version":3,"file":"siemens-dashboards-ng-module-federation.mjs","sources":["../../../../projects/dashboards-ng/module-federation/index.ts","../../../../projects/dashboards-ng/module-federation/siemens-dashboards-ng-module-federation.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { loadRemoteModule } from '@angular-architects/module-federation';\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef } from '@angular/core';\nimport {\n FederatedModule,\n FederatedModuleExports,\n handleFederatedModuleLoad,\n SetupComponentFn,\n widgetFactoryRegistry\n} from '@siemens/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 * 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;;AAEG;;;;"}
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
import { widgetFactoryRegistry } from '@siemens/dashboards-ng';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
1
|
+
import { handleFederatedModuleLoad, widgetFactoryRegistry } from '@siemens/dashboards-ng';
|
|
3
2
|
|
|
4
3
|
function setupRemoteComponent(factory, componentName, host, injector, environmentInjector) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
result.next(widgetInstanceRef);
|
|
14
|
-
}
|
|
15
|
-
result.complete();
|
|
16
|
-
}, rejection => {
|
|
17
|
-
const msg = rejection
|
|
18
|
-
? `Loading widget module ${factory.exposedModule} failed with ${JSON.stringify(rejection.toString())}`
|
|
19
|
-
: `Loading widget module ${factory.exposedModule} failed`;
|
|
20
|
-
result.error(msg);
|
|
21
|
-
result.complete();
|
|
4
|
+
return handleFederatedModuleLoad({
|
|
5
|
+
loadPromise: this.loadRemote(factory.id, factory.options),
|
|
6
|
+
factory,
|
|
7
|
+
componentName,
|
|
8
|
+
host,
|
|
9
|
+
injector,
|
|
10
|
+
environmentInjector
|
|
22
11
|
});
|
|
23
|
-
return result;
|
|
24
12
|
}
|
|
25
13
|
/**
|
|
26
14
|
* Use this when having native federation shell and remote module is using module federation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-dashboards-ng-native-federation-mf-bridge.mjs","sources":["../../../../projects/dashboards-ng/native-federation/mf-bridge/index.ts","../../../../projects/dashboards-ng/native-federation/mf-bridge/siemens-dashboards-ng-native-federation-mf-bridge.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef
|
|
1
|
+
{"version":3,"file":"siemens-dashboards-ng-native-federation-mf-bridge.mjs","sources":["../../../../projects/dashboards-ng/native-federation/mf-bridge/index.ts","../../../../projects/dashboards-ng/native-federation/mf-bridge/siemens-dashboards-ng-native-federation-mf-bridge.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\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 '@siemens/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 * 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;;AAEG;;;;"}
|
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
import { loadRemoteModule } from '@angular-architects/native-federation';
|
|
2
|
-
import { widgetFactoryRegistry } from '@siemens/dashboards-ng';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
2
|
+
import { handleFederatedModuleLoad, widgetFactoryRegistry } from '@siemens/dashboards-ng';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Copyright (c) Siemens 2016 - 2025
|
|
7
6
|
* SPDX-License-Identifier: MIT
|
|
8
7
|
*/
|
|
9
|
-
const setupRemoteComponent = (factory, componentName, host, injector, environmentInjector) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
result.next(widgetInstanceRef);
|
|
19
|
-
}
|
|
20
|
-
result.complete();
|
|
21
|
-
}, rejection => {
|
|
22
|
-
const msg = rejection
|
|
23
|
-
? `Loading widget module ${factory.exposedModule} failed with ${JSON.stringify(rejection.toString())}`
|
|
24
|
-
: `Loading widget module ${factory.exposedModule} failed`;
|
|
25
|
-
result.error(msg);
|
|
26
|
-
result.complete();
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
};
|
|
8
|
+
const setupRemoteComponent = (factory, componentName, host, injector, environmentInjector) => handleFederatedModuleLoad({
|
|
9
|
+
loadPromise: loadRemoteModule(factory),
|
|
10
|
+
factory,
|
|
11
|
+
componentName,
|
|
12
|
+
host,
|
|
13
|
+
injector,
|
|
14
|
+
environmentInjector
|
|
15
|
+
});
|
|
30
16
|
const registerNativeFederatedWidgetLoader = () => {
|
|
31
17
|
widgetFactoryRegistry.register('native-federation', setupRemoteComponent);
|
|
32
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-dashboards-ng-native-federation.mjs","sources":["../../../../projects/dashboards-ng/native-federation/index.ts","../../../../projects/dashboards-ng/native-federation/siemens-dashboards-ng-native-federation.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { loadRemoteModule } from '@angular-architects/native-federation';\nimport { ComponentRef, EnvironmentInjector, Injector, ViewContainerRef
|
|
1
|
+
{"version":3,"file":"siemens-dashboards-ng-native-federation.mjs","sources":["../../../../projects/dashboards-ng/native-federation/index.ts","../../../../projects/dashboards-ng/native-federation/siemens-dashboards-ng-native-federation.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2025\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 '@siemens/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 * 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;;AAEG;;;;"}
|
|
@@ -783,13 +783,13 @@ class SiWidgetHostComponent {
|
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
785
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWidgetHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
786
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiWidgetHostComponent, isStandalone: true, selector: "si-widget-host", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { remove: "remove", edit: "edit" }, host: { classAttribute: "grid-stack-item" }, viewQueries: [{ propertyName: "card", first: true, predicate: ["card"], descendants: true, isSignal: true }, { propertyName: "widgetHost", first: true, predicate: ["widgetHost"], descendants: true, read: ViewContainerRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable$ | async) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine\"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions\"\n [secondaryActions]=\"secondaryActions\"\n [actionBarViewType]=\"actionBarViewType\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"widgetConfig().image?.src\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n\n @if (widgetInstanceFooter) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"widgetInstanceFooter\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:0 0 8px var(--element-box-shadow-color-1),0 8px 8px var(--element-box-shadow-color-2)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important}.resize-handle{inset-block-end:6px;color:var(--element-ui-2);pointer-events:none;position:absolute;inset-inline-end:6px;text-align:center;z-index:10}.draggable-overlay{inset
|
|
786
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiWidgetHostComponent, isStandalone: true, selector: "si-widget-host", inputs: { widgetConfig: { classPropertyName: "widgetConfig", publicName: "widgetConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { remove: "remove", edit: "edit" }, host: { classAttribute: "grid-stack-item" }, viewQueries: [{ propertyName: "card", first: true, predicate: ["card"], descendants: true, isSignal: true }, { propertyName: "widgetHost", first: true, predicate: ["widgetHost"], descendants: true, read: ViewContainerRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable$ | async) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine\"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions\"\n [secondaryActions]=\"secondaryActions\"\n [actionBarViewType]=\"actionBarViewType\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"widgetConfig().image?.src\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n\n @if (widgetInstanceFooter) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"widgetInstanceFooter\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:0 0 8px var(--element-box-shadow-color-1),0 8px 8px var(--element-box-shadow-color-2)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important;inset-block-end:6px!important;inset-inline-end:6px!important}.resize-handle{inset-block-end:6px;color:var(--element-ui-2);pointer-events:none;position:absolute;inset-inline-end:6px;text-align:center;z-index:10}.draggable-overlay{inset:8px;position:absolute;z-index:100}\n"], dependencies: [{ kind: "component", type: SiDashboardCardComponent, selector: "si-dashboard-card", inputs: ["restoreText", "expandText", "enableExpandInteraction", "showMenubar"], outputs: ["expandChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
787
787
|
}
|
|
788
788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiWidgetHostComponent, decorators: [{
|
|
789
789
|
type: Component,
|
|
790
790
|
args: [{ selector: 'si-widget-host', imports: [SiDashboardCardComponent, AsyncPipe, NgTemplateOutlet], host: {
|
|
791
791
|
class: 'grid-stack-item'
|
|
792
|
-
}, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable$ | async) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine\"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions\"\n [secondaryActions]=\"secondaryActions\"\n [actionBarViewType]=\"actionBarViewType\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"widgetConfig().image?.src\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n\n @if (widgetInstanceFooter) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"widgetInstanceFooter\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:0 0 8px var(--element-box-shadow-color-1),0 8px 8px var(--element-box-shadow-color-2)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important}.resize-handle{inset-block-end:6px;color:var(--element-ui-2);pointer-events:none;position:absolute;inset-inline-end:6px;text-align:center;z-index:10}.draggable-overlay{inset
|
|
792
|
+
}, template: "<div class=\"grid-stack-item-content p-4\">\n @if (editable$ | async) {\n <div class=\"resize-handle\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path d=\"M16 16H18V18H16V16Z\" fill=\"currentColor\" />\n <path d=\"M11 16H13V18H11V16Z\" fill=\"currentColor\" />\n <path d=\"M11 11H13V13H11V11Z\" fill=\"currentColor\" />\n <path d=\"M6 16H8V18H6V16Z\" fill=\"currentColor\" />\n <path d=\"M16 11H18V13H16V11Z\" fill=\"currentColor\" />\n <path d=\"M16 6H18V8H16V6Z\" fill=\"currentColor\" />\n </g>\n </svg>\n </div>\n <div class=\"draggable-overlay\"></div>\n }\n <si-dashboard-card\n #card\n class=\"h-100 dragging-card\"\n [class]=\"accentLine\"\n [expandText]=\"labelExpand\"\n [restoreText]=\"labelRestore\"\n [heading]=\"widgetConfig().heading\"\n [primaryActions]=\"primaryActions\"\n [secondaryActions]=\"secondaryActions\"\n [actionBarViewType]=\"actionBarViewType\"\n [enableExpandInteraction]=\"widgetConfig().expandable\"\n [imgAlt]=\"widgetConfig().image?.alt\"\n [imgDir]=\"widgetConfig().image?.dir\"\n [imgObjectFit]=\"widgetConfig().image?.objectFit\"\n [imgObjectPosition]=\"widgetConfig().image?.objectPosition\"\n [imgSrc]=\"widgetConfig().image?.src\"\n >\n <div class=\"card-body overflow-auto\" body>\n <ng-container #widgetHost />\n </div>\n\n @if (widgetInstanceFooter) {\n <div class=\"card-footer\" footer>\n <ng-container *ngTemplateOutlet=\"widgetInstanceFooter\" />\n </div>\n }\n </si-dashboard-card>\n</div>\n", styles: [":host{display:flex}::ng-deep body:not(:has(.ui-draggable-dragging)) .draggable-overlay{cursor:grab}::ng-deep si-content-action-bar{z-index:500}::ng-deep .ui-droppable.ui-droppable-over>*:not(.ui-droppable){cursor:move!important;pointer-events:inherit!important}::ng-deep .ui-draggable-dragging .dragging-card,::ng-deep .ui-resizable-resizing .dragging-card{box-shadow:0 0 8px var(--element-box-shadow-color-1),0 8px 8px var(--element-box-shadow-color-2)!important}::ng-deep .ui-draggable-dragging>.grid-stack-item-content,::ng-deep .ui-resizable-resizing>.grid-stack-item-content{box-shadow:none;opacity:1}::ng-deep .ui-resizable-handle{display:block!important}::ng-deep .ui-resizable-se{background-image:none!important;transform:none!important;inset-block-end:6px!important;inset-inline-end:6px!important}.resize-handle{inset-block-end:6px;color:var(--element-ui-2);pointer-events:none;position:absolute;inset-inline-end:6px;text-align:center;z-index:10}.draggable-overlay{inset:8px;position:absolute;z-index:100}\n"] }]
|
|
793
793
|
}], propDecorators: { widgetConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfig", required: true }] }], remove: [{ type: i0.Output, args: ["remove"] }], edit: [{ type: i0.Output, args: ["edit"] }], card: [{ type: i0.ViewChild, args: ['card', { isSignal: true }] }], widgetHost: [{ type: i0.ViewChild, args: ['widgetHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
794
794
|
|
|
795
795
|
/**
|
|
@@ -2142,6 +2142,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
2142
2142
|
args: [{ selector: 'si-flexible-dashboard', imports: [SiDashboardComponent, SiDashboardToolbarComponent, SiGridComponent, AsyncPipe], template: "<si-dashboard #dashboard [heading]=\"pageTitle()\" [sticky]=\"true\">\n <si-dashboard-toolbar\n #toolbar\n menubar\n [class.d-none]=\"!isDashboardVisible()\"\n [primaryEditActions]=\"(primaryEditActions$ | async) ?? []\"\n [secondaryEditActions]=\"(secondaryEditActions$ | async) ?? []\"\n [editable]=\"editable()\"\n [disabled]=\"(grid.isLoading | async) ?? false\"\n [hideEditButton]=\"hideEditButton()\"\n [showEditButtonLabel]=\"showEditButtonLabel()\"\n (editableChange)=\"grid.edit()\"\n (save)=\"grid.save()\"\n (cancel)=\"grid.cancel()\"\n >\n <ng-content select=\"[filters-slot]\" filters-slot />\n </si-dashboard-toolbar>\n\n <div dashboard class=\"d-contents\">\n <si-grid\n #grid\n [class.d-none]=\"!isDashboardVisible()\"\n [gridConfig]=\"config()?.grid\"\n [dashboardId]=\"dashboardId()\"\n [widgetCatalog]=\"widgetCatalog()\"\n [hideProgressIndicator]=\"hideProgressIndicator()\"\n [widgetInstanceEditorDialogComponent]=\"widgetInstanceEditorDialogComponent()\"\n [emitWidgetInstanceEditEvents]=\"true\"\n [(editable)]=\"editable\"\n (isModified)=\"onModified($event)\"\n (widgetInstanceEdit)=\"editWidgetInstance($event)\"\n >\n <ng-content select=\"[empty-state]\" empty-state />\n </si-grid>\n <ng-container #catalogHost />\n </div>\n</si-dashboard>\n", styles: [":host{display:flex;flex:1 1 0;flex-direction:column}\n"] }]
|
|
2143
2143
|
}], propDecorators: { editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }, { type: i0.Output, args: ["editableChange"] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], widgetCatalogComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetCatalogComponent", required: false }] }], widgetInstanceEditorDialogComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetInstanceEditorDialogComponent", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], widgetCatalog: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetCatalog", required: false }] }], hideAddWidgetInstanceButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideAddWidgetInstanceButton", required: false }] }], hideEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideEditButton", required: false }] }], showEditButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButtonLabel", required: false }] }], hideProgressIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideProgressIndicator", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }], dashboard: [{ type: i0.ViewChild, args: ['dashboard', { isSignal: true }] }], catalogHost: [{ type: i0.ViewChild, args: ['catalogHost', { ...{ read: ViewContainerRef }, isSignal: true }] }], isModified: [{ type: i0.Output, args: ["isModified"] }], toolbar: [{ type: i0.ViewChild, args: ['toolbar', { isSignal: true }] }] } });
|
|
2144
2144
|
|
|
2145
|
+
/**
|
|
2146
|
+
* Formats an error message for failed module loading.
|
|
2147
|
+
*/
|
|
2148
|
+
const formatLoadingError = (factory, rejection) => rejection
|
|
2149
|
+
? `Loading widget module ${factory.exposedModule} failed with ${String(rejection)}`
|
|
2150
|
+
: `Loading widget module ${factory.exposedModule} failed`;
|
|
2151
|
+
/**
|
|
2152
|
+
* Handles the result of a federated module loading promise.
|
|
2153
|
+
* This is the main utility function that encapsulates the common loading pattern
|
|
2154
|
+
* used across module-federation, native-federation, and mf-bridge loaders.
|
|
2155
|
+
*
|
|
2156
|
+
* @param options - Configuration options for loading and creating the component
|
|
2157
|
+
* @returns Observable that emits the ComponentRef once the component is created
|
|
2158
|
+
* @internal
|
|
2159
|
+
*/
|
|
2160
|
+
const handleFederatedModuleLoad = ({ loadPromise, factory, componentName, host, injector, environmentInjector }) => {
|
|
2161
|
+
const result = new Subject();
|
|
2162
|
+
loadPromise.then(module => {
|
|
2163
|
+
if (module) {
|
|
2164
|
+
const componentType = module[factory[componentName]];
|
|
2165
|
+
const widgetInstanceRef = host.createComponent(componentType, {
|
|
2166
|
+
injector,
|
|
2167
|
+
environmentInjector
|
|
2168
|
+
});
|
|
2169
|
+
result.next(widgetInstanceRef);
|
|
2170
|
+
}
|
|
2171
|
+
result.complete();
|
|
2172
|
+
}, rejection => result.error(formatLoadingError(factory, rejection)));
|
|
2173
|
+
return result;
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2145
2176
|
/**
|
|
2146
2177
|
* Copyright (c) Siemens 2016 - 2025
|
|
2147
2178
|
* SPDX-License-Identifier: MIT
|
|
@@ -2185,5 +2216,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
2185
2216
|
* Generated bundle index. Do not edit.
|
|
2186
2217
|
*/
|
|
2187
2218
|
|
|
2188
|
-
export { DEFAULT_GRIDSTACK_OPTIONS, DEFAULT_WIDGET_STORAGE_TOKEN, SI_DASHBOARD_CONFIGURATION, SI_WIDGET_ID_PROVIDER, SI_WIDGET_STORE, STORAGE_KEY, SiDashboardsNgModule, SiDefaultWidgetStorage, SiFlexibleDashboardComponent, SiGridComponent, SiWidgetCatalogComponent, SiWidgetDefaultIdProvider, SiWidgetIdProvider, SiWidgetInstanceEditorDialogComponent, SiWidgetStorage, SiDashboardsNgModule as SimplDashboardsNgModule, createWidgetConfig, setupWidgetEditor, setupWidgetInstance, widgetFactoryRegistry };
|
|
2219
|
+
export { DEFAULT_GRIDSTACK_OPTIONS, DEFAULT_WIDGET_STORAGE_TOKEN, SI_DASHBOARD_CONFIGURATION, SI_WIDGET_ID_PROVIDER, SI_WIDGET_STORE, STORAGE_KEY, SiDashboardsNgModule, SiDefaultWidgetStorage, SiFlexibleDashboardComponent, SiGridComponent, SiWidgetCatalogComponent, SiWidgetDefaultIdProvider, SiWidgetIdProvider, SiWidgetInstanceEditorDialogComponent, SiWidgetStorage, SiDashboardsNgModule as SimplDashboardsNgModule, createWidgetConfig, handleFederatedModuleLoad, setupWidgetEditor, setupWidgetInstance, widgetFactoryRegistry };
|
|
2189
2220
|
//# sourceMappingURL=siemens-dashboards-ng.mjs.map
|