Emitted when the user clicks "Apply to my form" on a form-role artifact. Carries the spec (ready to hand to the agent's Create/Modify action) and the entity name. The host is responsible for confirming + invoking the actual server action.
The artifact version to display
OptionalcssOptional: Additional CSS classes to apply
Entity the form targets — resolved from spec.entityName / dataRequirements.
The real or fixture record currently bound to the form preview.
True iff formRecord is a real DB row (vs a fixture NewRecord()).
Label for the chip (e.g. the record's Name field).
OptionalheightOptional: Custom height for the viewer (defaults to auto)
OptionalinteractiveTrue when this artifact's spec declares componentRole: 'form'.
OptionalnavigationOptional: 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.
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.
OptionalreactOptional: Whether the viewer is in readonly mode
Picker UI state.
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ɵfacWhether this plugin has content to display in the Display tab. Returns true only if the component has code that can be rendered.
IMPORTANT: Uses this.component (synchronously loaded from artifact JSON) instead of resolvedComponentSpec (which depends on async React loading). This ensures hasDisplayContent returns correct value immediately when pluginLoaded fires, before React component finishes loading.
Whether the component should be blocked from rendering due to missing permissions.
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
Component artifacts support feedback when a resolved spec is available.
Toggle the feedback panel open. Called from the artifact viewer header button.
Provide additional tabs for viewing component metadata
ProtectedgetGet the content from the artifact version. Handles both string content and JSON objects.
Return a point-in-time snapshot of the data this viewer is currently displaying. Every viewer plugin MUST implement this with type-appropriate content.
Guidelines for file-based viewers:
A DataSnapshot describing the current state, or null if no data is available.
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.
Remove standard JSON tab since we provide "Resolved JSON" custom tab The custom tab shows the fully resolved component spec instead of raw artifact JSON
A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated.
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.
The changed properties.
Component initialization. Note: loadComponentSpec() is called in ngOnChanges which runs before ngOnInit, ensuring tabs are available when pluginLoaded fires. The async adapter initialization happens here and doesn't block tab availability.
Bubble Apply intent up to the host (Form Builder dashboard / Sage chat).
Resolves the full ComponentSpec (with code) from multiple sources:
Source #2 covers the common form-artifact case where the React component lives inside
Handle entity record open request from React component Propagates the event up to parent components
Search-as-you-type for the picker. Queries by name field (or any indexed string field, best-effort). Limits to 8 hits for tightness.
User picked a different record from the search results. Re-bind the form.
Called when MJReactComponent finishes loading the full component spec from the registry.
The full spec may contain Functional, Technical, and Data tabs not in the stripped spec.
Caches the resolved spec so it survives DOM destruction (e.g., if the component fails to
render and
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 interactive Component artifacts (React-based UI components)
Features: