OptionalparamsSpecifies parameters required by the message box.
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 message box, e.g., to locate the message box 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
}
}
Messagebox capabilities of the host application require an empty path. In the route, use canMatchWorkbenchMessageBoxCapability guard to match the messagebox capability.
import {Routes} from '@angular/router';
import {canMatchWorkbenchMessageBoxCapability} from '@scion/workbench';
const routes: Routes = [
{path: '', canMatch: [canMatchWorkbenchMessageBoxCapability({messagebox: 'alert'})], component: AlertComponent},
];
OptionalshowSplash?: booleanInstructs the workbench to show a splash, such as a skeleton or loading indicator, until the message box 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?: WorkbenchMessageBoxSizeSpecifies the size of the message box.
For the message box 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.
Qualifies the message box. The qualifier is required for a message box.
Represents a microfrontend for display in a workbench message box.
A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert, or for prompting the user for confirmation.
Displayed on top of other content, a modal message box blocks interaction with other parts of the application. A message box can be context-modal or application-modal. Message boxes are stacked per modality, with only the topmost message box in each stack being interactive.
The microfrontend can inject the
WorkbenchMessageBoxhandle (andActivatedMicrofrontendif a host microfrontend) to interact with the message box or access parameters.See