import "./ReportParameters.css"; import { type ReportParameter, type ReportParameterValue, type ReportParameterValues } from "@olenbetong/appframe-core"; import type { FilterEditorSize } from "../filter/types.js"; export type ReportParametersProps = { /** The report's parameters, from `useReport`. */ parameters: ReportParameter[]; /** Current values, by parameter name. */ values: ReportParameterValues; onChange: (values: ReportParameterValues) => void; readOnly?: boolean; /** Heading above the parameters. Pass `null` to render none. */ legend?: string | null; className?: string; "data-size"?: FilterEditorSize; }; /** * The parameter form of the report launcher. * * Reports rarely have parameters, so this renders nothing at all when the list * is empty and the launcher can include it unconditionally. * * Each parameter gets the editor its metadata asks for: a lookup combobox when * it is backed by a record source, a select when it has a fixed item list, and * otherwise an editor for its data type. Values are coerced to the parameter's * type as they are entered, so what the caller holds is what gets sent to the * report. * * @example * ```jsx * let { parameters, defaultValues } = useReport(reportId); * let [values, setValues] = useState(defaultValues); * * * ``` */ export declare function ReportParameters({ parameters, values, onChange, readOnly, legend, className, "data-size": size, }: ReportParametersProps): import("react").JSX.Element | null; type ReportParameterFieldProps = { parameter: ReportParameter; value: ReportParameterValue; onChange: (value: ReportParameterValue) => void; readOnly?: boolean; size: FilterEditorSize; }; /** The editor for a single parameter. */ export declare function ReportParameterField({ parameter, value, onChange, readOnly, size }: ReportParameterFieldProps): import("react").JSX.Element; export {};