@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
38 lines (37 loc) • 1.51 kB
TypeScript
import type { Nullish } from '../../../@aileron/declare';
import type { NumberSchema, NumberValue } from '../../../types';
import { AbstractNode } from '../AbstractNode';
import { type HandleChange, type SchemaNodeConstructorProps, type UnionSetValueOption } from '../type';
/**
* Node class for handling number schemas.
* Manages and parses numeric values (integers or floating-point numbers).
*/
export declare class NumberNode extends AbstractNode<NumberSchema, NumberValue> {
#private;
readonly type = "number";
/**
* Gets the value of the number node.
* @returns Number value or undefined
*/
get value(): NumberValue | Nullish;
/**
* Sets the value of the number node.
* @param input - The number value to set
*/
set value(input: NumberValue | Nullish);
/**
* Applies the input value to the number node.
* @param input - The number value to set
* @param option - Set value options
*/
protected applyValue(this: NumberNode, input: NumberValue | Nullish, option: UnionSetValueOption): void;
protected onChange: HandleChange<NumberValue | Nullish>;
constructor(properties: SchemaNodeConstructorProps<NumberSchema>);
/**
* Reflects value changes excluding empty values.
* @param input - The value to set
* @param batch - Optional flag indicating whether the change should be batched
* @internal Internal implementation method. Do not call directly.
*/
private onChangeWithOmitEmpty;
}