Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formsy-react

Package Overview
Dependencies
Maintainers
9
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formsy-react - npm Package Compare versions

Comparing version 2.0.0-beta.8 to 2.0.0

14

CHANGELOG.md

@@ -7,2 +7,16 @@ ### Changelog

#### [v2.0.0-beta.8](https://github.com/formsy/formsy-react/compare/v2.0.0-beta.7...v2.0.0-beta.8)
> 30 January 2020
- Edit types to parameterize value. Edit validations rules to apply to specific types [`#341`](https://github.com/formsy/formsy-react/pull/341)
- Rewrite isSame to not use circular imports, remove arraysDiffer, objectsDiffer, find [`#362`](https://github.com/formsy/formsy-react/pull/362)
- Dependabot Automatic Library Bumps [`#363`](https://github.com/formsy/formsy-react/pull/363)
- Edit validation function type to add string type (for error message) [`#339`](https://github.com/formsy/formsy-react/pull/339)
- Add cloneIfObject utility to reduce code duplication [`#337`](https://github.com/formsy/formsy-react/pull/337)
- Dependabot Automatic Library Bumps [`#338`](https://github.com/formsy/formsy-react/pull/338)
- bug-fix: Improve performance, prevent redundant exponential data copy [`#317`](https://github.com/formsy/formsy-react/pull/317)
- Fix deprecated lifecycle method usage in tests [`#318`](https://github.com/formsy/formsy-react/pull/318)
- Apply automatic code formatting [`9952dfe`](https://github.com/formsy/formsy-react/commit/9952dfe04eb0cdc749d7ef033fc53b73be08dd1c)
#### [v2.0.0-beta.7](https://github.com/formsy/formsy-react/compare/v2.0.0-beta.6...v2.0.0-beta.7)

@@ -9,0 +23,0 @@

4

dist/index.d.ts

@@ -5,3 +5,3 @@ import React from 'react';

import Wrapper, { propTypes } from './Wrapper';
import { IModel, InputComponent, IResetModel, ISetInputValue, IUpdateInputsWithError, ValidationFunction } from './interfaces';
import { IModel, InputComponent, IResetModel, IUpdateInputsWithValue, IUpdateInputsWithError, ValidationFunction } from './interfaces';
declare type FormHTMLAttributesCleaned = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onChange' | 'onSubmit'>;

@@ -105,3 +105,2 @@ export interface FormsyProps extends FormHTMLAttributesCleaned {

resetModel: IResetModel;
setValue: ISetInputValue<any>;
runValidation: <V>(component: InputComponent<V>, value?: V) => {

@@ -117,2 +116,3 @@ isRequired: boolean;

updateInputsWithError: IUpdateInputsWithError;
updateInputsWithValue: IUpdateInputsWithValue<any>;
validate: <V>(component: InputComponent<V>) => void;

@@ -119,0 +119,0 @@ validateForm: () => void;

@@ -9,3 +9,3 @@ import React, { ComponentClass } from 'react';

export declare type IResetModel = (model?: IModel) => void;
export declare type ISetInputValue<V> = (name: string, value: V, validate?: boolean) => void;
export declare type IUpdateInputsWithValue<V> = (values: any, validate?: boolean) => void;
export declare type IUpdateInputsWithError = (errors: any, invalidate?: boolean) => void;

@@ -12,0 +12,0 @@ export declare type ValidationFunction<V> = (values: Values, value: V, extra?: any) => boolean | string;

{
"name": "formsy-react",
"version": "2.0.0-beta.8",
"version": "2.0.0",
"description": "A form input builder and validator for React",

@@ -24,2 +24,7 @@ "keywords": [

"jest": {
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.tsx",
"src/**/*.ts"
],
"transform": {

@@ -61,2 +66,3 @@ "^.+\\.(js|jsx|ts|tsx)$": "babel-jest"

"dependencies": {
"coveralls": "^3.0.9",
"form-data-to-object": "^0.2.0",

@@ -63,0 +69,0 @@ "prop-types": "^15.7.2"

@@ -5,2 +5,3 @@ # formsy-react

[![Build status](https://travis-ci.org/formsy/formsy-react.svg?branch=master)](https://travis-ci.org/formsy/formsy-react)
[![Coverage Status](https://coveralls.io/repos/github/formsy/formsy-react/badge.svg?branch=master)](https://coveralls.io/github/formsy/formsy-react?branch=master)
[![Gzipped size](http://img.badgesize.io/https://unpkg.com/formsy-react?compression=gzip)](https://unpkg.com/formsy-react)

@@ -11,4 +12,4 @@ [![Gitter](https://badges.gitter.im/formsy/Lobby.svg)](https://gitter.im/formsy/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

| [Quick Start](#quick-start) | [API](/API.md) |
| --------------------------- | -------------- |
| [Quick Start](#quick-start) | [API](/API.md) | [1.x API](https://github.com/formsy/formsy-react/blob/v1.x/API.md) |
| --------------------------- | -------------- | ------------------------------------------------------------------ |

@@ -41,14 +42,7 @@

## Join the 2.x beta
## 1.x to 2.x Upgrade Guide
The 2.0 release is currently in active development on master, but not yet released publicly. The API docs are still
written for the 1.x branch and will remain that way until release. However, the API changes are minor and listed below.
If you'd like to upgrade to formsy 2.x you can run:
The 2.0 release fixed a number of legacy decisions in the Formsy API, mostly a reliance on function props over value
props passed down to wrapped components. However, the API changes are minor and listed below.
```
yarn upgrade formsy-react@2.0.0-beta.3
```
**Element prop breaking changes:**
- `getErrorMessage()` => `errorMessage`

@@ -90,8 +84,8 @@ - `getErrorMessages()` => `errorMessages`

render() {
// An error message is returned only if the component is invalid
const errorMessage = this.props.getErrorMessage();
// An error message is passed only if the component is invalid
const errorMessage = this.props.errorMessage;
return (
<div>
<input onChange={this.changeValue} type="text" value={this.props.getValue() || ''} />
<input onChange={this.changeValue} type="text" value={this.props.value || ''} />
<span>{errorMessage}</span>

@@ -160,5 +154,5 @@ </div>

- https://github.com/twisty/formsy-react-components, Bootstrap 3 compatible form fields
- https://github.com/zabute/formsy-semantic-ui-react, Semantic UI form fields
- https://github.com/gogoair/react-formsy-combo-select, wrapper for https://github.com/gogoair/react-combo-select
- https://github.com/rojobuffalo/formsy-material-ui, Material-UI form fields (out of date, for formsy-react 0.x)
- https://github.com/zabute/formsy-semantic-ui-react, Semantic UI form fields (out of date, for formsy-react 1.x)
- https://github.com/gogoair/react-formsy-combo-select, wrapper for https://github.com/gogoair/react-combo-select (out
of date, for formsy-react 1.x)

@@ -175,3 +169,4 @@ ## Contribute

[Check out releases](https://github.com/formsy/formsy-react/releases)
Check out our [Changelog](https://github.com/formsy/formsy-react/blob/master/CHANGELOG.md) and
[releases](https://github.com/formsy/formsy-react/releases)

@@ -178,0 +173,0 @@ ## License

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc