/** * Field type → form control type resolution. * * The indexed `symbols` table stores a uniform "String" signature for every * field, so it cannot tell an enum from a date from a real. To emit the correct * AxForm control for each field (ComboBox for enums, Date for dates, …) we read * the field's real `i:type` straight from the table's AOT XML — which every * indexed field row points at via its `file_path`. * * Mapping is driven by the field's AxTableField i:type (reliable, present on * every field) rather than the EDT name, so it works for custom EDTs too. */ export interface ControlTypeInfo { /** AxForm control i:type attribute, e.g. 'AxFormComboBoxControl' */ iType: string; /** element value, e.g. 'ComboBox' */ typeValue: string; } /** Fallback when the field type is unknown — a plain string control is always valid. */ export declare const DEFAULT_CONTROL: ControlTypeInfo; /** * Resolve the form control for a table field, given its AxTableField i:type and * (for enums) the bound enum name. NoYes enums become a CheckBox; every other * enum a ComboBox — matching how shipped forms render them. */ export declare function controlForTableField(tableFieldIType: string, enumType?: string): ControlTypeInfo; /** field name (lower-cased) → resolved control type */ export type FieldControlMap = Map; /** * Parse a table's AOT XML into a field→control-type map. Returns an empty map on * any failure (missing file, parse issue) — callers fall back to String controls. */ export declare function parseTableFieldControls(tableXml: string): FieldControlMap; /** * A view's own XML carries no field TYPES — an `` only names * the underlying table field. Parse the bindings so the types can be picked up * from the tables the view's query reads. * * `dataSource` is the QUERY datasource alias, not a table name; resolving it * needs the query (see {@link parseQueryDataSourceTables}). */ export declare function parseViewFieldBindings(viewXml: string): Array<{ name: string; dataField: string; dataSource?: string; }>; /** * Map a query's datasource ALIASES to the tables behind them. In AxQuery XML a * datasource's `` always directly follows its ``, at every nesting * level, so one pass over that pair covers root and child datasources alike. */ export declare function parseQueryDataSourceTables(queryXml: string): Map; /** The `` an AxView is built on, or undefined for a query-less view. */ export declare function parseViewQueryName(viewXml: string): string | undefined; /** * Build a field→control-type map for a table by locating its AOT XML through the * symbol index (any field row of the table carries the table's `file_path`). * Views are supported too, through the extra query→table hop described in * {@link getViewFieldControlMap}. * * @param db read-only SQLite handle (symbolIndex.getReadDb()) * @param table table (or view) name */ export declare function getFieldControlMap(db: any, table: string): FieldControlMap; /** * Read `` out of a table's AOT XML. The element is table-level, so * the match is anchored on the FIRST occurrence outside any nested block — * `` exists nowhere else in an AxTable document, so a plain match * is safe. Returns undefined when the table declares no title field. */ export declare function parseTableTitleField(tableXml: string): string | undefined; /** * Resolve a table's `TitleField1` through the symbol index (same file_path hop as * {@link getFieldControlMap}). Used by the form scaffold so a DetailsMaster title * control binds to the record's identifying field instead of the alphabetically * first one (the 2026-07-21 eval sweep, finding #32). */ export declare function getTableTitleField(db: any, table: string): string | undefined; /** Control type for a single field from a (possibly undefined) map, defaulting to String. */ export declare function controlForField(field: string, types?: FieldControlMap): ControlTypeInfo; /** * Locate a table's AOT XML WITHOUT the symbol index. * * {@link getFieldControlMap} needs a SQLite handle, which the shared XML * builders do not have and should not grow — and the index is also the wrong * oracle here: a table created moments ago in the same call is on disk but not * yet indexed, which is exactly the case a form-over-a-new-table hits. Reading * the layout instead (`///AxTable/.xml`) sees it. * * The per-root directory listing is built once and cached; on this VM that is * 214 packages and a few hundred milliseconds, against a form create that * otherwise emits a String control for every column. */ export declare function findTableXmlPath(table: string, roots?: readonly string[]): string | undefined; /** Forget the cached AxTable listings — for tests, and after a model is written. */ export declare function resetTableXmlIndexCache(): void; /** The `` names a table document declares. */ export declare function parseTableFieldGroupNames(tableXml: string): Set; /** * Does this table declare that field group? * * `undefined` means "could not tell" — the table was not found or not readable * — and is deliberately distinct from `false`. A form control's `` * is a build error when it names a group the table does not have, but dropping * it on a mere failure to read would break every form built without the * packages root in reach. Only a positive `false` may change behaviour. */ export declare function tableDeclaresFieldGroup(table: string, group: string, roots?: readonly string[]): boolean | undefined; /** * Field→control-type map for a table, read straight off disk. Returns an empty * map when the table cannot be found, so callers fall back to String controls * exactly as before. */ export declare function getFieldControlMapFromDisk(table: string, roots?: readonly string[]): FieldControlMap; //# sourceMappingURL=fieldControlTypes.d.ts.map