Member Junction
    Preparing search index...

    ARTIFACT VIEWER PLUGIN for saved whiteboards — renders the session-channel board artifact (a WhiteboardState.ToJSON payload) as a read-only snapshot with the same export affordances the live board offers (Download HTML / Download SVG / Print).

    Resolved dynamically by the artifact plugin host via the MJ ClassFactory (keyed by the artifact type's DriverClass), which instantiates the class ONCE with a bare new to discover the component type — so this class must stay constructible outside an Angular injection context (no inject() field initializers, no constructor DI).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    artifactVersion: MJArtifactVersionEntity

    The artifact version to display

    cssClass?: string

    Optional: Additional CSS classes to apply

    height?: string

    Optional: Custom height for the viewer (defaults to auto)

    navigationRequest?: EventEmitter<NavigationRequest>

    Optional: Emitted when the plugin wants to navigate to a different app/nav item. Plugins that need app-level navigation (e.g., "Open Query" navigating to the Data Explorer's Queries nav item) should instantiate this emitter and emit a NavigationRequest. The event bubbles up through the artifact viewer chain to the host application where NavigationService handles the actual navigation.

    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.

    readonly: boolean

    Optional: Whether the viewer is in readonly mode

    tabsChanged?: EventEmitter<void>

    Optional: Emitted when the plugin's additional tabs change after async loading. Plugins that load data asynchronously (e.g., from a component registry) should emit this when loading completes and new tabs become available. The parent panel listens for this to re-run change detection and render the updated tab list.

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

    Accessors

    • get isShowingElevatedDisplay(): boolean

      Whether this plugin is showing an "elevated" display (e.g., extracted markdown/HTML) vs raw content. When true and content type is JSON, the wrapper will show a JSON tab.

      Subclasses should override this getter to return the appropriate value based on their current display state. For example, JSON plugin returns true when showing displayMarkdown or displayHtml, false when showing raw JSON editor.

      Default: false (showing raw content)

      Returns boolean

    • get parentShouldShowRawContent(): boolean

      Whether the parent wrapper should show a raw content tab (e.g., JSON tab for JSON content). This gives plugins fine-grained control over the parent's tab display.

      Use cases:

      • JSON plugin with extract rules: true (show JSON tab to view source)
      • Component plugin: true (show JSON tab even when displaying elevated component)
      • Code plugin: false (already showing raw content)

      Subclasses can override this to control parent behavior. Default: true (parent should show raw content tab if applicable)

      Returns boolean

    • 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

    • get SupportsFeedback(): boolean

      Whether this plugin supports user feedback. Plugins that return true will get a feedback button in the artifact viewer header. Override this getter to return true when feedback is available.

      Default: false

      Returns boolean

    Methods

    • Ask the user for feedback on the current artifact. Called by the artifact viewer panel when the user clicks the feedback button in the header. Each plugin implements its own feedback UX (dialog, panel, inline form, etc.).

      Default: no-op. Subclasses should override to implement artifact-type-specific feedback.

      Returns void

    • Get additional tabs that this plugin wants to provide to the artifact viewer. Override this method to provide custom tabs for viewing metadata, code, etc.

      Returns ArtifactViewerTab[]

      Array of tab definitions, or undefined if no additional tabs

    • Get the content from the artifact version. Handles both string content and JSON objects.

      Returns string

    • Get a safe display name for the artifact version

      Returns string

    • Get a display-friendly title for the artifact. Returns null if no name is available.

      Returns string | null

    • Get the raw text content from the artifact version. Returns null if no content is available.

      Returns string | null

    • Get list of standard tabs that this plugin wants to hide/remove. Use this when the plugin provides custom alternatives to standard tabs.

      Example: Component viewer provides custom "Resolved JSON" tab, so removes standard "JSON" tab

      Returns string[]

      Array of standard tab names to remove (case-insensitive) Valid values: 'JSON', 'Details', 'Links' Note: 'Display' cannot be removed (it's the main view)

    • Parse JSON content safely

      Type Parameters

      • T = any

      Returns T | null

    • Trigger a browser file download from a URL. Shared by all file-backed viewer plugins (PDF, XLSX, DOCX) so the fetch → blob → object-URL → anchor pattern lives in exactly one place.

      Parameters

      • url: string
      • fileName: string

      Returns Promise<void>