SCION Workbench Client - v1.0.0-beta.40
    Preparing search index...

    Interface WorkbenchPopupCapability

    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 WorkbenchPopup handle (and ActivatedMicrofrontend if a host microfrontend) to interact with the popup or access parameters.

    interface WorkbenchPopupCapability {
        params?: ParamDefinition[];
        properties: {
            cssClass?: string | string[];
            path: string;
            showSplash?: boolean;
            size?: WorkbenchPopupSize;
            [key: string]: unknown;
        };
        qualifier: Qualifier;
        type: Popup;
    }

    Hierarchy

    • Capability
      • WorkbenchPopupCapability
    Index

    Properties

    params?: ParamDefinition[]

    Specifies parameters required by the popup.

    Parameters can be:

    • read in the microfrontend by injecting the WorkbenchPopup handle (or ActivatedMicrofrontend if a host microfrontend)
    • referenced in the path using the colon syntax
    properties: {
        cssClass?: string | string[];
        path: string;
        showSplash?: boolean;
        size?: WorkbenchPopupSize;
        [key: string]: unknown;
    }

    Type Declaration

    • [key: string]: unknown

      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.

    • path: string

      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?: boolean

      Instructs 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.

      WorkbenchPopup.signalReady

    • Optionalsize?: WorkbenchPopupSize

      Specifies 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
    qualifier: Qualifier

    Qualifies this popup. The qualifier is required for a popup.

    type: Popup