Skip to content

Commit 880ab7a

Browse files
committed
v2.2.3
1 parent 5a34c44 commit 880ab7a

15 files changed

+263
-239
lines changed

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
44

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

7-
#### [v2.2.0](https://github.com/formsy/formsy-react/compare/v2.1.0...v2.2.0)
7+
#### [v2.2.1](https://github.com/formsy/formsy-react/compare/v2.2.0...v2.2.1)
8+
9+
> 27 August 2020
10+
11+
#### [v2.2.0](https://github.com/formsy/formsy-react/compare/v2.1.1...v2.2.0)
12+
13+
> 27 August 2020
14+
15+
#### [v2.1.1](https://github.com/formsy/formsy-react/compare/v2.1.0...v2.1.1)
816

917
> 27 August 2020
1018

dist/Formsy.d.ts

+88-80
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,88 @@
1-
import PropTypes from 'prop-types';
2-
import React from 'react';
3-
import { FormsyContextInterface, IModel, InputComponent, IResetModel, IUpdateInputsWithError, IUpdateInputsWithValue, ValidationError } from './interfaces';
4-
import { PassDownProps } from './withFormsy';
5-
declare type FormHTMLAttributesCleaned = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onChange' | 'onSubmit'>;
6-
declare type OnSubmitCallback = (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError, event: React.SyntheticEvent<React.FormHTMLAttributes<any>>) => void;
7-
export interface FormsyProps extends FormHTMLAttributesCleaned {
8-
disabled: boolean;
9-
mapping: null | ((model: IModel) => IModel);
10-
onChange: (model: IModel, isChanged: boolean) => void;
11-
onInvalid: () => void;
12-
onReset?: () => void;
13-
onSubmit?: OnSubmitCallback;
14-
onValidSubmit?: OnSubmitCallback;
15-
onInvalidSubmit: OnSubmitCallback;
16-
onValid: () => void;
17-
preventDefaultSubmit?: boolean;
18-
preventExternalInvalidation?: boolean;
19-
validationErrors?: null | object;
20-
}
21-
export interface FormsyState {
22-
canChange: boolean;
23-
contextValue: FormsyContextInterface;
24-
formSubmitted?: boolean;
25-
isPristine?: boolean;
26-
isSubmitting: boolean;
27-
isValid: boolean;
28-
}
29-
export declare class Formsy extends React.Component<FormsyProps, FormsyState> {
30-
inputs: InstanceType<any & PassDownProps<any>>[];
31-
emptyArray: any[];
32-
prevInputNames: any[] | null;
33-
static displayName: string;
34-
static propTypes: {
35-
disabled: PropTypes.Requireable<boolean>;
36-
mapping: PropTypes.Requireable<(...args: any[]) => any>;
37-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
38-
onInvalid: PropTypes.Requireable<(...args: any[]) => any>;
39-
onInvalidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
40-
onReset: PropTypes.Requireable<(...args: any[]) => any>;
41-
onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
42-
onValid: PropTypes.Requireable<(...args: any[]) => any>;
43-
onValidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
44-
preventDefaultSubmit: PropTypes.Requireable<boolean>;
45-
preventExternalInvalidation: PropTypes.Requireable<boolean>;
46-
validationErrors: PropTypes.Requireable<object>;
47-
};
48-
static defaultProps: Partial<FormsyProps>;
49-
private readonly throttledValidateForm;
50-
constructor(props: FormsyProps);
51-
componentDidMount: () => void;
52-
componentDidUpdate: (prevProps: FormsyProps) => void;
53-
getCurrentValues: () => any;
54-
getModel: () => any;
55-
getPristineValues: () => any;
56-
setFormPristine: (isPristine: boolean) => void;
57-
setInputValidationErrors: (errors: any) => void;
58-
setFormValidState: (allIsValid: boolean) => void;
59-
isValidValue: (component: any, value: any) => boolean;
60-
isFormDisabled: () => boolean;
61-
mapModel: (model: IModel) => IModel;
62-
reset: (model?: IModel) => void;
63-
private resetInternal;
64-
private resetModel;
65-
runValidation: <V>(component: InputComponent<V>, value?: V) => {
66-
isRequired: boolean;
67-
isValid: boolean;
68-
validationError: ValidationError[];
69-
};
70-
attachToForm: (component: any) => void;
71-
detachFromForm: <V>(component: InputComponent<V>) => void;
72-
isChanged: () => boolean;
73-
submit: (event?: React.SyntheticEvent) => void;
74-
updateInputsWithError: IUpdateInputsWithError;
75-
updateInputsWithValue: IUpdateInputsWithValue<any>;
76-
validate: <V>(component: InputComponent<V>) => void;
77-
validateForm: () => void;
78-
render(): React.FunctionComponentElement<React.ProviderProps<FormsyContextInterface>>;
79-
}
80-
export {};
1+
import PropTypes from 'prop-types';
2+
import React from 'react';
3+
import { FormsyContextInterface, IModel, InputComponent, IResetModel, IUpdateInputsWithError, IUpdateInputsWithValue, ValidationError } from './interfaces';
4+
import { PassDownProps } from './withFormsy';
5+
declare type FormHTMLAttributesCleaned = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onChange' | 'onSubmit'>;
6+
declare type OnSubmitCallback = (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError, event: React.SyntheticEvent<React.FormHTMLAttributes<any>>) => void;
7+
declare type FormElementType = string | React.ComponentType<{
8+
onReset?: (e: React.SyntheticEvent) => void;
9+
onSubmit?: (e: React.SyntheticEvent) => void;
10+
disabled?: boolean;
11+
children?: React.ReactChildren;
12+
}>;
13+
export interface FormsyProps extends FormHTMLAttributesCleaned {
14+
disabled: boolean;
15+
mapping: null | ((model: IModel) => IModel);
16+
onChange: (model: IModel, isChanged: boolean) => void;
17+
onInvalid: () => void;
18+
onReset?: () => void;
19+
onSubmit?: OnSubmitCallback;
20+
onValidSubmit?: OnSubmitCallback;
21+
onInvalidSubmit: OnSubmitCallback;
22+
onValid: () => void;
23+
preventDefaultSubmit?: boolean;
24+
preventExternalInvalidation?: boolean;
25+
validationErrors?: null | object;
26+
formElement?: FormElementType;
27+
}
28+
export interface FormsyState {
29+
canChange: boolean;
30+
contextValue: FormsyContextInterface;
31+
formSubmitted?: boolean;
32+
isPristine?: boolean;
33+
isSubmitting: boolean;
34+
isValid: boolean;
35+
}
36+
export declare class Formsy extends React.Component<FormsyProps, FormsyState> {
37+
inputs: InstanceType<any & PassDownProps<any>>[];
38+
emptyArray: any[];
39+
prevInputNames: any[] | null;
40+
static displayName: string;
41+
static propTypes: {
42+
disabled: PropTypes.Requireable<boolean>;
43+
mapping: PropTypes.Requireable<(...args: any[]) => any>;
44+
formElement: PropTypes.Requireable<string | object>;
45+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
46+
onInvalid: PropTypes.Requireable<(...args: any[]) => any>;
47+
onInvalidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
48+
onReset: PropTypes.Requireable<(...args: any[]) => any>;
49+
onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
50+
onValid: PropTypes.Requireable<(...args: any[]) => any>;
51+
onValidSubmit: PropTypes.Requireable<(...args: any[]) => any>;
52+
preventDefaultSubmit: PropTypes.Requireable<boolean>;
53+
preventExternalInvalidation: PropTypes.Requireable<boolean>;
54+
validationErrors: PropTypes.Requireable<object>;
55+
};
56+
static defaultProps: Partial<FormsyProps>;
57+
private readonly throttledValidateForm;
58+
constructor(props: FormsyProps);
59+
componentDidMount: () => void;
60+
componentDidUpdate: (prevProps: FormsyProps) => void;
61+
getCurrentValues: () => any;
62+
getModel: () => any;
63+
getPristineValues: () => any;
64+
setFormPristine: (isPristine: boolean) => void;
65+
setInputValidationErrors: (errors: any) => void;
66+
setFormValidState: (allIsValid: boolean) => void;
67+
isValidValue: (component: any, value: any) => boolean;
68+
isFormDisabled: () => boolean;
69+
mapModel: (model: IModel) => IModel;
70+
reset: (model?: IModel) => void;
71+
private resetInternal;
72+
private resetModel;
73+
runValidation: <V>(component: InputComponent<V>, value?: V) => {
74+
isRequired: boolean;
75+
isValid: boolean;
76+
validationError: ValidationError[];
77+
};
78+
attachToForm: (component: any) => void;
79+
detachFromForm: <V>(component: InputComponent<V>) => void;
80+
isChanged: () => boolean;
81+
submit: (event?: React.SyntheticEvent) => void;
82+
updateInputsWithError: IUpdateInputsWithError;
83+
updateInputsWithValue: IUpdateInputsWithValue<any>;
84+
validate: <V>(component: InputComponent<V>) => void;
85+
validateForm: () => void;
86+
render(): React.FunctionComponentElement<React.ProviderProps<FormsyContextInterface>>;
87+
}
88+
export {};

dist/FormsyContext.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
2-
import { FormsyContextInterface } from './interfaces';
3-
declare const _default: React.Context<FormsyContextInterface>;
4-
export default _default;
1+
import React from 'react';
2+
import { FormsyContextInterface } from './interfaces';
3+
declare const _default: React.Context<FormsyContextInterface>;
4+
export default _default;

dist/formsy-react.cjs.development.js

+8-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/formsy-react.cjs.development.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)