Active remote edit conflict for this field, if any
Active In-Form Time-Travel version preview state, if any
Whether to offer inline "create new" for the related record when the one you need isn't found. The affordance only renders when this is true AND the current user can create records of the related entity (entity allows creation + role permits it).
Previous server value when this clean field was auto-merged live during edit mode
Override display name (defaults to entity field metadata DisplayName)
Computed: dropdown is at least the trigger width, at most DropdownMaxWidth.
Calculated position for fixed-position dropdowns
Whether the form is in edit mode
The field code name (must match a field on the entity)
Index of the keyboard-highlighted active suggestion (-1 = none).
Field code names for the extra columns, index-aligned with FKColumnHeaders.
Headers for the extra (DefaultInView) columns shown in the dropdown.
Surface used for the inline create form: a modal dialog (default) or a slide-in.
Max width (px) of the FK suggestion dropdown. The panel grows to fit its columns up to this cap (then scrolls horizontally). When null, defaults to 2× the trigger width so multi-column rows aren't cramped by a narrow field. Always additionally bounded by the viewport's right edge.
Extra WHERE fragment applied to every lookup on this field, AND-ed with the related
entity's RelatedEntityFilter metadata. Use this for a
scope only this instance of the form knows about; prefer the metadata column when the
rule is true of the field everywhere it appears.
Whether the FK input is focused — the scope pill only appears while focused.
Group headers in render order, from the last lookup. Rows are matched to a group by
FKSuggestion.GroupKey; a null Label renders its rows with no header.
Whether rows render a leading icon column (drives the header's empty icon cell).
Whether to highlight the typed query substring within each suggestion's name
in the FK dropdown. On by default — uses the muted, theme-aware
--mj-status-warning highlight (not the old bright yellow). Set false for
plain, un-marked names.
Viewport anchor rectangle for the FK record hover preview popover
Target CompositeKey for the FK record hover preview popover
Whether the current FK value is a confirmed match (user selected from dropdown)
Whether a DB search is currently in flight (drives the loading indicator).
Opaque options handed to the resolved FKLookupStrategy — e.g.
{ ScopeField: 'BillToOrganizationID' } to tell a person picker which organization's
people to offer first. Each strategy documents its own keys.
Rows requested from a lookup.
Code name of the name column (used as its sort key).
True when a search completed with zero results (drives the "No matches" row).
ORDER BY for the empty-query browse list, overriding the field's RelatedEntityOrderBy
metadata. Defaults to the related entity's name field. Does not affect a typed query,
which is ordered by relevance.
Which population the dropdown is currently showing.
Labels for the population toggle supplied by the resolved strategy — e.g. Customers vs All organizations. Null hides the toggle, which is the case for most fields.
Fields the user can scope the search to (name + shown columns + other fields).
Set when the last lookup failed or timed out (drives the error row with Retry). Kept apart from FKNoMatches: "No matches" tells the user the record does not exist, which a failed request does not establish.
Related-entity field code name currently searched against (defaults to the name field).
Friendly label of FKSearchField, shown on the scope pill.
Milliseconds a lookup may take before the dropdown shows an error with Retry. Zero or less waits indefinitely.
The currently-linked record, pinned as a sticky "Currently selected" section at the top of the dropdown (browse mode only). Null when there's no selection or the user is actively filtering. Removed from FKSuggestions so it isn't listed twice.
Whether the scope-picker menu is open.
Active sort direction; only meaningful when FKSortField is set.
Active sort column (field code name), or null for natural (unsorted) order.
Suggestions returned from the FK entity search
OptionalFormForm-level context (search filter, showEmptyFields)
Whether to hide this field when empty in read-only mode. Default: true
Brief visual highlight applied when this field's value was updated remotely (e.g. saved in another browser tab) and auto-refreshed on the open form.
Link type for read-only rendering.
Emitted when a navigation action is triggered (FK link click, email click, etc.)
Override possible values for select/autocomplete
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.
The entity record containing this field
Whether the FK dropdown is visible
Whether the FK record hover preview popover is currently open
Whether to show the field label
Whether the original-value popover is currently open
Whether the custom select dropdown is visible
Whether the value list dropdown is visible
Emitted when the field value changes
StaticɵdirStaticɵfacWhether inline field commenting is available on this field.
Whether to show the inline-create affordance: the field opts in (AllowFKCreate),
the related entity resolves, and the current user can create records of it (entity
allows creation + role permits — GetUserPermisions().CanCreate folds in AllowCreateAPI).
Editor language for the code editor. In edit mode it tracks the frozen EditRichTextMode; in read mode it tracks the live RichTextMode.
Compact display string for the raw polymorphic RecordID badge (e.g., 44FA6C…1E324C).
Get date value formatted for HTML date input.
Error messages to render in the template
Display name from metadata or override
Warning messages to render in the template
Inline style for the fixed-position dropdown
Stable rendering mode for EDIT mode. Unlike RichTextMode (which re-detects on the live value), this is snapshotted when edit mode is entered so that typing markdown/html into a plain textarea doesn't swap the control out from under the user mid-keystroke. Explicit ExtendedType always wins regardless; only the auto-detect branch is frozen for the session.
Effective related entity icon for polymorphic FK link rendering.
Effective related entity name (static FK RelatedEntity or polymorphic target entity name).
Runtime display kind from EntityField.ExtendedType. Honored ahead of the
generated LinkType input so PhotoURL forms still tagged LinkType=URL
render as images once metadata says Image.
Validation errors for this field from the best available source
Get EntityFieldInfo metadata for this field
Number of open (unresolved) anchored comment threads targeting this field.
Filtered possible values based on what the user typed
Footer label: prefilled with the typed text when present, else generic "create new".
For FK fields (including polymorphic FK fields via EntityIDFieldName), returns the
human-readable name to display instead of the raw ID.
Resolution order:
RelatedEntityNameFieldMap exists, read the name from the joined field on the record (sync).GetEntityRecordName lookup (result cached in _resolvedFKName).CSS grid-template-columns for the dropdown grid: optional icon column, then one
track per ordered column. The LAST column grows to fill any remaining width (1fr)
so the grid never leaves dead space on the right; earlier columns size to content.
A user-resized column uses its saved pixel width as the floor.
True when this FK currently points at a real record (has a value AND we can show its name). Drives the "linked" affordance — the chain icon + accent — so the user can tell at a glance this is a resolved link, not free text.
Whether there are non-visible searchable fields (drives the "Other fields" group).
The display text shown in the FK search input
Formatted representation of AutoMergedPreviousValue (when a clean field was updated live during Edit Mode).
Formatted representation of the current live record value (shown in the Time-Travel comparison bar).
Formatted representation of the field's baseline OldValue (or 'Empty' when null/empty).
Host class applied when this field has an unresolved remote edit conflict.
Whether this field has a related entity (static foreign key or resolved polymorphic foreign key)
Host class applied when this field's value in the previewed historical version differs from the current live record value.
Display name with search highlighting applied. Output is bound to [innerHTML].
This component's host element — what a section uses to confirm the field is inside it.
The label the field would show, for the same DOM sweep. Present even when hidden.
The field's own name on the element, so a form's field layout can be read from the DOM.
The placement dialog probes a form offscreen to find out what it really draws; reading
this needs no injector access, which is what lets the probe stay a DOM sweep. Mirrors
data-section-key on the collapsible panel.
URL box: empty for inline images so we never dump a data URI into a text input.
False until the first ngOnChanges, i.e. until Record, FieldName, EditMode and the
rest have been bound. A section must not read a field before then: with no inputs a field
reports itself hidden (read mode, empty value) and not required-and-empty, which would hide
a section whose fields all sit behind a view boundary before they ever bind.
Whether a form contribution stands in for this field.
Such a field is not drawn at all, in either mode: a panel is rendering in its place at the top of the section, so drawing the field too would show the same value twice.
Whether this field has been modified (dirty). Only shown for saved records (not new).
Whether the field metadata is marked Deprecated or Disabled.
Accessing a deprecated or disabled field via BaseEntity.Get() emits a runtime
console warning (or throws for disabled fields), so ShouldHideField and the
template short-circuit before reading Value.
Whether the underlying EntityField is currently marked dirty (modified compared to its baseline OldValue).
Whether field-level security permits the current user to READ this field.
The template gates the whole field on this BEFORE anything reads a value, because
BaseEntity.Get() throws for a denied field — so rendering one at all would take out the
entire form rather than hiding a column. Everything downstream (Value, ShouldHideField,
FK resolution) is safe only because this check runs first.
Memoized: template getters are evaluated on every change-detection cycle, and
GetDeniedReadFields walks every field on the entity and aggregates permissions across the
user's roles. ngOnChanges clears the memo when Record or FieldName changes.
Fails OPEN — on a missing entity, missing user, or an entity field security does not apply
to (its own flag off and, for an IS-A child, every ancestor's flag off too) — matching
BaseEntity's own gate. A form that hid fields because no user had resolved
yet would be worse than one that shows them, since the server is the real boundary.
Whether this field is read-only based on entity metadata or active Time-Travel preview
Whether field-level security permits the current user to WRITE this field, against the verb that actually applies to the record in hand: Create on a new record, Update on a saved one.
Read access is handled separately and earlier (IsFieldReadableByUser) — a field the user cannot see is not rendered at all. This is the narrower case of a field they CAN see but may not change, which should render as a read-only value rather than an editable control.
Both verbs matter and they fail differently, which is why this picks by record state rather than checking update alone:
Memoized alongside the read check and invalidated by the same ngOnChanges, for the same
reason: template getters run every change-detection cycle and the underlying walk covers
every field on the entity.
Whether this FK field should display the related entity name (or polymorphic target link) with a hyperlink instead of plain text.
Whether the field's varchar(max) - long text that gets the wide read-only style
Whether this field is a polymorphic foreign key (configured via the hard metadata link
EntityField.EntityIDFieldName pointing at a sibling column on the same entity that
stores the target EntityID or entity name). Never falls back to field-name heuristics.
Whether this field is required (not nullable)
Whether this is a required field that is currently empty (for validation styling).
"Empty" means null/undefined ONLY — an empty string is a VALUE, not absence (MJ #4359).
IsRequired here is derived from AllowsNull === false, i.e. the column's nullability, and a
NOT NULL string column accepts '' in both SQL Server and EntityField.Validate(). Counting
'' as empty therefore painted a field red that would save perfectly well — the form and the
save disagreed about the same value, and the section indicators inherited the disagreement.
Requiring actual text is a separate, deliberate constraint (an IsRequired-style flag of the
kind ActionParam / TemplateParam carry, or a CHECK constraint), not something to infer from
nullability. Until such a flag exists for entity fields, this getter mirrors what the save will
actually refuse.
Whether this field is large enough to be a candidate for rich-text (markdown/html) auto-detection. Generic & multi-platform: keys off the TS type and character length rather than a specific SQL type, so nvarchar(max)/ntext (MaxLength === 0 means unlimited) and longer fixed fields (nvarchar(400)/varchar(500)/...) all qualify, while short strings, UUIDs, numbers, dates, etc. do not.
Possible values for select/autocomplete from entity metadata or override
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Whether FK / record links are interactive. Driven by
FormContext.enableRecordLinks; false renders FK values as plain text
(dialog/slide-in surfaces). Undefined / true means links are live.
Resolved rendering mode for this field. Honors an explicit ExtendedType first
('Markdown' | 'HTML' | 'Code'); when ExtendedType is null, falls back to lightweight
client-side content detection — but only for IsRichTextEligible long-text fields.
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
Whether this field should be hidden (empty in read-only mode)
Whether this field has active error-level validation failures to display
Whether to show the subtle copy-ID button beside a resolved FK / polymorphic FK link.
Whether to show validation messages (touched OR form-level showValidation)
Whether this field has active warning-level validation issues to display
The field holds SOMETHING, and the date editor cannot show it.
WHY A SEPARATE SIGNAL IS THE ONLY OPTION. DateInputValue returns '' for a value it cannot
render, and an <input type="date"> renders '' as an empty box — the same empty box it shows
for a field that was never set. There is no string that makes the element display
not-a-date, so the control physically cannot surface the problem itself. The most the getter
can do is refuse to emit garbage; saying WHY has to happen beside it.
The consequence of not saying it is not cosmetic. The field reads as "no date", and the next save writes that emptiness over whatever was actually stored — so an unreadable value becomes a destroyed one, silently, by a user who was never told anything was wrong.
READ MODE ALREADY DOES THIS and needs nothing: FormatValue() shows Invalid Date for a bad
Date and the raw text for a bad string. It is only the EDITOR that hides the problem, which is
why this is scoped to EditMode rather than to the field.
An ABSENT value is not unreadable. Empty means empty, and must never be decorated as a fault.
The control type to render in edit mode. Determines which input component is used.
Also accepts deprecated Kendo-style type names for backward compatibility:
'dropdownlist' → 'select''numerictextbox' → 'number'Current field value (or historical snapshot value when in Time-Travel version preview mode)
Set field value, mark touched, run validation, and emit change event
Diff descriptor for this field when In-Form Time-Travel version preview is active.
Resolve an active conflict by keeping the user's local edit (localEditedValue) while
ensuring the field's baseline OldValue matches the incoming server value.
Optionalevent: EventResolve an active conflict by adopting the new server value (incomingServerValue),
resetting the field's baseline OldValue, and notifying the field-edit coordinator.
Optionalevent: EventWhether the column can move down (it's a column and not already last).
Whether the column can move up (it's a column and not already first).
Whether this field's column visibility can be toggled (Name is always shown).
The built cell (value + highlighted html) for a non-name column of a suggestion.
Whether a column's cells should stretch to fill their track (last column or resized).
Index of a row within the flat, keyboard-navigable list.
FontAwesome class for a column header's sort indicator (idle / asc / desc).
Rows belonging to one group, in the dropdown's overall (sorted) order.
Formats an arbitrary field value cleanly for display in original-value popovers and conflict cards.
Returns 'Empty' when the value is null, undefined, or blank string.
Whether a field is currently rendered as a column (the Name column is always shown).
Whether a dropdown row is the record currently linked by this FK (UUID-safe compare).
Whether a scope-menu row is the active search field.
Move a column one slot up (delta -1) or down (delta +1) and persist. mousedown + stopPropagation so the row's select-scope handler doesn't fire and the menu stays open.
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.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Handle value change from a checkbox.
Handle value changes coming from the embedded code editor (emits a plain string).
Handle value change from a date input.
Handle click on an email link in read-only mode.
Hide dropdown on blur, revert to matched name if user didn't select
Clear FK value via the X button
Begin resizing a column. stopPropagation so the header's sort handler doesn't fire.
Toggle whether a field shows as a column. Persists the full visible set, then rebuilds the column plan + re-runs the search so the grid reflects it live. stopPropagation so the row's search-scope click doesn't also fire.
Ask the host (app layer) to create a new related record, prefilled with the typed
text as the name. We only EMIT the request — opening the form is the app's job (the
generic forms layer must not depend on the app-level form presenter). The host calls
Complete(record) when saved and we select it.
Show dropdown on focus. With a cached-unfiltered entity we immediately show the first N rows (sorted by name) even on empty input — zero DB round-trips. Without a cache we keep prior behavior: only re-open if we already have suggestions.
Header sort handler (grid headers click-to-sort only; drag-reorder is menu-only).
Handle typing in the FK search input
Keyboard navigation in the FK input: ArrowDown/ArrowUp move the active row, Enter selects it, Escape closes the dropdown.
Open the <mj-record-preview-popover> hover card via the shared MjRecordPreviewPopoverService.
Schedule closing the FK hover preview popover when the pointer leaves the link.
Re-run the query that failed. mousedown with preventDefault, like the clear button, so
the input keeps focus and the blur grace period never closes the panel under the click.
Flip between the strategy's narrow population and its wide one — "Customers" versus "All organizations" — and re-run the current lookup in the new scope.
User picked a field to search by — persist the override and re-run the search.
Toggle the scope-picker menu. mousedown+preventDefault keeps the input focused.
Select an item from the FK dropdown (mouse)
Toggle the sort on a column header: same column cycles asc → desc → none; a new column starts at asc. Re-derives the visible list from the natural snapshot.
Handle value change from a native input.
Propagate inline Quick Edit updates from the linked record preview popover back onto this field's
resolved display name and companion virtual name field on this.Record.
Handle value change from a number input.
Opens the inline anchored comment popover (or drawer) targeted at this field.
Keep the hover preview card open while the pointer is inside the card.
Close the hover preview card when the pointer leaves the card.
Forward navigation from the hover preview card and close it.
Handle click on a record FK link (or polymorphic FK link) in read-only mode.
Request restoring only this single field from the active Time-Travel historical version.
Select an option from the custom select dropdown
Close the select dropdown on blur
Toggle the custom select dropdown
Handle click on a URL link in read-only mode.
Hide dropdown on blur
Show dropdown on focus
Handle typing in the value list autocomplete
Select an item from the value list dropdown
Restore this field's value back to its baseline OldValue, clearing its dirty state
and notifying the form's field-edit coordinator.
Optionalevent: EventToggle the floating Original Value popover on a modified field.
Optionalevent: Event
Modern form field component that renders entity fields in both read-only and edit modes.
Read mode: Clean text display with optional hyperlinks (email, URL, record). Edit mode: Native HTML inputs with custom-built select and autocomplete components.
Uses:
<input>for text, number, date<input type="checkbox">for booleansAll navigation (clicking FK links, email links, URL links) is emitted as events.
Example