import { default as React } from 'react'; import { FieldWidgetComponentProps } from './widgets/types.js'; /** * Form field types that are deliberately NOT given an inline editor — every * other form widget type must be in {@link EDIT_WIDGETS}. This pairing is * enforced by a test against the form's widget map (`FORM_FIELD_TYPES`) so the * two can't silently drift again (which is how `lookup` was missed). To add a * type to inline editing, move it from here into EDIT_WIDGETS. */ export declare const INLINE_EXCLUDED_FIELD_TYPES: Set; /** Field types whose value is chosen in one discrete gesture (no free typing). */ export declare const DISCRETE_EDIT_TYPES: Set; /** * True when a field type has a dedicated in-place edit widget. * * A RETIRED spelling answers `false` unconditionally, ahead of every table * lookup (objectui#4931). This is the gate the retirement was missing: hosts * ask this question to decide whether to hand a cell to {@link FieldEditWidget}, * and while it answered `true` for a retired spelling the whole tombstone was * bypassable by delegation — the grid's inline cell editor rendered a working * person picker for a field the record form refuses. * * Keyed on the retirement TABLE rather than on the raw `type`, and checked * BEFORE `resolveInlineEditType`, so it holds even if a future retired spelling * is still (or again) a key of {@link EDIT_WIDGETS} — closing the class, not * one spelling. */ export declare function hasFieldEditWidget(type: string | undefined): boolean; /** * True when a field type is deliberately NOT inline-editable (alias-aware: * `composite` resolves to the excluded `object`, `video` to `file`, …). * Grid hosts must treat these as read-only cells — falling back to a plain * text editor is exactly the corruption path the exclusion exists to close. */ export declare function isInlineExcludedFieldType(type: string | undefined): boolean; /** * Render the dedicated edit widget for a field's type — the SAME control the * form uses — as a controlled `{ value, onChange, field }` input. Returns * `null` for types without a registered widget so the caller can fall back to * a plain editor. * * `autoFocus` is forwarded because an inline-edit host enters edit mode ON a * field and expects the caret to land there (objectui#4220 — the detail page's * delegation): each widget's own `toDomProps` whitelist already carries it onto * the real focusable control, so nothing here needs to know which element that * is. A host that passes nothing is unaffected. */ export declare function FieldEditWidget({ field, value, onChange, readonly, autoFocus, }: FieldWidgetComponentProps): React.ReactElement | null;