Member Junction
    Preparing search index...

    Wraps a Component (the IC kind — declared componentRole: 'form') so it can stand in for an Angular form on any entity.

    Layering invariant: the React component never touches BaseEntity. This wrapper owns the entity lifecycle (record.Save, record.Delete, mode transitions). The React component sees only the snapshot in FormHostProps and communicates back via BeforeSave / BeforeDelete / EditModeChangeRequested events plus its dirty-field diff.

    Instantiated by SingleRecordComponent.LoadForm when the resolver finds an EntityFormOverride matching the user's scope. Behaves exactly like the generated Angular form from the host's perspective: same record setter, same EditMode toggle, same outputs.

    Hierarchy (View Summary)

    Implements

    • OnInit
    • OnDestroy
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    BottomAreaSize: number = 60

    Size of the bottom area as a percentage (0-100) for angular-split. Used by CodeGen-generated templates with as-split.

    cdr: ChangeDetectorRef = ...
    collapsiblePanels: QueryList<MjCollapsiblePanelComponent>
    ComponentID: string | null = null

    The Component row ID resolved for this (entity, user, roles) tuple. Set by SingleRecordComponent.LoadForm after the resolver returns an override.

    componentSpec: ComponentSpec | null = null

    Loaded ComponentSpec, parsed from the Component row's Specification JSON.

    Two ways to populate this:

    1. Via ComponentID (the standard path): set the input, ngOnInit fetches the row from MJ: Components and assigns the parsed spec.
    2. Direct assignment (the artifact-viewer path): the caller already has the spec in hand (parsed from an artifact JSON blob) and sets componentSpec directly. In that case ComponentID should be left null and the DB fetch is skipped.
    Config: EntityFormConfig | null = null

    Per-instance presentation config (toolbar visibility, related-entity sections, collapsibility, width, in-form navigation). Set by the form host (MjEntityFormHostComponent) or any consumer that instantiates the form directly. Read back by MjRecordFormContainerComponent and the collapsible panels through the FormComponent reference, so it takes effect WITHOUT regenerating the CodeGen-produced template. Null means "use the container's own defaults" (the classic full-page tab behavior).

    CurrentVariantID: string | null = null

    ID of the currently-rendered variant (null when no override is active and the form is the CodeGen /

    default).

    EditMode: boolean = false
    elementRef: ElementRef<any> = ...
    FavoriteInitDone: boolean = false
    formHostProps: FormHostProps | null = null

    FormHostProps passed to the React component. Recomputed when record or mode changes.

    formStateService: FormStateService = ...
    isHistoryDialogOpen: boolean = false
    IsTagsPanelOpen: boolean = false
    LoadErrorChanged: EventEmitter<string | null> = ...
    Navigate: EventEmitter<FormNavigationEvent> = ...

    Emitted when navigation is requested (record link, external link, email, new record, etc.)

    Notification: EventEmitter<FormNotificationEvent> = ...

    Emitted when a user-facing notification should be shown

    OnVariantChanged: (variantID: string | null) => void = ...

    Hook called when the user picks a different variant from the picker. Default is a no-op; the Explorer-level single-record component replaces this on the form instance to wire FormResolverService.SetSelectedVariant and reload the record. Kept as a method (not an EventEmitter) so the host doesn't need to subscribe — assignment is enough.

    previewMode: boolean = false

    When true, render the React component without the <mj-record-form-container> wrapper — i.e. no toolbar (no Save / Cancel / Edit / Delete / History / Tags / Lists).

    Used by the Form Builder cockpit's Preview tab where the toolbar's actions don't apply (Save would save the record, but the cockpit's own Save button saves the spec; History/Tags assume a real persistent record, but the preview record can be a synthetic NewRecord). Keeping just the form body produces a clean "this is what the form looks like" view.

    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.

    reactComponent?: MJReactComponent

    Reference to the mounted React component. Used by the SaveRecord / CancelEdit overrides below to invoke the component's registered RequestSave / RequestCancel methods when the host toolbar fires Save/Cancel — so the single user-visible Save lives on the toolbar (consistent with every other entity form in MJ) and not duplicated inside the form body.

    RecordDeleted: EventEmitter<RecordDeletedEvent> = ...

    Emitted after a record is deleted successfully

    RecordDeleteFailed: EventEmitter<RecordDeleteFailedEvent> = ...

    Emitted when a record delete fails

    RecordReady: EventEmitter<BaseEntity<unknown>> = ...

    Emitted once after ngOnInit completes and the record is fully initialized (favorites loaded, form state initialized). This is the safe point for the container to start loading badge counts and other record-dependent data.

    RecordSaved: EventEmitter<RecordSavedEvent> = ...

    Emitted after a record is saved successfully

    RecordSaveFailed: EventEmitter<RecordSaveFailedEvent> = ...

    Emitted when a record save fails

    searchFilter: string = ''
    sections: BaseFormSectionInfo<any>[] = []
    showCreateDialog: boolean = false
    showDeleteDialog: boolean = false
    showEmptyFields: boolean = false
    TagCount: number = 0
    TopAreaHeight: string = '300px'

    Height of the top area when a splitter layout is used. Referenced by CodeGen-generated templates for entities with "top area" sections.

    TopAreaSize: number = 40

    Size of the top area as a percentage (0-100) for angular-split. Used by CodeGen-generated templates with as-split.

    ValidationFailed: EventEmitter<ValidationFailedEvent> = ...

    Emitted when validation fails before save

    Variants: {
        ID: string;
        Label: string;
        Scope: "User" | "Role" | "Global";
        Status: "Active" | "Pending" | "Inactive";
    }[] = []

    Variants applicable to the current (entity, user) tuple, supplied by the Explorer-level form resolver. When more than one entry is present, the record-form-container shows a picker that lets the user switch between variants. Empty / single-entry arrays hide the picker.

    The container reads this via its EffectiveVariants accessor — generated form templates do NOT need to bind it explicitly.

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

    Accessors

    • 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

    Methods

    • Toolbar Cancel override. Asks the React component to discard its draft via RequestCancel, then flips out of edit mode the same way the base implementation would. The React component is expected to (a) clear its local draft state and (b) emit EditModeChangeRequested({ requestedMode: 'view' }) — though we call EndEditMode here directly anyway, so even a no-op handler leaves the form in a coherent state.

      Returns void

    • Component-level default width mode, used when the user has NOT explicitly chosen a width for this entity yet (first visit, nothing persisted in User Settings). Subclasses can override this — for example, custom forms with full-bleed layouts should return 'full-width' here and the container will respect it on first open.

      Once the user toggles the width via the toolbar, their choice persists via setFormWidthMode() and takes priority over this default on subsequent opens.

      Returns "centered" | "full-width"

    • Parameters

      • sections: (
            | BaseFormSectionInfo<any>
            | {
                isExpanded: boolean;
                metadata?: unknown;
                rowCount?: number;
                sectionKey: string;
                sectionName: string;
            }
        )[]

      Returns void

    • Toolbar Save override. Routes the click through the React component's registered RequestSave method so the React layer can (a) run its own validation, (b) flush its draft state, (c) emit BeforeSave with the dirty-field diff — exactly the flow the in-form Save button would trigger. The wrapper then awaits the BeforeSave handler via pendingSaveResolver, gets a real success/failure boolean, and honors StopEditModeAfterSave.

      Falls back to the base implementation for components that haven't registered RequestSave — preserves correctness for forms that keep their own in-form Save button (older sample, hand-authored forms that pre-date this contract).

      Parameters

      • StopEditModeAfterSave: boolean

      Returns Promise<boolean>