-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename cloneIfObject to protectAgainstParamReassignment; Fix isObject (…
…#391) * Improve isObject; Rename cloneIfObject to protectAgainstParamReassignment * Just give up and import lodash.isPlainObject * Update Travis targets
- Loading branch information
1 parent
761b3ef
commit 49fc634
Showing
21 changed files
with
1,148 additions
and
997 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,7 +1,8 @@ | ||
language: node_js | ||
sudo: false | ||
node_js: | ||
- '10' | ||
- 'node' | ||
- 'lts/*' | ||
before_install: | ||
- npm install -g yarn | ||
script: | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { FormsyContextInterface } from './interfaces'; | ||
declare const _default: React.Context<FormsyContextInterface>; | ||
export default _default; |
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,55 @@ | ||
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: () => void; | ||
setValidations: (validations: Validations<V>, required: RequiredValidation<V>) => void; | ||
setValue: (value: V) => void; | ||
showError: boolean; | ||
showRequired: boolean; | ||
} | ||
export interface WrapperInstanceMethods { | ||
isValid: () => boolean; | ||
getValue: () => any; | ||
getErrorMessage: () => any; | ||
} | ||
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.