@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
11 lines (10 loc) • 630 B
TypeScript
import type { JsonSchema } from '../../../../../types';
/**
* Processes a schema with virtual field definitions by transforming required fields,
* then/else conditions to handle virtual field mappings. Virtual fields allow for
* conditional form logic where certain fields are only required under specific conditions.
*
* @param schema - The partial JSON Schema that may contain virtual field definitions
* @returns The transformed schema with virtual conditions applied, or null if no virtual processing was needed
*/
export declare const processVirtualSchema: (schema: Partial<JsonSchema>) => Partial<JsonSchema> | null;