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).
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.
Whether the FK input is focused — the scope pill only appears while focused.
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.
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).
Code name of the name column (used as its sort key).
True when a search completed with zero results (drives the "No matches" row).
Fields the user can scope the search to (name + shown columns + other fields).
Related-entity field code name currently searched against (defaults to the name field).
Friendly label of FKSearchField, shown on the scope pill.
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
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 to show the field label
Whether the custom select dropdown is visible
Whether the value list dropdown is visible
Emitted when the field value changes
StaticɵdirStaticɵfacWhether 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.
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.
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
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, 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
Whether this field has a related entity (foreign key)
Display name with search highlighting applied. Output is bound to [innerHTML].
URL box: empty for inline images so we never dump a data URI into a text input.
Whether this field has been modified (dirty). Only shown for saved records (not new).
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 with field security switched
off — 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
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 with a hyperlink instead of the raw ID value.
Whether the field's varchar(max) - long text that gets the wide read-only style
Whether this field is required (not nullable)
Whether this is a required field that is currently empty (for validation styling)
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 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
Set field value, mark touched, run validation, and emit change event
Whether 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).
FontAwesome class for a column header's sort indicator (idle / asc / desc).
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.
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.
Handle value change from a number input.
Handle click on a record FK link in read-only mode.
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
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