UNPKG

@gongiskhan/react-query-builder

Version:
41 lines (40 loc) 1.53 kB
import React from 'react'; import { Strings } from '../constants/strings'; export declare const StyledBuilder: import("styled-components").StyledComponent<"div", any, {}, never>; export declare type BuilderFieldType = 'BOOLEAN' | 'TEXT' | 'DATE' | 'NUMBER' | 'STATEMENT' | 'LIST' | 'MULTI_LIST' | 'GROUP'; export declare type BuilderFieldOperator = 'LARGER' | 'SMALLER' | 'LARGER_EQUAL' | 'SMALLER_EQUAL' | 'EQUAL' | 'NOT_EQUAL' | 'ALL_IN' | 'ANY_IN' | 'NOT_IN' | 'BETWEEN' | 'NOT_BETWEEN' | 'EXISTS' | 'NOT_EXISTS' | 'CONTAINS' | 'LESS_THAN' | 'GREATER_THAN' | 'NOT_CONTAINS'; export declare type BuilderGroupValues = 'AND' | 'OR'; export interface BuilderFieldProps { field: string; label: string; value?: string | string[] | boolean | Array<{ value: React.ReactText; label: string; }>; type: BuilderFieldType; operators?: BuilderFieldOperator[]; } export interface BuilderComponentsProps { form?: { Select?: any; SelectMulti?: any; Switch?: any; Input?: any; }; Remove?: any; Add?: any; Component?: any; Group?: any; GroupHeaderOption?: any; Text?: any; } export interface BuilderProps { fields: BuilderFieldProps[]; data: any; components?: BuilderComponentsProps; strings?: Strings; readOnly?: boolean; onChange?: (data: any) => any; } export declare const defaultComponents: BuilderComponentsProps; export declare const Builder: React.FC<BuilderProps>;