SetupComponentFn Type documentation¶
TypeScript declaration¶
SetupComponentFn
<T>( factory: WidgetComponentFactory, componentName: string, host: ViewContainerRef, injector: Injector, envInjector: EnvironmentInjector ) => Observable<ComponentRef<T>> ¶ import type { SetupComponentFn } from '@siemens/dashboards-ng';
Types Documentation¶
Factory type that is either a WidgetComponentTypeFactory, FederatedModule, FederatedBridgeModule or WebComponent.import type { WidgetComponentFactory } from '@siemens/dashboards-ng';
import type { WidgetComponentTypeFactory } 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. FederatedModule
CommonFactoryFields & LoadRemoteModuleOptions & { factoryType: 'module-federation' | 'native-federation'; [index: string]: any; } ¶ import type { FederatedModule } from '@siemens/dashboards-ng';
WebComponent
CommonFactoryFields & { factoryType: 'web-component'; url: string; [index: string]: any; } ¶ import type { WebComponent } from '@siemens/dashboards-ng';
Use this when having native federation shell and remote module is using module federation. FederatedBridgeModule
CommonFactoryFields & LoadRemoteBridgeOptions & { factoryType: 'native-federation-module-bridge'; [index: string]: any; } ¶ import type { FederatedBridgeModule } from '@siemens/dashboards-ng';
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 ? : 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; } ¶
string ¶
Use when component is not standalone and part of a module factoryType ? : moduleLoader : ModuleOptions
WidgetComponentTypeBaseConfig & { moduleName: string; moduleLoader: (name: string) => Promise<any>; componentLoader?: never; } ¶
"default" ¶ (name: string) => Promise<any> ¶
Use when component is standalone componentLoader : factoryType ? : moduleLoader ? : moduleName ? : StandaloneOptions
WidgetComponentTypeBaseConfig & { componentLoader: <T = unknown>(componentName: string) => Promise<Type<T>>; moduleName?: never; moduleLoader?: never; } ¶
<T = unknown>(componentName: string) => Promise<Type<T>> ¶ "default" ¶ undefined ¶ undefined ¶
The Remote Module definition is based on import type { LoadRemoteModuleOptions } from '@siemens/dashboards-ng';@angular-architects. We take it over into this file to prevent adding a hard dependency.
Definition is based on LoadRemoteBridgeOptions
{ id: string; options?: | { loadFactory?: boolean | undefined; from: 'build' | 'runtime'; } | undefined; } ¶ import type { LoadRemoteBridgeOptions } from '@siemens/dashboards-ng';@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.