Member Junction
    Preparing search index...

    Generic host for a metadata form contribution (MJ: Entity Form Contributions row → componentRole: 'form-panel' React component). Mounted by <mj-form-panel-slot> for Source: 'metadata' winners exactly where a compiled BaseFormPanel would mount.

    Layering: the React component never touches BaseEntity. This host owns the FormPanelHostProps snapshot and rebuilds it when the parent record's values change, applies FieldChanged to the PARENT record (only for the fields the contribution claims, and only in edit mode; the parent form's Save persists it), forwards RowCountChanged to the rail badge, and surfaces Validate through BaseFormPanel.Validate().

    Hierarchy

    • BaseContributionPanel
      • InteractiveFormPanelComponent

    Implements

    • OnInit
    • DoCheck
    • OnDestroy
    Index

    Constructors

    Properties

    componentSpec: ComponentSpec | null = null
    FormComponent: BaseFormComponent

    The host form component (use for EditMode, dirty notifications, etc). Set by the slot host.

    FormContext?: FormContext

    Optional form context — same shape the collapsible-panel chrome expects. Set by the slot host.

    HostDisplay: "contents" = 'contents'

    Slot-mounted hosts must not sit in the left-nav flex column — leftover height targets mj-collapsible-panel as a direct child of .mj-forms-all-panels. display: contents makes the inner panel that child.

    HostProps: FormPanelHostProps | null = null
    loadError: string | null = null

    Load-time failure only: missing ComponentID, component not found, bad Specification JSON, wrong role. Shown in place of the React component.

    ReactComponent?: MJReactComponent
    Record: BaseEntity

    The entity record being edited. Set by the slot host before view init.

    RegistrationMetadata?: FormPanelRegistrationMetadata

    The registration this panel was mounted from. Set by the slot host.

    A panel reads its own slot from here, which is the only way it can know where in the form it was asked to sit: the class registration is looked up by the host, not by the panel, so nothing else on the instance carries it.

    RenderError: string | null = null

    A failure after the React component loaded, shown above it: an error event from <mj-react-component> (initialization, render timeout, a throw its error boundary caught, or an error event the panel raises), or a Validate that threw. A throw during render stays inside this panel's subtree, so the rest of the form renders and saves normally.

    An error event stays until the panel is mounted again, and a Validate that throws does not replace it. A Validate failure clears when a later Validate answers.

    SlotElement: HTMLElement | null = null

    The slot element the panel was mounted in, set by the slot host. It is where the panel is on the page, which DisplayOrder reads its neighbours from.

    Accessors

    • get DisplayOrder(): number

      Flex order for the panel's own mj-collapsible-panel, to pass as [Order].

      A panel's section key is not in the form's section order, so without this the form falls back to the section count and draws every panel at the bottom whatever slot it asked for. A panel standing in for a section takes that section's place instead, so replacing something does not also move it.

      A slot between the form's blocks takes the order of the section beside it on the page, so the panel draws where the slot is (see SlotAnchorSectionKey). The very top and the very bottom keep fixed bands: the bottom has to stay below the More folder.

      Returns number

    • get EditMode(): boolean

      Convenience getter for read-only / edit-mode rendering. Falls back to false when the panel is shown outside a BaseFormComponent host (e.g., a dashboard quick-edit dialog reusing the same panel — see the "composable panel" docs).

      Returns boolean

    • get Icon(): string

      The panel's icon, completed if it was stored without a style.

      Font Awesome needs a style class beside the name: fa-chart-column alone matches a rule that sets a glyph but no font family, so nothing draws. Rows written before the picker existed carry bare names, and normalizing on the way out makes them render rather than requiring each one to be edited.

      Returns string

    Methods

    • 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.

      Returns Promise<void>

    • Surface the panel's validity to the parent form's save.

      The React method may be async — any validator that checks something server-side will be — and invokeMethod returns whatever the method returned. Awaiting is therefore load-bearing: a synchronous 'isValid' in live test sees a Promise, fails, silently falls back to the last cached ValidationChanged payload, and the form saves an invalid record with no error and no log. Resolving a non-Promise is a no-op, so one code path covers both shapes.

      A validator that throws or rejects does not block the save by itself. It is logged and shown in the panel (RenderError) unless the panel already shows an error event, and the result falls back to the last ValidationChanged state, so a failure the panel reported before still blocks.

      Returns Promise<ValidationResult>