Member Junction
    Preparing search index...

    mj-view-type-switcher — a small, self-contained dropdown that lets the user switch between the view types available for an entity (Grid / Cards / Timeline / Map / Cluster / third-party plug-ins).

    It computes its own available types from the MJ: View Types registry via the ViewTypeEngine — the exact same source the EntityViewerComponent uses — gated by each descriptor's IsAvailableFor predicate (e.g. Timeline needs a date field, Map needs geocoding, Cluster needs vectors). Icons come from ViewType.Icon metadata. There is intentionally no hardcoded fallback list: when the registry yields one type or fewer, the switcher renders nothing.

    The component is purely presentational with respect to selection — it does NOT switch the actual rendering. It emits ViewTypeSelected and the host (the entity-viewer header or the view-workspace toolbar) routes that to its existing view-type selection logic. This keeps the switcher reusable both inside the viewer's own header and lifted up into a parent toolbar without the parent-reads-child ExpressionChangedAfterItHasBeenCheckedError anti-pattern.

    <mj-view-type-switcher
    [Provider]="Provider"
    [Entity]="Entity"
    [ActiveViewTypeID]="activeViewTypeId"
    (ViewTypeSelected)="onViewTypeSelected($event)">
    </mj-view-type-switcher>

    Hierarchy (View Summary)

    Implements

    • OnInit
    Index

    Constructors

    Properties

    AvailableViewTypes: ViewTypeSwitcherOption[] = []

    The available view types for the current entity, sourced from the registry.

    DropdownOpen: boolean = false

    Whether the dropdown menu is currently open.

    Provider: IMetadataProvider | null

    If specified, this provider will be used for communication and for all metadata purposes. By default, if not provided, the Metadata and RunView classes are used for this and the default GraphQLDataProvider is used which is connected to the same back-end MJAPI instance as the Metadata and RunView classes. If you want to have this component connect to a different MJAPI back-end, create an instance of a ProviderBase sub-class like GraphQLDataProvider/etc, and configure it as appropriate to connect to the MJAPI back-end you want to use, and then pass it in here.

    ViewTypeSelected: EventEmitter<ViewTypeSelectedEvent> = ...

    Emitted when the user selects a view type from the menu. The host routes this to its existing view-type selection logic (by viewTypeId). The switcher does not change rendering itself.

    "ɵdir": unknown
    "ɵfac": unknown

    Accessors

    • get ProviderToUse(): IMetadataProvider

      Returns either the default Metadata provider or the one specified in the Provider property, if it was specified

      Returns IMetadataProvider

    • get RunQueryToUse(): IRunQueryProvider

      Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified

      Returns IRunQueryProvider

    • get RunReportToUse(): IRunReportProvider

      Returns either the default RunReport provider or the one specified in the Provider property, if it was specified

      Returns IRunReportProvider

    • get RunViewToUse(): IRunViewProvider

      Returns either the default RunView provider or the one specified in the Provider property, if it was specified

      Returns IRunViewProvider

    Methods