-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first draw * working solution * remove childContextTypes * tests passing :) * make eslint? work * build * fix merge * Update src/FormsyContext.ts Co-Authored-By: Robert Kuykendall <robert@rkuykendall.com> * Update src/index.ts Co-Authored-By: Robert Kuykendall <robert@rkuykendall.com> * CR rkuykendall * don't commit build files * Update src/index.ts Co-Authored-By: Robert Kuykendall <robert@rkuykendall.com>
- Loading branch information
1 parent
6fcc682
commit a79eec2
Showing
10 changed files
with
574 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { RequiredValidation, Validations } from './interfaces'; | ||
declare const propTypes: { | ||
innerRef: PropTypes.Requireable<(...args: any[]) => any>; | ||
name: PropTypes.Validator<string>; | ||
required: PropTypes.Requireable<string | boolean | object>; | ||
validations: PropTypes.Requireable<string | object>; | ||
value: PropTypes.Requireable<any>; | ||
}; | ||
export interface WrapperProps<V> { | ||
innerRef?: (ref: any) => void; | ||
name: string; | ||
required?: RequiredValidation<V>; | ||
validationError?: any; | ||
validationErrors?: any; | ||
validations?: Validations<V>; | ||
value?: V; | ||
} | ||
export interface WrapperState<V> { | ||
[key: string]: unknown; | ||
externalError: null; | ||
formSubmitted: boolean; | ||
isPristine: boolean; | ||
isRequired: boolean; | ||
isValid: boolean; | ||
pristineValue: any; | ||
validationError: any[]; | ||
value: V; | ||
} | ||
export interface InjectedProps<V> { | ||
errorMessage: any; | ||
errorMessages: any; | ||
hasValue: boolean; | ||
isFormDisabled: boolean; | ||
isFormSubmitted: boolean; | ||
isPristine: boolean; | ||
isRequired: boolean; | ||
isValid: boolean; | ||
isValidValue: (value: V) => boolean; | ||
ref?: any; | ||
resetValue: any; | ||
setValidations: any; | ||
setValue: (value: V) => void; | ||
showError: boolean; | ||
showRequired: boolean; | ||
} | ||
export declare type PassDownProps<V> = WrapperProps<V> & InjectedProps<V>; | ||
export { propTypes }; | ||
export default function <T, V>(WrappedComponent: React.ComponentType<T & PassDownProps<V>>): React.ComponentType<Omit<T & WrapperProps<V>, keyof InjectedProps<V>>>; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { RequiredValidation, Validations } from './interfaces'; | ||
declare const propTypes: { | ||
innerRef: PropTypes.Requireable<(...args: any[]) => any>; | ||
name: PropTypes.Validator<string>; | ||
required: PropTypes.Requireable<string | boolean | object>; | ||
validations: PropTypes.Requireable<string | object>; | ||
value: PropTypes.Requireable<any>; | ||
}; | ||
export interface WrapperProps<V> { | ||
innerRef?: (ref: any) => void; | ||
name: string; | ||
required?: RequiredValidation<V>; | ||
validationError?: any; | ||
validationErrors?: any; | ||
validations?: Validations<V>; | ||
value?: V; | ||
} | ||
export interface WrapperState<V> { | ||
[key: string]: unknown; | ||
externalError: null; | ||
formSubmitted: boolean; | ||
isPristine: boolean; | ||
isRequired: boolean; | ||
isValid: boolean; | ||
pristineValue: any; | ||
validationError: any[]; | ||
value: V; | ||
} | ||
export interface InjectedProps<V> { | ||
errorMessage: any; | ||
errorMessages: any; | ||
hasValue: boolean; | ||
isFormDisabled: boolean; | ||
isFormSubmitted: boolean; | ||
isPristine: boolean; | ||
isRequired: boolean; | ||
isValid: boolean; | ||
isValidValue: (value: V) => boolean; | ||
ref?: any; | ||
resetValue: any; | ||
setValidations: any; | ||
setValue: (value: V) => void; | ||
showError: boolean; | ||
showRequired: boolean; | ||
} | ||
export declare type PassDownProps<V> = WrapperProps<V> & InjectedProps<V>; | ||
export { propTypes }; | ||
export default function <T, V>(WrappedComponent: React.ComponentType<T & PassDownProps<V>>): React.ComponentType<Omit<T & WrapperProps<V>, keyof InjectedProps<V>>>; |
Oops, something went wrong.