UNPKG

@vtaits/react-hook-form-schema

Version:

Integration of react-hook-form and @vtaits/form-schema

52 lines (49 loc) 2.43 kB
import { A as AsyncMultiSelectSchema, a as AsyncSelectSchema } from './schema-BDJUA41v.js'; import { C as CheckboxSchema } from './schema-BDq3ZD0J.js'; import { C as CheckboxGroupSchema } from './schema-ChEWMXec.js'; import { D as DateSchema } from './schema-CqLYqxRz.js'; import { D as DateTimeSchema } from './schema-4L4gGumE.js'; import { D as DynamicSchema } from './schema-DepCj0Ld.js'; import { F as FileSchema } from './schema-p6TpP1ZP.js'; import { I as InputSchema } from './schema-BjpIwP5o.js'; import { L as ListSchema } from './schema-DxUiD50y.js'; import { R as RadioGroupSchema } from './schema-DRLguPfZ.js'; import { M as MultiSelectSchema, S as SelectSchema } from './schema-BG9s7MAB.js'; import { S as SetSchema } from './schema-DeY5xsmv.js'; import { T as TagsSchema } from './schema-RYZu_1uA.js'; import { T as TextAreaSchema } from './schema-3U-G6tVB.js'; type BuiltInFieldSchema<Values extends Record<string, any> = Record<string, any>, RawValues extends Record<string, any> = Record<string, any>, SerializedValues extends Record<string, any> = Record<string, any>, Errors extends Record<string, any> = Record<string, any>, Payload = any> = (AsyncMultiSelectSchema & { type: "asyncMultiSelect"; }) | (AsyncSelectSchema & { type: "asyncSelect"; }) | (CheckboxSchema & { type: "checkbox"; }) | (CheckboxGroupSchema & { type: "checkboxGroup"; }) | (DateSchema & { type: "date"; }) | (DateTimeSchema & { type: "datetime"; }) | (DynamicSchema<any, Values, RawValues, SerializedValues, Errors> & { type: "dynamic"; }) | (FileSchema & { type: "file"; }) | (InputSchema & { type: "input"; }) | (RadioGroupSchema & { type: "radioGroup"; }) | (MultiSelectSchema & { type: "multiSelect"; }) | (SelectSchema & { type: "select"; }) | (SetSchema<any, Values, Payload> & { type: "set"; }) | (TagsSchema & { type: "tags"; }) | (ListSchema<any> & { type: "list"; }) | (TextAreaSchema & { type: "textarea"; }); type DefaultFieldSchema<FieldSchema, Values extends Record<string, any> = Record<string, any>, RawValues extends Record<string, any> = Record<string, any>, SerializedValues extends Record<string, any> = Record<string, any>, Errors extends Record<string, any> = Record<string, any>, Payload = any> = FieldSchema | BuiltInFieldSchema<Values, RawValues, SerializedValues, Errors, Payload>; export type { BuiltInFieldSchema as B, DefaultFieldSchema as D };