You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
854 B
35 lines
854 B
import { Validate } from "react-hook-form";
|
|
|
|
export interface CreateFieldTypes {
|
|
string: 'string';
|
|
number: 'number';
|
|
date: 'date';
|
|
dateTime: 'dateTime';
|
|
boolean: 'boolean';
|
|
singleSelect: 'singleSelect';
|
|
actions: 'actions';
|
|
custom: 'custom';
|
|
}
|
|
|
|
export interface InputTypes {
|
|
password: 'password';
|
|
}
|
|
|
|
export type CreateFieldType = CreateFieldTypes[keyof CreateFieldTypes]
|
|
export type InputType = InputTypes[keyof InputTypes]
|
|
|
|
export interface CreateField {
|
|
key: string;
|
|
headerName?: string;
|
|
type: CreateFieldType;
|
|
required?: boolean;
|
|
defaultValue?: any;
|
|
inputType?: InputType;
|
|
validate?: Validate<string, boolean>;
|
|
/** Watch for field */
|
|
watch?: string;
|
|
/** Message on watch */
|
|
watchMessage?: string;
|
|
/** Should field be included in the request */
|
|
include?: boolean;
|
|
}
|