Repository URL to install this package:
|
Version:
3.2.1 ▾
|
import { ComponentClass } from 'react';
import { Value, AnyObj, SerializerFunction, ValidatorFunction } from '../typings';
export interface InputPluginIsSatisfiedByArg {
[key: string]: any;
type: string;
}
export interface DefaultStateReturn<Props = AnyObj> {
serializer?: SerializerFunction;
validator?: ValidatorFunction;
type?: string;
attributes?: Props;
formState?: any;
propertyName?: string;
label?: string;
value?: Value;
identifier?: string;
isActive?: boolean;
isSelected?: boolean;
[key: string]: any;
}
export declare type DefaultStateFunction = <InputState = any>(inputState: InputState) => DefaultStateReturn;
export interface InputPluginStaticTypes {
defaultState?: DefaultStateReturn | DefaultStateFunction;
isSatisfiedByProps: (props: InputPluginIsSatisfiedByArg) => boolean;
}
export declare type InputPluginType<Type = any> = ComponentClass<Type> & InputPluginStaticTypes;
export declare type PluginsContextValue = InputPluginType[];
export declare const PluginsContext: import("react").Context<InputPluginType<any>[]>;
export declare const Provider: import("react").ProviderExoticComponent<import("react").ProviderProps<InputPluginType<any>[]>>, Consumer: import("react").ExoticComponent<import("react").ConsumerProps<InputPluginType<any>[]>>;