SCION Workbench Client - v1.0.0-beta.38
    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 {
        properties: {
            cssClass?: string | string[];
            path: string;
            showSplash?: boolean;
            size?: WorkbenchPopupSize;
            [key: string]: unknown;
        };
        qualifier: Qualifier;
        type: Popup;
    }

    Hierarchy

    • Capability
      • WorkbenchPopupCapability
    Index

    Properties

    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 this popup.

      If not set, the microfrontend can report the preferred size using @scion/microfrontend-platform!PreferredSizeService.

      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.

      Since loading a microfrontend may take time, prefer setting the popup size in the popup capability to avoid flickering when opening the popup.

    qualifier: Qualifier

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

    type: Popup