import type { ConfigSchema, AuthProvider } from '../types/index.js'; import type { UISchemaElement } from '../types/uischema.js'; /** * Props interface for SchemaForm component */ interface Props { /** * JSON Schema definition for the form. * Should follow JSON Schema draft-07 format with type: "object". */ schema: ConfigSchema; /** * Optional UI Schema that controls field layout and grouping. * When provided, fields render according to the UISchema tree structure. * When absent, fields render in flat order from schema.properties. * @see https://jsonforms.io/docs/uischema */ uiSchema?: UISchemaElement; /** * Current form values as key-value pairs. * Keys should correspond to properties defined in the schema. */ values?: Record; /** * Callback fired whenever any field value changes. * Receives the complete updated values object. * @param values - Updated form values */ onChange?: (values: Record) => void; /** * Whether to display Save and Cancel action buttons. * @default false */ showActions?: boolean; /** * @deprecated since v1.8 — use `messages.form.schema.save`. Removed in v2.0. */ saveLabel?: string; /** * @deprecated since v1.8 — use `messages.form.schema.cancel`. Removed in v2.0. */ cancelLabel?: string; /** * Callback fired when the Save button is clicked. * Receives the final form values. * @param values - Final form values */ onSave?: (values: Record) => void; /** * Callback fired when the Cancel button is clicked. */ onCancel?: () => void; /** * Whether the form is in a loading state. * Disables all inputs when true. * @default false */ loading?: boolean; /** * Whether the form is disabled. * @default false */ disabled?: boolean; /** * Custom CSS class for the form container. */ class?: string; /** * Authentication provider for autocomplete fields. * Used to add authentication headers when fetching suggestions from callback URLs. */ authProvider?: AuthProvider; /** * Base URL for resolving relative autocomplete callback URLs. * @default "" */ baseUrl?: string; } declare const SchemaForm: import("svelte").Component; type SchemaForm = ReturnType; export default SchemaForm;