AbstractAbstract Readonlyactive$Indicates whether this view is active.
Upon subscription, emits the active state of this view, and then emits continuously when it changes. The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend of the same application.
Abstract Readonlycapability$Capability of the microfrontend loaded into the view.
Upon subscription, emits the microfrontend's capability, and then emits continuously when navigating to a different microfrontend of the same application. It completes when navigating to a microfrontend of another application.
Abstract Readonlyfocused$Indicates whether this view has the focus.
Upon subscription, emits the focused state of this view, and then emits continuously when it changes. The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend of the same application.
Abstract ReadonlyidUnique identity of this view.
Abstract Readonlyparams$Parameters of the microfrontend loaded into the view.
Upon subscription, emits the microfrontend's parameters, and then emits continuously when the parameters change. The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend of the same application.
Abstract ReadonlypartGets the identity of the part that contains this view.
Upon subscription, emits the identity of this view's part, and then emits continuously when it changes. The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend of the same application.
Abstract ReadonlysnapshotThe current snapshot of this view.
AbstractcanRegisters a guard to confirm closing the view, replacing any previous guard.
Example:
Beans.get(WorkbenchView).canClose(async () => {
const action = await Beans.get(WorkbenchMessageBoxService).open('Do you want to save changes?', {
actions: {
yes: 'Yes',
no: 'No',
cancel: 'Cancel'
}
});
switch (action) {
case 'yes':
// Store changes ...
return true;
case 'no':
return true;
default:
return false;
}
});
Callback to confirm closing the view.
Reference to the CanClose guard, which can be used to unregister the guard.
AbstractcloseInitiates the closing of this workbench view.
AbstractmarkSets whether this view is dirty or pristine. When navigating to another microfrontend, the view's dirty state is set to pristine.
You can provide the dirty/pristine state either as a boolean or as Observable. If you pass an Observable, it will be unsubscribed when navigating to another microfrontend, whether from the same app or a different one.
If not passing an argument, the view is marked as dirty. To mark it as pristine, you need to pass false.
Optionaldirty: boolean | Observable<boolean>AbstractsetControls whether the user should be allowed to close this workbench view.
You can provide either a boolean or Observable. If you pass an Observable, it will be unsubscribed when navigating to another microfrontend, whether from the same app or a different one.
AbstractsetSets the subtitle to be displayed in the view tab.
Can be text or a translation key. A translation key starts with the percent symbol (%) and may include parameters in matrix notation for text interpolation.
AbstractsetSets the title to be displayed in the view tab.
Can be text or a translation key. A translation key starts with the percent symbol (%) and may include parameters in matrix notation for text interpolation.
Abstractsignal
A view is a visual workbench element for displaying content stacked or side-by-side in the workbench layout.
Users can drag views from one part to another, even across windows, or place them side-by-side, horizontally and vertically.
The view microfrontend can inject this handle to interact with the view.
See
WorkbenchViewCapability