Skip to content

Commit

Permalink
v2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuykendall committed Jan 21, 2021
1 parent 5a34c44 commit 880ab7a
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 239 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v2.2.0](https://github.com/formsy/formsy-react/compare/v2.1.0...v2.2.0)
#### [v2.2.1](https://github.com/formsy/formsy-react/compare/v2.2.0...v2.2.1)

> 27 August 2020
#### [v2.2.0](https://github.com/formsy/formsy-react/compare/v2.1.1...v2.2.0)

> 27 August 2020
#### [v2.1.1](https://github.com/formsy/formsy-react/compare/v2.1.0...v2.1.1)

> 27 August 2020
Expand Down
168 changes: 88 additions & 80 deletions dist/Formsy.d.ts
Original file line number Diff line number Diff line change
@@ -1,80 +1,88 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormsyContextInterface, IModel, InputComponent, IResetModel, IUpdateInputsWithError, IUpdateInputsWithValue, ValidationError } from './interfaces';
import { PassDownProps } from './withFormsy';
declare type FormHTMLAttributesCleaned = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onChange' | 'onSubmit'>;
declare type OnSubmitCallback = (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError, event: React.SyntheticEvent<React.FormHTMLAttributes<any>>) => void;
export interface FormsyProps extends FormHTMLAttributesCleaned {
disabled: boolean;
mapping: null | ((model: IModel) => IModel);
onChange: (model: IModel, isChanged: boolean) => void;
onInvalid: () => void;
onReset?: () => void;
onSubmit?: OnSubmitCallback;
onValidSubmit?: OnSubmitCallback;
onInvalidSubmit: OnSubmitCallback;
onValid: () => void;
preventDefaultSubmit?: boolean;
preventExternalInvalidation?: boolean;
validationErrors?: null | object;
}
export interface FormsyState {
canChange: boolean;
contextValue: FormsyContextInterface;
formSubmitted?: boolean;
isPristine?: boolean;
isSubmitting: boolean;
isValid: boolean;
}
export declare class Formsy extends React.Component<FormsyProps, FormsyState> {
inputs: InstanceType<any & PassDownProps<any>>[];
emptyArray: any[];
prevInputNames: any[] | null;
static displayName: string;
static propTypes: {
disabled: PropTypes.Requireable<boolean>;
mapping: PropTypes.Requireable<(...args: any[]) => any>;
onChange: PropTypes.Requireable<(...args: any[]) => any>;
onInvalid: PropTypes.Requireable<(...args: any[]) => any>;
onInvalidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
onReset: PropTypes.Requireable<(...args: any[]) => any>;
onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
onValid: PropTypes.Requireable<(...args: any[]) => any>;
onValidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
preventDefaultSubmit: PropTypes.Requireable<boolean>;
preventExternalInvalidation: PropTypes.Requireable<boolean>;
validationErrors: PropTypes.Requireable<object>;
};
static defaultProps: Partial<FormsyProps>;
private readonly throttledValidateForm;
constructor(props: FormsyProps);
componentDidMount: () => void;
componentDidUpdate: (prevProps: FormsyProps) => void;
getCurrentValues: () => any;
getModel: () => any;
getPristineValues: () => any;
setFormPristine: (isPristine: boolean) => void;
setInputValidationErrors: (errors: any) => void;
setFormValidState: (allIsValid: boolean) => void;
isValidValue: (component: any, value: any) => boolean;
isFormDisabled: () => boolean;
mapModel: (model: IModel) => IModel;
reset: (model?: IModel) => void;
private resetInternal;
private resetModel;
runValidation: <V>(component: InputComponent<V>, value?: V) => {
isRequired: boolean;
isValid: boolean;
validationError: ValidationError[];
};
attachToForm: (component: any) => void;
detachFromForm: <V>(component: InputComponent<V>) => void;
isChanged: () => boolean;
submit: (event?: React.SyntheticEvent) => void;
updateInputsWithError: IUpdateInputsWithError;
updateInputsWithValue: IUpdateInputsWithValue<any>;
validate: <V>(component: InputComponent<V>) => void;
validateForm: () => void;
render(): React.FunctionComponentElement<React.ProviderProps<FormsyContextInterface>>;
}
export {};
import PropTypes from 'prop-types';
import React from 'react';
import { FormsyContextInterface, IModel, InputComponent, IResetModel, IUpdateInputsWithError, IUpdateInputsWithValue, ValidationError } from './interfaces';
import { PassDownProps } from './withFormsy';
declare type FormHTMLAttributesCleaned = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onChange' | 'onSubmit'>;
declare type OnSubmitCallback = (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError, event: React.SyntheticEvent<React.FormHTMLAttributes<any>>) => void;
declare type FormElementType = string | React.ComponentType<{
onReset?: (e: React.SyntheticEvent) => void;
onSubmit?: (e: React.SyntheticEvent) => void;
disabled?: boolean;
children?: React.ReactChildren;
}>;
export interface FormsyProps extends FormHTMLAttributesCleaned {
disabled: boolean;
mapping: null | ((model: IModel) => IModel);
onChange: (model: IModel, isChanged: boolean) => void;
onInvalid: () => void;
onReset?: () => void;
onSubmit?: OnSubmitCallback;
onValidSubmit?: OnSubmitCallback;
onInvalidSubmit: OnSubmitCallback;
onValid: () => void;
preventDefaultSubmit?: boolean;
preventExternalInvalidation?: boolean;
validationErrors?: null | object;
formElement?: FormElementType;
}
export interface FormsyState {
canChange: boolean;
contextValue: FormsyContextInterface;
formSubmitted?: boolean;
isPristine?: boolean;
isSubmitting: boolean;
isValid: boolean;
}
export declare class Formsy extends React.Component<FormsyProps, FormsyState> {
inputs: InstanceType<any & PassDownProps<any>>[];
emptyArray: any[];
prevInputNames: any[] | null;
static displayName: string;
static propTypes: {
disabled: PropTypes.Requireable<boolean>;
mapping: PropTypes.Requireable<(...args: any[]) => any>;
formElement: PropTypes.Requireable<string | object>;
onChange: PropTypes.Requireable<(...args: any[]) => any>;
onInvalid: PropTypes.Requireable<(...args: any[]) => any>;
onInvalidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
onReset: PropTypes.Requireable<(...args: any[]) => any>;
onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
onValid: PropTypes.Requireable<(...args: any[]) => any>;
onValidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
preventDefaultSubmit: PropTypes.Requireable<boolean>;
preventExternalInvalidation: PropTypes.Requireable<boolean>;
validationErrors: PropTypes.Requireable<object>;
};
static defaultProps: Partial<FormsyProps>;
private readonly throttledValidateForm;
constructor(props: FormsyProps);
componentDidMount: () => void;
componentDidUpdate: (prevProps: FormsyProps) => void;
getCurrentValues: () => any;
getModel: () => any;
getPristineValues: () => any;
setFormPristine: (isPristine: boolean) => void;
setInputValidationErrors: (errors: any) => void;
setFormValidState: (allIsValid: boolean) => void;
isValidValue: (component: any, value: any) => boolean;
isFormDisabled: () => boolean;
mapModel: (model: IModel) => IModel;
reset: (model?: IModel) => void;
private resetInternal;
private resetModel;
runValidation: <V>(component: InputComponent<V>, value?: V) => {
isRequired: boolean;
isValid: boolean;
validationError: ValidationError[];
};
attachToForm: (component: any) => void;
detachFromForm: <V>(component: InputComponent<V>) => void;
isChanged: () => boolean;
submit: (event?: React.SyntheticEvent) => void;
updateInputsWithError: IUpdateInputsWithError;
updateInputsWithValue: IUpdateInputsWithValue<any>;
validate: <V>(component: InputComponent<V>) => void;
validateForm: () => void;
render(): React.FunctionComponentElement<React.ProviderProps<FormsyContextInterface>>;
}
export {};
8 changes: 4 additions & 4 deletions dist/FormsyContext.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import { FormsyContextInterface } from './interfaces';
declare const _default: React.Context<FormsyContextInterface>;
export default _default;
import React from 'react';
import { FormsyContextInterface } from './interfaces';
declare const _default: React.Context<FormsyContextInterface>;
export default _default;
12 changes: 8 additions & 4 deletions dist/formsy-react.cjs.development.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/formsy-react.cjs.development.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 880ab7a

Please sign in to comment.