import * as React from "react"; import { FormBinderBase } from "./formBinderBase"; import { IDataBinder, IFormBinder, IFormBinderInjector } from "./formCore"; import { IInputValueConverter, INumericOptions, IValueConverter } from "./formValueConverters"; import { IAutoCompleteInputProps } from "./inputs/autoCompleteInput_old"; import { IAutoCompleteOption, IAutoCompleteProps } from "./inputs/autoCompleteOptionHooks"; import { ICalendarInputProps } from "./inputs/calendarInput"; import { ICodeInputProps } from "./inputs/codeInput"; import { IDateInputProps } from "./inputs/dateInput"; import { ITagInputProps } from "./inputs/tagInput"; import { ITimeInputProps } from "./inputs/timeInput"; import { FormBinderKey, IArrayProp, IObjectProp, PropType } from "./propertyPathBuilder"; /** An input FormBinder that sets native 'value' and 'onChange: (e) => void' properties */ export declare class InputFormBinder extends FormBinderBase, TDataPropValue, TComponentPropValue> { setElementProperty(props: React.DOMAttributes, dataBinder: IDataBinder): void; protected getDefaultInputValue(): any; handleValueChanged(props: React.DOMAttributes, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class SelectMultipleFormBinder extends InputFormBinder { constructor(dataPath: string, valueConverter?: IValueConverter); setElementProperty(props: React.DOMAttributes, dataBinder: IDataBinder): void; handleValueChanged(props: React.DOMAttributes, dataBinder: IDataBinder, notifyChanged: () => void): void; private getSelectValues; } export declare class CheckboxFormBinder extends InputFormBinder { constructor(dataPath: string, valueConverter?: IValueConverter); protected getDefaultInputValue(): boolean; } /** A radio input FormBinder */ export declare class RadioFormBinder extends InputFormBinder { setElementProperty(props: React.DOMAttributes, dataBinder: IDataBinder): void; } export declare class RadioListFormBinder extends InputFormBinder { setElementProperty(props: React.DOMAttributes, dataBinder: IDataBinder): void; } export declare class DateInputFormBinder extends FormBinderBase { constructor(dataPath: string); handleValueChanged(props: IDateInputProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class TimeInputFormBinder extends FormBinderBase { constructor(dataPath: string); static customValue(dataName: string): TimeInputFormBinder; handleValueChanged(props: ITimeInputProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class CalendarInputFormBinder extends FormBinderBase { constructor(dataPath: string); static customValue(dataName: string): CalendarInputFormBinder; handleValueChanged(props: ICalendarInputProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class AutoCompleteMultiFormBinder implements IFormBinder, any> { dataPath: string; private getItemFromId?; constructor(dataPath: string, getItemFromId?: (id: string) => IAutoCompleteOption); setElementProperty(props: IAutoCompleteProps, dataBinder: IDataBinder): void; handleValueChanged(props: IAutoCompleteProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class AutoCompleteSingleFormBinder implements IFormBinder, any> { dataPath: string; private getItemFromId?; constructor(dataPath: string, getItemFromId?: (id: string) => IAutoCompleteOption); setElementProperty(props: IAutoCompleteProps, dataBinder: IDataBinder): void; handleValueChanged(props: IAutoCompleteProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class AutoCompleteLegacyFormBinder implements IFormBinder { dataPath: string; private getItemFromId?; constructor(dataPath: string, getItemFromId?: (id: string) => IAutoCompleteOption); setElementProperty(props: IAutoCompleteInputProps, dataBinder: IDataBinder): void; handleValueChanged(props: IAutoCompleteInputProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class TagInputFormBinder implements IFormBinder { dataPath: string; constructor(dataPath: string); setElementProperty(props: ITagInputProps, dataBinder: IDataBinder): void; handleValueChanged(props: ITagInputProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } export declare class CodeInputFormBinder implements IFormBinder { dataPath: string; constructor(dataPath: string); setElementProperty(props: ICodeInputProps, dataBinder: IDataBinder): void; handleValueChanged(props: ICodeInputProps, dataBinder: IDataBinder, notifyChanged: () => void): void; } /** Form Binder helpers */ export declare class FormBinder { private parentPath?; constructor(parentPath?: string); createChildBinder(dataName: (builder: PropType) => IObjectProp): FormBinder; createChildBinder(dataName: (builder: PropType) => IArrayProp): FormBinder; createChildBinder>(dataName: TKey): FormBinder; /** bind a custom form binder */ custom

(formBinder: IFormBinder): IFormBinderInjector

; /** Override the children of the React element - used for label binding */ children(dataName: FormBinderKey, childrenFactory: (value: TValue, props?: TProps, dataBinder?: IDataBinder) => React.ReactNode): IFormBinderInjector; /** bind to a 'hidden' input */ hidden(dataName: FormBinderKey, valueConverter?: IInputValueConverter): IFormBinderInjector>; /** bind a string property to a 'password' input */ password(dataName: FormBinderKey, valueConverter?: IInputValueConverter): IFormBinderInjector>; /** bind a string property to a 'text' input */ text(dataName: FormBinderKey, valueConverter?: IInputValueConverter): IFormBinderInjector>; /** bind a string property to a 'email' input */ textEmail(dataName: FormBinderKey, valueConverter?: IInputValueConverter): IFormBinderInjector>; autoCompleteInputLegacy(dataName: FormBinderKey, getItemFromId?: (id: string) => IAutoCompleteOption): IFormBinderInjector; autoCompleteSingleInput(dataName: FormBinderKey, getItemFromId?: (id: string) => IAutoCompleteOption): IFormBinderInjector>; autoCompleteMultiInput(dataName: FormBinderKey, getItemFromId?: (id: string) => IAutoCompleteOption): IFormBinderInjector>; /** bind a 'value' string array property to a TagInput (e.g. ["cool", "guys", "only"]) */ tagInput(dataName: FormBinderKey): IFormBinderInjector; codeInput(dataName: FormBinderKey): IFormBinderInjector; /** bind a 'date' string property to a CalendarInput (e.g. YYYY-MM-DD) */ calendarInput(dataName: FormBinderKey): IFormBinderInjector; /** bind a 'date' string property to a DateInput (e.g. YYYY-MM-DD) */ dateInput(dataName: FormBinderKey): IFormBinderInjector; /** bind a 'time' string property to a TimeInput (e.g. HH:MM) */ timeInput(dataName: FormBinderKey): IFormBinderInjector; private defaultInputFormBinder; /** bind a number property to a range */ range(dataName: FormBinderKey, options?: INumericOptions): IFormBinderInjector>; /** uncontrolled text input */ defaultText(dataName: FormBinderKey, valueConverter?: IInputValueConverter): IFormBinderInjector>; /** bind a number property to a 'text' input */ textNumeric(dataName: FormBinderKey, options?: INumericOptions): IFormBinderInjector>; /** bind a TDataPropValue property to a select */ selectCustom(dataName: FormBinderKey, valueConverter?: IInputValueConverter): IFormBinderInjector>; /** bind a string property to a select */ select(dataName: FormBinderKey): IFormBinderInjector>; /** bind a number property to a select */ selectNumeric(dataName: FormBinderKey): IFormBinderInjector>; /** bind a TDataPropValue[] property to a multi select */ selectMultipleCustom(dataName: FormBinderKey, valueConverter?: IValueConverter): IFormBinderInjector>; /** bind a string[] property to a multi select */ selectMultiple(dataName: FormBinderKey): IFormBinderInjector>; /** bind a number[] property to a multi select */ selectMultipleNumeric(dataName: FormBinderKey): IFormBinderInjector>; /** bind a TDataPropValue property to a 'checkbox' input */ checkboxCustom(dataName: FormBinderKey, valueConverter?: IValueConverter): IFormBinderInjector>; /** bind a boolean property to a 'checkbox' input */ checkbox(dataName: FormBinderKey): IFormBinderInjector>; /** bind a TDataPropValue property to a 'radio' input, using trueValue and falseValue equality testing */ checkboxConvert(dataName: FormBinderKey, trueValue: TDataPropValue, falseValue: TDataPropValue): IFormBinderInjector>; /** bind a TDataPropValue property to a 'radio' input */ radioCustom(dataName: FormBinderKey, value: string, valueConverter: IInputValueConverter): IFormBinderInjector>; /** bind a string property to a 'radio' input */ radio(dataName: FormBinderKey, value: string): IFormBinderInjector>; /** bind a number property to a 'radio' input */ radioNumeric(dataName: FormBinderKey, value: number): IFormBinderInjector>; /** bind a TDataPropValue property to a 'radio' input */ radioListCustom(dataName: FormBinderKey, valueConverter: IInputValueConverter): IFormBinderInjector>; /** bind a string property to a 'radio' input */ radioList(dataName: FormBinderKey): IFormBinderInjector>; /** bind a number property to a 'radio' input */ radioListNumeric(dataName: FormBinderKey): IFormBinderInjector>; }