WidgetComponentFactory Type documentation¶
TypeScript declaration¶
import type { WidgetComponentFactory } from '@siemens/dashboards-ng';Factory type that is either a WidgetComponentTypeFactory, FederatedModule, FederatedBridgeModule or WebComponent.
Types Documentation¶
FederatedBridgeModule
CommonFactoryFields & LoadRemoteBridgeOptions & { factoryType: 'native-federation-module-bridge'; [index: string]: any; } ¶import type { FederatedBridgeModule } from '@siemens/dashboards-ng';Use this when having native federation shell and remote module is using module federation.
FederatedModule
CommonFactoryFields & LoadRemoteModuleOptions & { factoryType: 'module-federation' | 'native-federation'; [index: string]: any; } ¶import type { FederatedModule } from '@siemens/dashboards-ng';Factory configuration for loading widget components from a federated module. Supports both Module Federation and Native Federation patterns for micro-frontend architectures. Use this when the widget component is hosted in a separate, independently deployed application.
WebComponent
CommonFactoryFields & { factoryType: 'web-component'; url: string; [index: string]: any; } ¶import type { WebComponent } from '@siemens/dashboards-ng'; import type { WidgetComponentTypeFactory } from '@siemens/dashboards-ng'; CommonFactoryFields
{ componentName: string; editorComponentName?: string; /** * CSS class that is added to the modal dialog when component editor dialog is shown. * Provides the option to change the size if the dialog. */ editorModalClass?: string; } ¶-
CSS class that is added to the modal dialog when component editor dialog is shown. Provides the option to change the size if the dialog.
ModuleOptions
WidgetComponentTypeBaseConfig & { moduleName: string; moduleLoader: (name: string) => Promise<any>; componentLoader?: never; } ¶Use when component is not standalone and part of a module
-
factoryType?:
"default"¶ -
moduleLoader:
(name: string) => Promise<any>¶
StandaloneOptions
WidgetComponentTypeBaseConfig & { componentLoader: <T = unknown>(componentName: string) => Promise<Type<T>>; moduleName?: never; moduleLoader?: never; } ¶Use when component is standalone
-
componentLoader:
<T = unknown>(componentName: string) => Promise<Type<T>>¶ -
factoryType?:
"default"¶
import type { LoadRemoteModuleOptions } from '@siemens/dashboards-ng';The Remote Module definition is based on @angular-architects. We take it over into this file to prevent adding a hard dependency.
LoadRemoteBridgeOptions
{ id: string; options?: | { loadFactory?: boolean | undefined; from: 'build' | 'runtime'; } | undefined; } ¶import type { LoadRemoteBridgeOptions } from '@siemens/dashboards-ng';Definition is based on @module-federation/enhanced loadRemote options. We take it over into this file to prevent adding a hard dependency.
-
factoryType?:
"default"¶
LoadRemoteModuleScriptOptions
{ type?: 'script'; remoteEntry?: string; remoteName: string; exposedModule: string; /** * Optional nonce value applied to the script element for Content Security Policy (CSP) support. * Supported in Module Federation v21.2.0+; safely ignored by earlier versions. */ nonce?: string; } ¶import type { LoadRemoteModuleScriptOptions } from '@siemens/dashboards-ng'; import type { LoadRemoteModuleEsmOptions } from '@siemens/dashboards-ng'; import type { LoadRemoteModuleManifestOptions } from '@siemens/dashboards-ng'; Except where otherwise noted, content on this site is licensed under MIT License.