@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
82 lines (81 loc) • 3.59 kB
TypeScript
export declare const formTypeDefinitions: ({
Component: ({ node, readOnly, disabled, ChildNodeComponents, style, }: import("../types").FormTypeInputProps<any[]>) => import("react/jsx-runtime").JSX.Element;
test: {
type: "array";
};
} | {
Component: ({ path, name, readOnly, disabled, defaultValue, onChange, style, className, }: import("../types").FormTypeInputProps<boolean | null>) => import("react/jsx-runtime").JSX.Element;
test: {
type: "boolean";
};
} | {
Component: ({ path, name, jsonSchema, readOnly, disabled, defaultValue, onChange, style, className, }: import("../types").FormTypeInputPropsWithSchema<string | null, {
format: "month" | "week" | "date" | "date-time" | "time";
} & import("../types").StringSchema<{
minimum?: string;
maximum?: string;
}>>) => import("react/jsx-runtime").JSX.Element;
test: {
type: "string";
format: string[];
};
} | {
Component: ({ path, name, jsonSchema, readOnly, disabled, defaultValue, onChange, style, className, }: import("../types").FormTypeInputProps<number | null>) => import("react/jsx-runtime").JSX.Element;
test: {
type: ("number" | "integer")[];
};
} | {
Component: ({ ChildNodeComponents, }: import("../types").FormTypeInputProps<object>) => import("react/jsx-runtime").JSX.Element;
test: {
type: "object";
};
} | {
Component: ({ path, name, readOnly, disabled, jsonSchema, defaultValue, onChange, style, className, }: import("../types").FormTypeInputProps<string | null>) => import("react/jsx-runtime").JSX.Element;
test: {
type: "string";
};
} | {
Component: ({ path, name, jsonSchema, readOnly, disabled, defaultValue, onChange, context, style, className, }: import("../types").FormTypeInputPropsWithSchema<(string | null)[], {
items: import("../types").StringSchema<{
alias?: {
[label: string]: import("react").ReactNode;
};
}>;
} & import("../types").ArraySchema<{
alias?: {
[label: string]: import("react").ReactNode;
};
}>, {
checkboxLabels?: {
[label: string]: import("react").ReactNode;
};
}>) => import("react/jsx-runtime").JSX.Element;
test: ({ jsonSchema }: import("../types").Hint) => boolean;
} | {
Component: ({ path, name, jsonSchema, defaultValue, onChange, readOnly, disabled, context, style, className, }: import("../types").FormTypeInputPropsWithSchema<string | null, import("../types").StringSchema<{
alias?: {
[label: string]: import("react").ReactNode;
};
}>, {
enumLabels?: {
[label: string]: import("react").ReactNode;
};
}>) => import("react/jsx-runtime").JSX.Element;
test: ({ jsonSchema }: import("../types").Hint) => boolean;
} | {
Component: ({ path, name, jsonSchema, readOnly, disabled, defaultValue, onChange, context, style, className, }: import("../types").FormTypeInputPropsWithSchema<string | null, import("../types").StringSchema<{
alias?: {
[label: string]: import("react").ReactNode;
};
}>, {
radioLabels?: {
[label: string]: import("react").ReactNode;
};
}>) => import("react/jsx-runtime").JSX.Element;
test: ({ jsonSchema }: import("../types").Hint) => boolean;
} | {
Component: ({ ChildNodeComponents, }: import("../types").FormTypeInputProps<object>) => import("react/jsx-runtime").JSX.Element;
test: {
type: "virtual";
};
})[];