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

rc-form

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-form - npm Package Compare versions

Comparing version 1.4.8 to 1.5.0

25

es/createBaseForm.js

@@ -20,3 +20,6 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';

var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var mapPropsToFields = option.mapPropsToFields,
var validateMessages = option.validateMessages,
_option$mapProps = option.mapProps,
mapProps = _option$mapProps === undefined ? mirror : _option$mapProps,
mapPropsToFields = option.mapPropsToFields,
onFieldsChange = option.onFieldsChange,

@@ -26,5 +29,3 @@ onValuesChange = option.onValuesChange,

fieldMetaProp = option.fieldMetaProp,
validateMessages = option.validateMessages,
_option$mapProps = option.mapProps,
mapProps = _option$mapProps === undefined ? mirror : _option$mapProps,
fieldDataProp = option.fieldDataProp,
_option$formPropName = option.formPropName,

@@ -224,2 +225,6 @@ formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName,

if (fieldDataProp) {
inputProps[fieldDataProp] = this.fieldsStore.getField(name);
}
return inputProps;

@@ -460,8 +465,2 @@ },

var formProps = _defineProperty({}, formPropName, this.getForm());
function innerestWrappedComponentRef() {
if (wrappedComponentRef && !innerestWrappedComponentRef.called) {
wrappedComponentRef.apply(undefined, arguments);
innerestWrappedComponentRef.called = true;
}
}
if (withRef) {

@@ -471,7 +470,5 @@ warning(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');

} else if (wrappedComponentRef) {
formProps.ref = innerestWrappedComponentRef;
formProps.ref = wrappedComponentRef;
}
var props = mapProps.call(this, _extends({}, formProps, restProps, {
wrappedComponentRef: innerestWrappedComponentRef
}));
var props = mapProps.call(this, _extends({}, formProps, restProps));
return React.createElement(WrappedComponent, props);

@@ -478,0 +475,0 @@ }

@@ -64,3 +64,6 @@ 'use strict';

var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var mapPropsToFields = option.mapPropsToFields,
var validateMessages = option.validateMessages,
_option$mapProps = option.mapProps,
mapProps = _option$mapProps === undefined ? _utils.mirror : _option$mapProps,
mapPropsToFields = option.mapPropsToFields,
onFieldsChange = option.onFieldsChange,

@@ -70,5 +73,3 @@ onValuesChange = option.onValuesChange,

fieldMetaProp = option.fieldMetaProp,
validateMessages = option.validateMessages,
_option$mapProps = option.mapProps,
mapProps = _option$mapProps === undefined ? _utils.mirror : _option$mapProps,
fieldDataProp = option.fieldDataProp,
_option$formPropName = option.formPropName,

@@ -268,2 +269,6 @@ formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName,

if (fieldDataProp) {
inputProps[fieldDataProp] = this.fieldsStore.getField(name);
}
return inputProps;

@@ -504,8 +509,2 @@ },

var formProps = (0, _defineProperty3['default'])({}, formPropName, this.getForm());
function innerestWrappedComponentRef() {
if (wrappedComponentRef && !innerestWrappedComponentRef.called) {
wrappedComponentRef.apply(undefined, arguments);
innerestWrappedComponentRef.called = true;
}
}
if (withRef) {

@@ -515,7 +514,5 @@ (0, _warning2['default'])(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');

} else if (wrappedComponentRef) {
formProps.ref = innerestWrappedComponentRef;
formProps.ref = wrappedComponentRef;
}
var props = mapProps.call(this, (0, _extends3['default'])({}, formProps, restProps, {
wrappedComponentRef: innerestWrappedComponentRef
}));
var props = mapProps.call(this, (0, _extends3['default'])({}, formProps, restProps));
return _react2['default'].createElement(WrappedComponent, props);

@@ -522,0 +519,0 @@ }

{
"name": "rc-form",
"version": "1.4.8",
"version": "1.5.0",
"description": "React High Order Form Component",

@@ -5,0 +5,0 @@ "keywords": [

@@ -117,6 +117,9 @@ # rc-form

| formOption.validateMessages | Preseted messages of [async-validator](https://github.com/yiminghe/async-validator) | Object | {} |
| formOption.mapProps | Get new props transfered to WrappedComponent. | (props): Object | props => props |
| formOption.onFieldsChange | Called when field changed, you can dispatch fields to redux store. | (props, changedFields): void | NOOP |
| formOption.onValuesChange | Called when value changed. | (props, changedValues): void | NOOP |
| formOption.mapProps | Get new props transfered to WrappedComponent. | (props): Object | props => props |
| formOption.mapPropsToFields | Convert value from props to fields. Used for read fields from redux store. | (props): Object | NOOP |
| formOption.fieldNameProp | Where to store the `name` argument of `getFieldProps`. | String | - |
| formOption.fieldMetaProp | Where to store the meta data of `getFieldProps`. | String | - |
| formOption.fieldDataProp | Where to store the field data | String | - |
| formOption.withRef(deprecated) | Maintain an ref for wrapped component instance, use `refs.wrappedComponent` to access. | boolean | false |

@@ -175,4 +178,2 @@

| option.validateFirst | Whether stop validate on first rule of error for this field. | boolean | false |
| option.fieldNameProp | Where to store the `name` argument of `getFieldProps`. | String | - |
| option.fieldMetaProp | Where to store the meta data of `getFieldProps`. | String | - |
| option.validate | | Object[] | - |

@@ -179,0 +180,0 @@ | option.validate[n].trigger | Event which is listened to validate. Set to falsy to only validate when call props.validateFields. | String|String[] | 'onChange' |

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

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