OptionalparamsSpecifies parameters required by the popup.
Parameters can be:
ActivatedMicrofrontend if a host microfrontend)Arbitrary metadata associated with the capability.
OptionalcssClass?: string | string[]Specifies CSS class(es) to add to the popup, e.g., to locate the popup in tests.
Specifies the path to the microfrontend.
The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
Path segments can reference capability parameters using the colon syntax.
{
"params": [
{"name": "id", "required": true}
],
"properties": {
"path": "products/:id", // `:id` references a capability parameter
}
}
Popup capabilities of the host application require an empty path. In the route, use canMatchWorkbenchPopupCapability guard to match the popup capability.
import {Routes} from '@angular/router';
import {canMatchWorkbenchMessageBoxCapability} from '@scion/workbench';
const routes: Routes = [
{path: '', canMatch: [canMatchWorkbenchPopupCapability({popup: 'info'})], component: InfoComponent},
];
OptionalshowSplash?: booleanInstructs the workbench to show a splash, such as a skeleton or loading indicator, until the popup microfrontend signals readiness.
By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
This property is not supported if a host microfrontend.
Optionalsize?: WorkbenchPopupSizeSpecifies the size of the popup.
For the popup to adapt to the size of the microfrontend content, set the size to auto and report the microfrontend's preferred size using
PreferredSizeService in the microfrontend.
import {Beans} from '@scion/toolkit/bean-manager';
import {PreferredSizeService} from '@scion/microfrontend-platform';
Beans.get(PreferredSizeService).fromDimension(<Microfrontend HTMLElement>);
``
If the content can grow and shrink, e.g., if using expandable panels, position the microfrontend `absolute` to allow infinite
space for rendering at its preferred size
Qualifies this popup. The qualifier is required for a popup.
Represents a microfrontend for display in a workbench popup.
A popup is a visual workbench element for displaying content above other content. The popup is positioned relative to an anchor based on its preferred alignment.
The microfrontend can inject the
WorkbenchPopuphandle (andActivatedMicrofrontendif a host microfrontend) to interact with the popup or access parameters.