@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
34 lines (33 loc) • 1.28 kB
TypeScript
import type { VirtualNodeValue, VirtualSchema } from '../../../types';
import { AbstractNode } from '../AbstractNode';
import { type ChildNode, type UnionSetValueOption, type VirtualNodeConstructorProps } from '../type';
/**
* Node class for handling virtual schemas.
* Holds references to multiple nodes and works by integrating them.
*/
export declare class VirtualNode extends AbstractNode<VirtualSchema, VirtualNodeValue> {
#private;
readonly type = "virtual";
/**
* Gets the value of the virtual node.
* @returns Array of values from all referenced nodes or undefined
*/
get value(): VirtualNodeValue | undefined;
/**
* Sets the value of the virtual node.
* @param input - The value to set
*/
set value(input: VirtualNodeValue | undefined);
/**
* Applies the input value to the virtual node.
* @param input - The value to set
* @param option - Set value options
*/
protected applyValue(this: VirtualNode, input: VirtualNodeValue | undefined, option: UnionSetValueOption): void;
/**
* Gets the child nodes of the virtual node.
* @returns List of child nodes
*/
get children(): ChildNode[];
constructor(properties: VirtualNodeConstructorProps<VirtualSchema>);
}