Interface IComponentsRegistry

Defines the viewer components registry interface.

interface IComponentsRegistry {
    createComponent(name: string, viewer: IViewer): IComponent;
    getComponents(): Map<string, IComponentProvider>;
    registerComponent(name: string, provider: IComponentProvider): void;
    registerComponentAlias(name: string, alias: string): void;
}

Methods

  • Creates the component denoted by the given name. Returns null if a component with given name not registered.

    Parameters

    • name: string

      Component name.

    • viewer: IViewer

      Viewer instance that wants to create the component.

    Returns IComponent

  • Binds a component name to a component. Registering a component with an existing name twice overrides the existing component.

    Parameters

    • name: string

      Unique name for the component.

    • provider: IComponentProvider

      Component provider.

    Returns void

  • Registers an alias for a component.

    Parameters

    • name: string

      Unique name for the component.

    • alias: string

      Component alias string.

    Returns void