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

    Interface WorkbenchPartCapability

    A part is a visual element of the workbench layout. Parts can be docked to the side or positioned relative to each other. A part can display content or stack views.

    The arrangement of parts is defined in a WorkbenchPerspectiveCapability. Each part defined in the perspective references a part capability to contribute content, either a microfrontend, a stack of views, or both. If both, the microfrontend is displayed only if the view stack is empty. Views in a docked part cannot be dragged into or out of docked parts.

    The part microfrontend can inject the WorkbenchPart handle to interact with the part.

    WorkbenchPart

    interface WorkbenchPartCapability {
        params?: ParamDefinition[];
        properties?: {
            cssClass?: string | string[];
            extras?: DockedPartExtras;
            path?: string;
            resolve?: { [name: string]: string };
            showSplash?: boolean;
            title?: string | false;
            views?: WorkbenchViewRef[];
            [key: string]: unknown;
        };
        qualifier: Qualifier;
        type: Part;
    }

    Hierarchy

    • Capability
      • WorkbenchPartCapability
    Index

    Properties

    params?: ParamDefinition[]

    Specifies parameters required by this part.

    Parameters can be read in the microfrontend by injecting the WorkbenchPart handle, or referenced in path, title, label, tooltip and resolvers using the colon syntax.

    properties?: {
        cssClass?: string | string[];
        extras?: DockedPartExtras;
        path?: string;
        resolve?: { [name: string]: string };
        showSplash?: boolean;
        title?: string | false;
        views?: WorkbenchViewRef[];
        [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 part, e.g., to locate the part in tests.

    • Optionalextras?: DockedPartExtras

      Controls the appearance of a docked part and its toggle button.

      A docked part is a part that is docked to the left, right, or bottom side of the workbench.

      This property only applies to docked parts. The perspective determines whether a part is docked or positioned relative to another part.

    • Optionalpath?: 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": "read", "required": false}
      ],
      "properties": {
      "path": "tasks?read=:read", // `:read` references a capability parameter
      }
      }

      If the part contains views, the microfrontend is displayed only if the view stack is empty.

    • Optionalresolve?: { [name: string]: string }

      Defines resolvers for use in the title, label and tooltip.

      A resolver defines a topic where a request is sent to resolve text or a translation key, typically based on capability parameters. Topic segments can reference capability parameters using the colon syntax.

      The application can respond to resolve requests by installing a message listener in the activator. Refer to ActivatorCapability for registering an activator.

      import {Beans} from '@scion/toolkit/bean-manager';
      import {MessageClient} from '@scion/microfrontend-platform';

      Beans.get(MessageClient).onMessage('tasks/count', message => {
      return ...;
      });
    • OptionalshowSplash?: boolean

      Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the microfrontend signals readiness.

      By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.

      This property only applies to the microfrontend loaded into the part, not views stacked in the part.

      WorkbenchPart.signalReady

    • Optionaltitle?: string | false

      Specifies the title displayed in the part bar.

      Defaults to extras.label if a docked part. Set to false to not display a title.

      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.

      Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See resolve for defining resolvers.

    • Optionalviews?: WorkbenchViewRef[]

      Specifies views to stack in the part.

      Microfrontends provided as view capability can be referenced. Views are stacked in declaration order.

      Declaring an intention allows for referencing public view capabilities of other applications. If a view capability cannot be resolved, the view is omitted, allowing conditional display, for example, based on user permissions.

      If a docked part, views cannot be dragged in or out.

    qualifier: Qualifier

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

    type: Part