Member Junction
    Preparing search index...

    Framework-agnostic-ish descriptor for a single view type.

    A descriptor is the bridge between the MJ: View Types metadata row (which stores the DriverClass name) and the concrete Angular components that actually render the view and edit its configuration. Descriptors are registered with the ClassFactory via @RegisterClass(BaseViewTypeDescriptor, '<DriverClass>') so they can be discovered by name without a hard import from the host.

    interface IViewTypeDescriptor {
        DisplayName: string;
        Icon: string;
        Name: string;
        PropSheetComponent?: Type<unknown>;
        RendererComponent: Type<unknown>;
        UsesCanonicalGridState?: boolean;
        EnsureAvailabilityData?(provider?: IMetadataProvider): Promise<void>;
        IsAvailableFor(entity: EntityInfo, provider?: IMetadataProvider): boolean;
    }

    Implemented by

    Index

    Properties

    DisplayName: string

    User-facing label shown in the view-mode switcher (e.g. "Grid", "Tag Cloud").

    Icon: string

    Font Awesome icon class shown in the switcher (e.g. "fa-solid fa-table").

    Name: string

    Stable internal key for the view type — matches the DriverClass column on the MJ: View Types entity and the @RegisterClass registration key (e.g. "GridViewType", "CardsViewType").

    PropSheetComponent?: Type<unknown>

    Optional Angular component class for this view type's configuration prop-sheet (honors IViewPropSheet). Undefined when the view type has no configurable options.

    RendererComponent: Type<unknown>

    The Angular component class that renders this view type. The host instantiates / mounts this component and feeds it data per the IViewRenderer contract.

    UsesCanonicalGridState?: boolean

    When true, this view type's config.gridState is backed by the canonical UserView.GridState column (the single, framework-wide store for a view's columns / sort / filter / aggregates — also read by MJUserViewEntity.Columns, the GraphQL data provider's field list, and export) rather than by an opaque per-view-type blob in DisplayState.viewTypeConfigs.

    The container honors this by (a) seeding the renderer's config.gridState from the canonical store and (b) routing the renderer's configChanged.gridState back to it on persist. This keeps the grid, the config panel, the server query, and export all reading/writing one source of truth. Defaults to false, so non-grid view types (Cards/Timeline/Map) keep their opaque per-type config.

    Methods

    • Optional async hook to load any data this descriptor's IsAvailableFor predicate depends on (e.g. the Cluster view type needs the set of entities that have an active Entity Document with vectors). The host awaits this once — before computing availability — so the synchronous predicate can read from a now-populated cache. Implementations should be cheap/idempotent (typically await SomeEngine.Instance.Config(false, ...)). Omit when availability is computable purely from the EntityInfo (Grid/Cards/Timeline/Map).

      Parameters

      • Optionalprovider: IMetadataProvider

        optional metadata provider (for multi-provider scenarios)

      Returns Promise<void>