@levshitsvv/formsy-react
Advanced tools
Comparing version 3.0.0 to 3.0.1
import * as React from "react"; | ||
import { HTMLProps } from "react"; | ||
import { CSSProperties } from "react"; | ||
interface IFormProps { | ||
@@ -18,2 +18,4 @@ children: React.ReactNode; | ||
tag?: string; | ||
className?: string; | ||
style?: CSSProperties | undefined; | ||
} | ||
@@ -34,3 +36,3 @@ export interface IFormState { | ||
export declare const FormContext: React.Context<IFormContextModel>; | ||
export declare class Formsy extends React.Component<IFormProps & HTMLProps<any>, IFormState> { | ||
export declare class Formsy extends React.Component<IFormProps, IFormState> { | ||
private inputs; | ||
@@ -74,3 +76,3 @@ private prevInputNames; | ||
isChanged: () => boolean; | ||
submit: (event?: any) => Promise<void>; | ||
submit: (event?: any) => void; | ||
updateInputsWithError: (errors: any) => void; | ||
@@ -77,0 +79,0 @@ validate: (component: any) => any; |
@@ -236,13 +236,10 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.setFormPristine(false); | ||
return _this.validateForm() | ||
.then(function () { | ||
var model = _this.getModel(); | ||
_this.props.onSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
if (_this.state.isValid) { | ||
_this.props.onValidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} | ||
else { | ||
_this.props.onInvalidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} | ||
}); | ||
var model = _this.getModel(); | ||
_this.props.onSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
if (_this.state.isValid) { | ||
_this.props.onValidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} | ||
else { | ||
_this.props.onInvalidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} | ||
}; | ||
@@ -377,2 +374,1 @@ _this.updateInputsWithError = function (errors) { | ||
export var defaultProps = Formsy.defaultProps; | ||
//# sourceMappingURL=Form.js.map |
@@ -7,2 +7,1 @@ import { utils } from "./utils"; | ||
export default Formsy; | ||
//# sourceMappingURL=index.js.map |
@@ -151,2 +151,1 @@ import hash from 'hash-sum'; | ||
}; | ||
//# sourceMappingURL=utils.js.map |
@@ -74,2 +74,1 @@ var isExisty = function (value) { return value !== null && value !== undefined; }; | ||
}; | ||
//# sourceMappingURL=validationRules.js.map |
@@ -154,2 +154,1 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
//# sourceMappingURL=Wrapper.js.map |
{ | ||
"name": "@levshitsvv/formsy-react", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A form input builder and validator for React", | ||
@@ -36,4 +36,3 @@ "keywords": [ | ||
"form-data-to-object": "^0.2.0", | ||
"hash-sum": "^2.0.0", | ||
"user": "^0.0.0" | ||
"hash-sum": "^2.0.0" | ||
}, | ||
@@ -69,4 +68,4 @@ "devDependencies": { | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@types/react": "^17.0.1", | ||
"@types/react-dom": "^17.0.1", | ||
"@types/react": "^18.0.26", | ||
"@types/react-dom": "^18.0.10", | ||
"babel-loader": "^9.1.0", | ||
@@ -80,5 +79,5 @@ "del": "^7.0.0", | ||
"peerDependencies": { | ||
"react": "^15.6.1 || ^16.0.0 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^15.6.1 || ^16.0.0 || ^17.0.0 || ^18.0.0" | ||
"react": "^17.0.0 || ^18.0.0", | ||
"react-dom": "^17.0.0 || ^18.0.0" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4
0
47532
11
972
- Removeduser@^0.0.0
- Removeduser@0.0.0(transitive)