Index of the currently active table tab
The artifact version to display
OptionalcssOptional: Additional CSS classes to apply
The effective version number at which the query was last saved/updated. When viewing an older version, this looks ahead through newer versions to find the most recent savedAtVersionNumber for the same query, giving the user accurate context (e.g., "Query updated at v3" instead of the stale "Saved at v1" from this version's snapshot).
OptionalheightOptional: Custom height for the viewer (defaults to auto)
Latest version number for this artifact (from cache)
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.
Paging state — passed through to mj-query-data-grid's embedded pager
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.
Query sync state — drives the toolbar UI for saved query actions
Optional: Whether the viewer is in readonly mode
All resolved tables (from multi-table or wrapped single-table)
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.
StaticɵdirStaticɵfacThe currently active table
Current artifact version number
Whether this plugin has content to display in the Display tab. Used by the parent wrapper to determine if the Display tab should be shown.
Subclasses should override this getter to return true when they have meaningful content to display.
Default: false (subclasses must opt-in to showing Display tab)
Whether this is the latest version of the artifact
Whether we're in multi-table mode
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)
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:
Subclasses can override this to control parent behavior. Default: true (parent should show raw content tab if applicable)
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified
Returns either the default RunReport provider or the one specified in the Provider property, if it was specified
Returns either the default RunView provider or the one specified in the Provider property, if it was specified
Alias used by the template
Display name for the saved query
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
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.
Provide Plan tab (markdown), SQL tab (code), and Interpretation tab when available
ProtectedgetGet the content from the artifact version. Handles both string content and JSON objects.
Returns a DataSnapshot with live grid data, current page state, and query sync state.
ProtectedgetGet the description
ProtectedgetGet a safe display name for the artifact version
ProtectedgetGet a display-friendly title for the artifact. Returns null if no name is available.
ProtectedgetGet the raw text content from the artifact version. Returns null if no content is available.
OptionalGetGet 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
Array of standard tab names to remove (case-insensitive) Valid values: 'JSON', 'Details', 'Links' Note: 'Display' cannot be removed (it's the main view)
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
Close the dropdown (e.g., on outside click)
Handle entity link click from the grid and bubble up as openEntityRecord. Converts the grid's recordId string into a CompositeKey for the artifact viewer pipeline.
Navigate to the saved query in the Data Explorer's Queries browser
Handle page change from the data grid's embedded pager. Re-executes the query for the active table with new page parameters.
Handle successful save from the dialog (both initial save and "save as new")
Re-execute the live SQL query for the active table
Save as a new query (from the dropdown). Opens the save dialog which creates a fresh query record.
Show the save panel for creating a brand-new query
Switch to a different table tab. Loads data lazily if not already cached.
Toggle the update query dropdown
Update the existing saved query's SQL to match this version. Only available from the latest version (Scenario 3).
ProtectedparseProtectedtriggerTrigger 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.
Viewer component for Data artifacts.
Displays tabular data using AG Grid via mj-query-data-grid. Supports two modes:
The Query Builder agent emits artifacts with metadata.sql for live execution.