Emitted when the user clicks the "Ask AI" button on the form toolbar.
Per-instance form presentation config (toolbar, sections, width, links).
Form asked to be dismissed (e.g. Discard on a brand-new record).
Re-emitted form EditModeChanged (true = edit started, false = ended),
plus one true right after mount when the form was created already in
edit mode (StartInEditMode, or a new record) — StartEditMode never runs
in that path, so without this the shell would never hear about it.
The live form instance, emitted right after it's created (for power-user wiring).
The user switched between the custom and the standard form (so the surface can persist it, e.g. in the URL).
True when a custom form is hiding the standard (CodeGen) form — so the switch strip has somewhere to go. Stays true while the standard form is the one mounted, so the strip can offer the way back.
Initial load + mount finished (success path).
Load failed; carries a user-facing title + detail.
Form navigation request (record link, new record, hierarchy, email, external, dismiss).
New-record default values: URL-segment string or a plain object.
User-facing notification request (success/error/warning/info).
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.
Re-emitted form RecordDeleted.
Re-emitted form RecordReady (record fully initialized).
Re-emitted form RecordRefreshed.
Re-emitted form RecordSaved (richer payload).
Re-emitted form RecordSaveFailed.
Emitted after the record is successfully saved (carries the live entity).
Render a single registered form section (a BaseFormSectionComponent
registered as '<EntityName>.<SectionName>') instead of the full form.
When set, the full-form resolver / variant picker / toolbar container are
bypassed — the section component renders its own fields and the host saves
the record directly. Used for compact, focused editors (e.g. a quick-edit
grid row). Leave null for the normal full-form behavior.
Offer the standard-form strip when a custom form hides the generated one. Set false to suppress it.
Re-emitted form ValidationFailed.
StaticɵdirStaticɵfacWhether the bound record has unsaved changes.
Force edit mode. When omitted, new records start in edit, existing in read.
Entity name to load a record for. Ignored when Record is supplied.
Use ErrorTitle.
The live form component instance, or null before mount / after teardown.
Which form to mount: 'default' = the resolver's normal pick; 'standard'
= the CodeGen-generated form, even when a custom form outranks it. Falls
back to the default (and logs) when the entity has no standard form.
A change after the view initializes reloads the form.
At phone width the mode strip is hidden; the switch moves into the toolbar's View bottom sheet instead so the 375px header stays clean while the user's chosen form (custom or standard) still mounts.
Use Loading.
Primary key of the record to load. Empty key → new record.
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Pre-loaded record to bind directly. When supplied, the host skips the
load step entirely and mounts the resolved form against this instance —
EntityName/PrimaryKey are not required.
Returns either the default RunQuery 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
Cancel edits (revert). Full-form mode uses the form's cancel pipeline.
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 performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Template handler for the strip's button: switch, and keep keyboard focus on the button.
Refresh the bound record from the database. Full-form mode uses the form's refresh pipeline.
Save the bound record. In full-form mode this runs the form's save
pipeline (validation, pending records, notifications); in section mode the
section component has no pipeline, so we save the record directly (the
record's own save event still drives the Saved output).
Switch between the custom ('default') and the standard form. Refuses —
returning false and emitting a warning Notification — when remounting
would silently discard unsaved work (see hasUnsavedWorkToLose).
A brand-new record is carried across instead (see _carryNewRecord).
With a form mounted but no standard alternative (the generated form is
the only one), both modes mount the same form: the mode is recorded and
emitted, with no reload and so nothing for the unsaved-work guard to
protect. The error state is excluded: fail() also clears
HasStandardFormAlternative and Loading, and there the switch must
still reload — it is the retry of the failed load.
Presentation-agnostic host that renders ANY MemberJunction entity form — generated (
@RegisterClass/ CodeGen), custom (*Extended), or interactive (EntityFormOverride) — for a given record.This is the shared core extracted from Explorer's
SingleRecordComponent. It encapsulates the full lifecycle: resolve which form to use (via FormResolverService, honoring variant overrides) → load the record (or accept a pre-loaded one) → create the form component dynamically → bind record / EditMode / Config / variants → re-emit the form's events → tear down cleanly.It has ZERO routing and ZERO Explorer dependencies — it only emits events. The surrounding surface (a full-page tab in Explorer, a dialog, or a slide-in) decides what to do with
Navigate,Notification, etc.Example: Explorer tab (thin wrapper subscribes + maps to NavigationService)
Example: Bind a pre-loaded record (dialog/slide-in)
Standard-form switch. When a custom form (a higher-priority class form or an interactive override) hides the CodeGen-generated form, the host renders a one-line strip above it offering "Open standard form" — every field, same permissions — and back. It lives here rather than in
<mj-form-toolbar>because a fully custom form may not render the toolbar at all, which would leave the generated form unreachable. Surfaces drive/persist the choice via FormMode / FormModeChange; hosts that must not offer it set ShowFormModeSwitch to false.