/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import type { Field, FieldAdminConfig, FieldComponentSlots, RichTextEditorComponent } from '@byline/core'; interface FieldRendererProps { field: Field; defaultValue?: any; basePath?: string; disableSorting?: boolean; hideLabel?: boolean; /** * The active content locale (e.g. `'en'`, `'fr'`). When provided and * `field.localized === true`, a small locale badge is shown so the editor * knows they are working on a localised field in the current language. */ contentLocale?: string; /** * Optional UI component slot overrides from the admin config. * Forwarded to value-field widgets that support custom slots. */ components?: FieldComponentSlots; /** * Per-field rich-text editor component override from the admin config. * Takes precedence over the globally registered * `AdminConfig.fields.richText.editor` for this single field. * Ignored when `field.type !== 'richText'`. */ editor?: RichTextEditorComponent; /** * Admin overrides for this field's *descendants*, keyed by dotted, * index-free schema paths relative to this field ('answer', * 'filesGroup.publicationFile'). Only meaningful when `field` is a * structural `group` / `array` — the widget slices the map per child * (see `sliceFieldAdmin`). `components` / `editor` above stay the * overrides for this field itself. */ fieldAdmin?: Record; } export declare const FieldRenderer: ({ field, defaultValue: initialDefault, basePath, disableSorting, hideLabel, contentLocale, components, editor, fieldAdmin, }: FieldRendererProps) => import("react").JSX.Element | null; export {};