Member Junction
    Preparing search index...

    Enhanced AI Agent form component that extends the auto-generated base form with comprehensive agent management capabilities including test harness integration, related entity management, and execution history tracking.

    • Integrated Test Harness: Built-in access to agent testing capabilities
    • Related Entity Management: Display and manage sub-agents, prompts, and actions
    • Execution History: View recent agent runs with status and timing information
    • Rich UI Components: Enhanced cards, badges, and status indicators
    • Navigation Support: Links to related entities and management functions
    • Agent Details: Basic agent configuration and settings
    • Sub-Agents: Hierarchical agent relationships
    • Prompts: Associated prompts with priority ordering
    • Actions: Available actions and configurations
    • Execution History: Recent runs with detailed status information

    This component is automatically loaded when editing AI Agent entities through the MemberJunction form system. It extends the base generated form with additional functionality while maintaining full compatibility.

    <!-- Automatically used by form system -->
    <mj-ai-agent-form [recordId]="agentId"></mj-ai-agent-form>

    Hierarchy

    • MJAIAgentFormComponent
      • MJAIAgentFormComponentExtended

    Implements

    • OnDestroy
    Index

    Constructors

    Properties

    Accessors

    actionCount ActionCount agentActions agentNotes agentPrompts agentSessions agentType agentTypes AllOrganicKeyRelatedEntities childSubAgentCount ChildSubAgentCount customSectionContainer CustomSectionContainer DuplicateEntryCheck EntityInfo executionHistoryCount ExecutionHistoryCount executionHistoryCurrentPage executionHistoryPageSize executionHistoryView ExecutionSearchEmptyMessage executionSearchText expandedExecutions filteredExecutions filteredSubAgents FilteredSubAgents formContext HasAdditionalUnsavedChanges HasDesignerTab hasNextPage HasNextPage HasOrganicKeys hasPreviousPage HasPreviousPage HasRelatedEntities hasUnsavedChanges IsFavorite isLoadingData isLoadingPage learningCycleCount LearningCycleCount learningCycles loadingSessions loadingStates modelSelectionModes noteCount NoteCount OrganicKeys OwnsEntireFormBody PendingRecords promptCount PromptCount ProviderToUse recentExecutions RegisteredToolbarItems relatedSubAgentCount RelatedSubAgentCount RunQueryToUse RunViewToUse selectedContextCompressionPrompt ShowDuplicateEntryNotice statusOptions subAgentCount SubAgentCount subAgentFilter subAgents toolbarConfig ToolbarItemOverrides totalExecutionHistoryCount totalPages TotalPages totalSessionCount totalSubAgentCount TotalSubAgentCount UserCanCreate UserCanCreateActions UserCanCreateAIPrompts UserCanCreateNewPrompts UserCanCreateNotes UserCanCreatePrompts UserCanCreateSubAgents UserCanDelete UserCanDeleteActions UserCanDeleteNotes UserCanDeletePrompts UserCanDeleteSubAgents UserCanEdit UserCanRead UserCanUpdateActions UserCanUpdateNotes UserCanUpdatePrompts UserCanUpdateSubAgents UserCanViewExecutionHistory UserCanViewLearningCycles UserCanViewSessions

    Methods

    addNote AddNote addPrompt AddPrompt addSubAgents AddSubAgents BuildOrganicKeyViewParams BuildOrganicKeyViewParamsByNames BuildRelationshipViewParams BuildRelationshipViewParamsByEntityName BuildRelationshipViewParamsForJoinFields CancelEdit CheckDuplicateEntry CheckUserPermission clearContextCompressionPrompt ClearContextCompressionPrompt clearPermissionCache ClearPermissionCache collapseAllSections configureActions ConfigureActions configureOutputMapping ConfigureOutputMapping ConfigureToolbarItem createChildSubAgent CreateChildSubAgent createSubAgent CreateSubAgent debugPendingRecords DebugPendingRecords DisableToolbarItem DismissDuplicateNotice EnableToolbarItem EndEditMode expandAllSections formatCost FormatCost formatExecutionTime FormatExecutionTime formatExecutionTimeFromDates FormatExecutionTimeFromDates FormatField formatSessionDuration FormatSessionDuration formatTokenCount FormatTokenCount FormatValue getActionCount GetActionCount getActionIcon GetActionIcon getAgentIcon GetAgentIcon getDefaultFormWidthMode getEntityName GetEntityRelationshipByRelatedEntityName getExecutionModeIcon GetExecutionModeIcon getExecutionResultMessage GetExecutionResultMessage getExecutionResultPreview GetExecutionResultPreview getExecutionStatusColor GetExecutionStatusColor getExecutionStatusIcon GetExecutionStatusIcon getExpandedCount getFirstClassSectionKeys getFormWidthMode GetListsCanAddTo getMoreSectionKeys getPriorityBadgeColor GetPriorityBadgeColor getPriorityLabel GetPriorityLabel getPromptCount GetPromptCount GetRecordDependencies GetRelatedEntityTabDisplayName getRunningTime GetRunningTime getSection getSectionDisplayOrder GetSectionExpanded getSectionOrder getSectionOrderIndex GetSectionPanelHeight GetSectionRowCount getSessionStatusColor GetSessionStatusColor getSessionStatusIcon GetSessionStatusIcon getStatusBadgeColor GetStatusBadgeColor getSubAgentBadgeColor GetSubAgentBadgeColor getSubAgentBadgeIcon GetSubAgentBadgeIcon getSubAgentBadgeText GetSubAgentBadgeText getSubAgentCount GetSubAgentCount getSubAgentIcon GetSubAgentIcon getSubAgentPayloadInfo GetSubAgentPayloadInfo getTotalSectionCount getVisibleSectionCount goToNextPage GoToNextPage goToPreviousPage GoToPreviousPage GridEditMode handleHistoryDialog HandleTagsPanel hasCustomSectionOrder HasExecutionResult hasLogoURL HasLogoURL hasSubAgentLogoURL HasSubAgentLogoURL HideToolbarItem initSections InternalSaveRecord IsSectionExpanded linkRelatedSubAgent LinkRelatedSubAgent LoadPermissionSummary MakeFavorite navigateToEntity NavigateToEntity navigateToParentAgent NavigateToParentAgent NewRecordValues NewRecordValuesByEntityRelationship NewRecordValuesForJoinFields ngAfterViewInit ngDoCheck ngOnDestroy ngOnInit OnCategoryChange onContextCompressionToggle OnContextCompressionToggle onCustomSectionStateChange OnCustomSectionStateChange OnCustomToolbarButtonClick OnDeleteRequested onExecutionSearchChange OnExecutionSearchChange OnFavoriteToggled OnFieldEdited onFilterChange OnFormNavigate OnFormTabChange OnHistoryRequested OnInvocationOpenRequested OnListManagementRequested OnPanelBarStateChange onPermissionsDialogClosed OnPermissionsDialogClosed openContextCompressionPromptSelector OpenContextCompressionPromptSelector OpenDuplicateCandidate openExecutionRecord OpenExecutionRecord openPermissionsDialog OpenPermissionsDialog openPromptAdvancedSettings OpenPromptAdvancedSettings openSessionRecord OpenSessionRecord openSubAgentAdvancedSettings OpenSubAgentAdvancedSettings openTestHarness OpenTestHarness PeekSectionRowCount PendingRecordsDirty PopulatePendingRecords RaiseEvent RefreshRecord refreshRelatedData RefreshRelatedData refreshSnapshot RefreshSnapshot RegisterFormPanel RegisterToolbarItem removeAction RemoveAction removeChildSubAgent RemoveChildSubAgent RemoveFavorite removePrompt RemovePrompt removeSubAgent RemoveSubAgent resetSectionOrder SaveRecord setChromeMembership setExecutionHistoryView SetExecutionHistoryView SetFavoriteStatus setFormWidthMode SetSectionBadgeVisible SetSectionExpanded setSectionOrder SetSectionPanelHeight SetSectionRowCount setSubAgentFilter SetSubAgentFilter SetToolbarItemOrder ShowChanges ShowDependencies ShowToolbarItem splitterLayoutChange StartEditMode toggleExecutionExpanded ToggleExecutionExpanded toggleFormWidthMode ToggleHeaderCollapsed toggleSection unlinkRelatedSubAgent UnlinkRelatedSubAgent UnregisterFormPanel UnregisterToolbarItem updatePayloadField UpdatePayloadField Validate ValidateAsync ValidatePendingRecords Wait

    Constructors

    Properties

    ActiveFormTab: string | null = null

    Which pane is showing. Persisted per user, so returning to a record lands where you left.

    Starts null rather than 'details': null means "nobody has chosen yet", which lets refreshFormTabs fall through to the first tab — the designer, when the agent type has one. A hardcoded default would open every Flow agent on Details and bury its diagram again.

    AgentActions: MJActionEntity[] = []

    Array of agent action entities for card display

    AgentNotes: MJAIAgentNoteEntity[] = []

    Array of agent note entities for display

    AgentPrompts: MJAIPromptEntityExtended[] = []

    Array of agent prompt entities for card display

    AgentSearchScopeColumns: SearchScopeChildGridColumn[] = ...

    Column spec for the AIAgentSearchScope child grid (mockup #5).

    AgentSessions: AgentSessionHistoryItem[] = []

    Voice/realtime sessions where this agent is the co-agent or the delegation target

    AgentType: MJAIAgentTypeEntity | null = null

    The agent type entity for this agent

    AgentTypes: any[] = []

    Agent types loaded from the database

    BottomAreaSize: number

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

    CategoryBranchConfig: TreeBranchConfig = ...

    TreeDropdown configuration for the agent category field

    cdr: ChangeDetectorRef
    ChromeLayout: "accordion" | "left-nav"

    Layout the container resolved for this form. Set by <mj-record-form-container>; read by panel hosts.

    collapsiblePanels: QueryList<MjCollapsiblePanelComponent>
    CompositionChanged: EventEmitter<FormCompositionSnapshot>
    CompositionSnapshot: FormCompositionSnapshot | null

    Last composition snapshot the container published — what is actually on this form: sections, related grids, contributions and slots. Consumers: agent context (so Skip can target a real slot and section key) and Form Studio.

    Config: EntityFormConfig | 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

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

    default).

    EditMode: boolean
    EditModeChanged: EventEmitter<boolean>

    Emitted whenever edit mode starts (true) or ends (false). The Explorer shell uses the true edge to PROMOTE a records preview tab — pin it — the moment the user starts editing (VS Code's promote-on-modify), so a record being edited is neither replaceable by the next plain open nor italic. Fires on every call, not only on transitions: a new record's ngOnInit re-asserts edit mode and the shell's pin is idempotent.

    elementRef: ElementRef<any>
    ExecutionHistoryCurrentPage: number = 1
    ExecutionHistoryPageSize: number = 20

    Pagination state for execution history

    ExecutionHistoryView: "runs" | "sessions" = 'runs'

    Which record type the Execution History section shows: agent runs (default) or realtime voice sessions

    ExecutionSearchText: string = ''

    Search functionality for execution history

    ExpandedExecutions: { [key: string]: boolean } = {}

    Track which execution cards are expanded

    FavoriteInitDone: boolean
    FilteredExecutions: MJAIAgentRunEntityExtended[] = []
    formStateService: FormStateService
    FormTabs: TabConfig[] = []

    Tab chrome, recomputed only when the agent type or record identity changes.

    HasUnsavedChanges: boolean = false

    Flag to indicate if there are unsaved changes

    HeaderCollapsed: boolean = false

    Whether the form header is collapsed to a single compact line

    IsFormInitializing: boolean = true

    True until the form knows what it is going to render.

    The tab strip and every pane depend on the agent's TYPE, which is loaded asynchronously. Until it arrives there are no tabs, no designer pane, and ActiveFormTab is null — so the details pane is hidden too and the form renders its header over an empty area for as long as the load takes. That reads as a broken page, not as a slow one.

    isHistoryDialogOpen: boolean
    IsLoadingData: boolean = true

    Main loading state for initial data load

    IsLoadingPage: boolean = false
    IsLoadingPermissions: boolean = false
    IsOpenToEveryone: boolean = true

    True when no explicit permission records exist (agent is open to everyone)

    IsRefreshing: boolean
    IsTagsPanelOpen: boolean
    LearningCycles: MJAIAgentLearningCycleEntity[] = []

    Array of learning cycle entities for display

    LoadingSessions: boolean = false
    LoadingStates: {
        actions: boolean;
        customSection: boolean;
        executionHistory: boolean;
        learningCycles: boolean;
        notes: boolean;
        prompts: boolean;
        searchScopes: boolean;
        subAgents: boolean;
    } = ...

    Individual loading states for each section, start off true until loading complete

    ModelSelectionModes: { text: string; value: string }[] = ...

    Model selection mode options for the dropdown

    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.

    PermissionSummary: {
        Permissions: {
            Level: string;
            Principal: string;
            PrincipalType: "User" | "Role";
        }[];
        ScopeID: string;
        ScopeName: string;
    }[] = []

    Read-only summary of SearchScopePermission rows that apply to the scopes this agent is assigned to. Drives a small audit table inside the agent form's Search section so an agent owner can see at a glance who has access to the scopes their agent uses, without navigating away to the Knowledge Hub Config dashboard's full audit surface.

    Each entry pairs a scope name with a list of permission rows (principal type + name + level). Rebuilt whenever the agent's AIAgentSearchScope assignments change.

    placementPreview: FormPlacementPreview | null

    The placement dialog's unsaved panel, when this form is the dialog's preview.

    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.

    RecentExecutions: MJAIAgentRunEntityExtended[] = []

    Array of recent execution records for history display

    The AI Agent entity being edited

    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.

    RecordRefreshed: EventEmitter<RecordRefreshedEvent>

    Emitted after a record is refreshed from the database successfully

    RecordSaved: EventEmitter<RecordSavedEvent>

    Emitted after a record is saved successfully

    RecordSaveFailed: EventEmitter<RecordSaveFailedEvent>

    Emitted when a record save fails

    searchFilter: string
    SectionRowCountChanged: EventEmitter<
        { Previous: number
        | undefined; RowCount: number; SectionKey: string },
    >

    Fires when a section's known row count changes — from the container's batched count prefetch, a related grid load (including a manual grid refresh), or a contribution reporting its own count. The container re-resolves empty-section chrome (whenEmpty) when a count crosses zero.

    sections: BaseFormSectionInfo<any>[]
    SectionStates: Record<string, boolean> = {}

    Tracked expanded/collapsed state for each panelbar section

    SelectedCategoryKey: CompositeKey | null = null

    Current category selection for the TreeDropdown

    SelectedContextCompressionPrompt: any = null

    Currently selected context compression prompt

    showCreateDialog: boolean
    showDeleteDialog: boolean
    showEmptyFields: boolean
    ShowPermissionsDialog: boolean = false

    Controls visibility of the new permissions dialog from @memberjunction/ng-agents

    StatusOptions: { text: string; value: string }[] = ...

    Agent status options for the dropdown

    SubAgentFilter: SubAgentFilterType = 'all'

    Current filter for sub-agents display

    SubAgents: MJAIAgentEntityExtended[] = []

    Array of sub-agent entities for card display (DEPRECATED - use allSubAgents)

    TagCount: number
    ToolbarConfig: FormToolbarConfig = CUSTOM_LAYOUT_TOOLBAR_CONFIG

    Toolbar config — hide right-hand section controls since this form has a custom layout

    TopAreaHeight: string

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

    TopAreaSize: number

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

    TotalExecutionHistoryCount: number = 0
    TotalSessionCount: number = 0
    ValidationFailed: EventEmitter<ValidationFailedEvent>

    Emitted when validation fails before save

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

    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": ɵɵFactoryDeclaration<BaseFormComponent, never>

    Accessors

    • get DuplicateEntryCheck(): DuplicateEntryCheckController

      The entry-time duplicate check. While a person enters a new record it asks the server, after each pause in editing, whether the values duplicate existing records, and holds the ones to flag. It only flags: saving is never blocked and nothing is merged. mj-record-form-container shows the notice.

      Returns DuplicateEntryCheckController

    • get EntityInfo(): EntityInfo | undefined

      Returns EntityInfo | undefined

    • get formContext(): FormContext

      Context handed to every field, panel and slot in the form.

      Returns the SAME object while nothing in it has changed. Templates bind this getter in dozens of places per form, and Angular evaluates each binding on every change-detection pass — so allocating a fresh object per access handed every child a new reference each pass, defeating input-identity checks and cascading re-renders through the whole form. Building the candidate is cheap (the expensive part, hidden section keys, is memoized); the identity comparison below is what stops the cascade.

      Returns FormContext

    • get HasAdditionalUnsavedChanges(): boolean

      Surfaces the type section's own edits to the toolbar and the navigate-away guard.

      A flow canvas edit changes no field on the agent row, so record.Dirty stays false and the form would otherwise report itself clean while the user is looking at unsaved steps.

      Returns boolean

    • get HasOrganicKeys(): boolean

      Whether the current entity has any active organic keys with related entities configured.

      Returns boolean

    • get HasRelatedEntities(): boolean

      Returns boolean

    • get IsFavorite(): boolean

      Returns boolean

    • get loadingStates(): {
          actions: boolean;
          customSection: boolean;
          executionHistory: boolean;
          learningCycles: boolean;
          notes: boolean;
          prompts: boolean;
          searchScopes: boolean;
          subAgents: boolean;
      }

      Returns {
          actions: boolean;
          customSection: boolean;
          executionHistory: boolean;
          learningCycles: boolean;
          notes: boolean;
          prompts: boolean;
          searchScopes: boolean;
          subAgents: boolean;
      }

      Use LoadingStates.

    • set loadingStates(
          value: {
              actions: boolean;
              customSection: boolean;
              executionHistory: boolean;
              learningCycles: boolean;
              notes: boolean;
              prompts: boolean;
              searchScopes: boolean;
              subAgents: boolean;
          },
      ): void

      Parameters

      • value: {
            actions: boolean;
            customSection: boolean;
            executionHistory: boolean;
            learningCycles: boolean;
            notes: boolean;
            prompts: boolean;
            searchScopes: boolean;
            subAgents: boolean;
        }

      Returns void

      Use LoadingStates.

    • get OrganicKeys(): EntityOrganicKeyInfo[]

      Returns all active organic keys for the current entity, or an empty array if none.

      Returns EntityOrganicKeyInfo[]

    • get OwnsEntireFormBody(): boolean

      Whether this form renders its own body in full.

      A form that returns true accepts nothing the container would otherwise compose into it: no BaseFormPanel mounts, no contribution claims a section, and no stock grid is filled in for a DisplayInForm relationship. The composition snapshot reports none of them either. Container chrome that belongs to the record rather than to the body — the toolbar, Save/Delete, History, Record Changes — is unaffected.

      The fill-in reads an unbaked relationship as stale CodeGen and supplies the missing grid. A form that replaced the body bakes nothing by design, so without this flag every relationship reads as missing and the container composes a form the author never asked for.

      Returns boolean

    • get PendingRecords(): PendingRecordItem[]

      Returns PendingRecordItem[]

    • get ProviderToUse(): IMetadataProvider

      Returns either the default Metadata provider or the one specified in the Provider property, if it was specified

      Returns IMetadataProvider

    • get RegisteredToolbarItems(): FormToolbarItemConfig[]

      Returns all dynamically registered toolbar items.

      Returns FormToolbarItemConfig[]

    • get RunQueryToUse(): IRunQueryProvider

      Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified

      Returns IRunQueryProvider

    • get RunViewToUse(): IRunViewProvider

      Returns either the default RunView provider or the one specified in the Provider property, if it was specified

      Returns IRunViewProvider

    • get ShowDuplicateEntryNotice(): boolean

      Whether the possible-duplicate notice shows: a new record with flagged candidates not dismissed.

      Returns boolean

    • get ToolbarItemOverrides(): ReadonlyMap<string, Partial<FormToolbarItemConfig>>

      Returns the map of toolbar item overrides.

      Returns ReadonlyMap<string, Partial<FormToolbarItemConfig>>

    • get UserCanCreate(): boolean

      Returns boolean

    • get UserCanDelete(): boolean

      Returns boolean

    • get UserCanEdit(): boolean

      Returns boolean

    • get UserCanRead(): boolean

      Returns boolean

    Methods

    • Convenience method to build organic key view params by organic key name and related entity name.

      Parameters

      • organicKeyName: string
      • relatedEntityName: string

      Returns RunViewParams

    • Parameters

      • relatedEntityName: string
      • OptionalrelatedEntityJoinField: string

      Returns RunViewParams

    • One grid over several FKs to the same related entity (Bill-To OR Ship-To).

      Parameters

      • relatedEntityName: string
      • joinFields: readonly string[]

      Returns RunViewParams

    • Asks the server whether the values being entered duplicate existing records. A form on a provider that is not a GraphQLDataProvider has no server to ask, so the check reports NotConfigured and stops for the entity. Override to send the check elsewhere.

      Parameters

      Returns Promise<DuplicateEntryCheckResult>

    • Parameters

      Returns boolean

    • Returns void

    • Configures overrides for any toolbar item (standard built-in items like 'edit', 'delete', 'favorite', 'history', etc., or custom items). Allows dynamically changing visibility, disabled state, tooltips, order, icon, etc.

      Parameters

      Returns void

    • Dynamically disables a toolbar item by key, with an optional reason string for the tooltip.

      Parameters

      Returns void

    • The person dismissed the possible-duplicate notice.

      Returns void

    • Dynamically enables a toolbar item by key.

      Parameters

      Returns void

    • Returns void

    • Returns void

    • Parameters

      • entityFieldInfo: EntityFieldInfo
      • value: any
      • Optionaldecimals: number
      • Optionalcurrency: string

      Returns string

    • Parameters

      • fieldName: string
      • Optionaldecimals: number
      • Optionalcurrency: string

      Returns string

    • Returns string

    • Parameters

      • relatedEntityName: string
      • OptionalrelatedEntityJoinField: string

      Returns EntityRelationshipInfo | undefined

    • Returns number

    • Returns string[]

    • Returns "centered" | "full-width"

    • Returns Promise<MJListEntity[]>

    • Returns string[]

    • Returns Promise<RecordDependency[]>

    • Parameters

      • relatedEntityName: string

      Returns string

    • Parameters

      • sectionKey: string

      Returns BaseFormSectionInfo<any> | undefined

    • Parameters

      • sectionKey: string

      Returns number

    • Returns string[]

    • Where this key sits in the section order, or null when it is not in it at all.

      getSectionDisplayOrder cannot answer that: it returns the section count for an unknown key, which is indistinguishable from a real last position. A contribution panel is not in the form's declared sections, so a caller has to be able to tell "the user placed this here" from "nobody has said where this goes".

      Parameters

      • sectionKey: string

      Returns number | null

    • Parameters

      • sectionKey: string

      Returns number | undefined

    • The row count shown as a section's badge. undefined until known, and always undefined for a section whose badge is turned off (showCount: false) — use PeekSectionRowCount for the underlying number.

      Parameters

      • sectionKey: string

      Returns number | undefined

    • Returns number

    • Returns number

    • Returns "None" | "Save" | "Queue"

    • Returns void

    • Returns void

    • Returns boolean

    • Dynamically hides a toolbar item by key.

      Parameters

      Returns void

    • Parameters

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

      Returns void

    • Parameters

      • sectionKey: string
      • OptionaldefaultExpanded: boolean

      Returns boolean

    • Returns Promise<void>

    • Default values for a new related-entity record so it links back here. Pass relatedEntityJoinField when more than one relationship targets the same entity (Bill-To vs Ship-To). When omitted and several matches exist, every matching FK is set — same fields the related grid is filtering on.

      Parameters

      • relatedEntityName: string
      • OptionalrelatedEntityJoinField: string

      Returns Record<string, unknown>

    • Parameters

      Returns Record<string, unknown>

    • Default values for a new related record, setting every listed join field to this record's key. Pair with BuildRelationshipViewParamsForJoinFields.

      Parameters

      • relatedEntityName: string
      • joinFields: readonly string[]

      Returns Record<string, unknown>

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

      Returns void

    • Hook invoked when a custom or dynamic toolbar item is clicked. Subclasses can override this method to handle custom button clicks.

      Returns void

    • Handles delete requests from the form container. Emits RecordDeleted on success, RecordDeleteFailed on failure. Generated form templates bind this as: (DeleteRequested)="OnDeleteRequested()"

      Returns Promise<void>

    • Handles favorite toggle from the form container. Generated form templates bind this as: (FavoriteToggled)="OnFavoriteToggled()"

      Returns Promise<void>

    • A person edited a field on this form. For a new record this restarts the entry-time duplicate check. mj-record-form-container calls it for every mj-form-field edit; a custom editor that changes the record some other way can call it too.

      A user who cannot read the entity (one who may only create its records) never starts a check: the server would refuse it, and a flagged record is one they could not open anyway.

      Returns void

    • Parameters

      • searchTerm: string

      Returns void

    • Handles navigation events from the form container and related entity grids. Relays the event upward via the Navigate

      Parameters

      Returns void

      for the host application to handle. Generated form templates bind this as: (Navigate)="OnFormNavigate($event)"

    • Handles history view requests from the form container. Generated form templates bind this as: (HistoryRequested)="OnHistoryRequested()"

      Returns void

    • Handles list management requests from the form container. Generated form templates bind this as: (ListManagementRequested)="OnListManagementRequested()"

      Returns void

    • Opens a flagged candidate the way the form opens any record: a Navigate event the host handles, never a router call. It asks for a new tab, so the record being entered is kept.

      Parameters

      Returns void

    • The last known row count for a section, regardless of whether its badge shows.

      Parameters

      • sectionKey: string

      Returns number | undefined

    • Returns boolean

    • Re-fetches the current record from the database, updating field values in-place and resetting dirty flags. No-op in edit mode or on an unsaved record. Related-entity grids are notified via the form container's FormRecordRefreshCoordinator after this emits RecordRefreshed.

      Returns Promise<boolean>

      true if the record was reloaded from the database.

    • Slot hosts register every mounted panel so validation can include panel-owned checks.

      Parameters

      Returns void

    • Registers a dynamic toolbar action item / button. Can be called during ngOnInit or at runtime.

      Parameters

      Returns void

    • Returns Promise<void>

    • Returns void

    • Parameters

      • StopEditModeAfterSave: boolean

      Returns Promise<boolean>

    • Parameters

      • moreSectionKeys: string[]
      • firstClassSectionKeys: string[]

      Returns void

    • Parameters

      • isFavorite: boolean

      Returns Promise<void>

    • Parameters

      • widthMode: "centered" | "full-width"

      Returns void

    • Show or hide a section's row-count badge (metadata showCount). The count itself is still tracked.

      Parameters

      • sectionKey: string
      • visible: boolean

      Returns void

    • Parameters

      • sectionKey: string
      • isExpanded: boolean

      Returns void

    • Parameters

      • sectionOrder: string[]

      Returns void

    • Parameters

      • sectionKey: string
      • height: number

      Returns void

    • Parameters

      • sectionKey: string
      • rowCount: number

      Returns void

    • Sets the numeric display order for a toolbar item (lower numbers appear earlier).

      Parameters

      Returns void

    • Returns void

    • Returns Promise<void>

    • Dynamically shows a toolbar item by key.

      Parameters

      Returns void

    • Called when the splitter layout changes (for entities with "top area" sections). No-op in the generic version; override in host application if splitter resizing is needed.

      Returns void

    • Returns void

    • Returns void

    • Parameters

      • sectionKey: string

      Returns void

    • Parameters

      Returns void

    • Unregisters a previously registered dynamic toolbar item by key.

      Parameters

      • key: string

      Returns void

    • Record + pending-record validation, merged with whatever panel validity is already known.

      Synchronous, and therefore blind to a panel validator that has not reported yet — any path that gates a save must use ValidateAsync. The signature stays synchronous because this is published API with external callers.

      Returns ValidationResult

    • Validate, merged with every mounted panel's validator, awaited. This is what SaveRecord() calls.

      It starts from Validate(), so a subclass that overrides Validate() still gates the save; the panels' last-known state is left out of that call, because their awaited results replace it.

      A panel's Validate() may be async — anything checking server state will be — and reading such a result synchronously yields a Promise, which tests as "no opinion" and lets an invalid record save with no error and no log.

      Returns Promise<ValidationResult>

    • Returns ValidationResult[]

    • Parameters

      • duration: number

      Returns Promise<void>