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

@doctolib/react-form

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doctolib/react-form - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

lib/formsy-react/Decorator.js

2

lib/addValidationRule.js

@@ -5,3 +5,3 @@ 'use strict';

var _formsyReact = require('formsy-react');
var _formsyReact = require('./formsy-react');

@@ -8,0 +8,0 @@ var _formsyReact2 = _interopRequireDefault(_formsyReact);

@@ -11,2 +11,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

@@ -16,2 +24,6 @@

var _formsyReact = require('./formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
var _ControlWrapper = require('./ControlWrapper');

@@ -25,6 +37,2 @@

var _formsyReact = require('formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -34,10 +42,10 @@

exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'CheckboxGroup',
propTypes: {
className: _react.PropTypes.string,
onChange: _react.PropTypes.func,
options: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.array, _react2.default.PropTypes.object]),
value: _react.PropTypes.arrayOf(_react.PropTypes.string)
className: _propTypes2.default.string,
onChange: _propTypes2.default.func,
options: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object]),
value: _propTypes2.default.arrayOf(_propTypes2.default.string)
},

@@ -68,3 +76,2 @@

*/
renderCheckbox: function renderCheckbox(entry, index) {

@@ -85,6 +92,3 @@ var className = this.props.className;

'label',
{
className: 'checkbox-inline',
key: index
},
{ className: 'checkbox-inline', key: index },
_react2.default.createElement('input', props),

@@ -91,0 +95,0 @@ entry.label

@@ -5,4 +5,8 @@ 'use strict';

var _react = require('react');
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

@@ -12,10 +16,10 @@

propTypes: {
className: _react.PropTypes.string,
id: _react.PropTypes.string,
label: _react.PropTypes.string,
name: _react.PropTypes.string,
onChange: _react.PropTypes.func,
required: _react.PropTypes.bool,
value: _react.PropTypes.string,
wrapperClassName: _react.PropTypes.string
className: _propTypes2.default.string,
id: _propTypes2.default.string,
label: _propTypes2.default.string,
name: _propTypes2.default.string,
onChange: _propTypes2.default.func,
required: _propTypes2.default.bool,
value: _propTypes2.default.string,
wrapperClassName: _propTypes2.default.string
},

@@ -64,3 +68,3 @@

for (var i = 0; i < string.length; i++) {
hash = (hash << 5) - hash + string.charCodeAt(i) & 0xFFFFFFFF;
hash = (hash << 5) - hash + string.charCodeAt(i) & 0xffffffff;
}

@@ -73,15 +77,14 @@ return hash;

getId: function getId() {
var _props = this.props;
var leftAddon = _props.leftAddon;
var rightAddon = _props.rightAddon;
var _props = this.props,
leftAddon = _props.leftAddon,
rightAddon = _props.rightAddon,
hashProps = _objectWithoutProperties(_props, ['leftAddon', 'rightAddon']);
var hashProps = _objectWithoutProperties(_props, ['leftAddon', 'rightAddon']);
return this.props.id || this.props.name.split('[').join('_').replace(']', '') + this.hashString(JSON.stringify(hashProps));
},
getControlProps: function getControlProps() {
var _props2 = this.props;
var className = _props2.className;
var name = _props2.name;
var disabled = _props2.disabled;
var _props2 = this.props,
className = _props2.className,
name = _props2.name,
disabled = _props2.disabled;

@@ -92,5 +95,5 @@ var value = this.getValue();

getWrapperProps: function getWrapperProps() {
var _props3 = this.props;
var label = _props3.label;
var wrapperClassName = _props3.wrapperClassName;
var _props3 = this.props,
label = _props3.label,
wrapperClassName = _props3.wrapperClassName;

@@ -97,0 +100,0 @@ var hasError = !this.isValid() && !this.isPristine();

@@ -9,2 +9,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _Col = require('react-bootstrap/lib/Col');

@@ -24,12 +32,12 @@

exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'ControlWrapper',
propTypes: {
hasAddon: _react.PropTypes.bool,
children: _react.PropTypes.node.isRequired,
className: _react.PropTypes.string,
componentId: _react.PropTypes.string,
hasError: _react.PropTypes.bool.isRequired,
label: _react.PropTypes.string
hasAddon: _propTypes2.default.bool,
children: _propTypes2.default.node.isRequired,
className: _propTypes2.default.string,
componentId: _propTypes2.default.string,
hasError: _propTypes2.default.bool.isRequired,
label: _propTypes2.default.string
},

@@ -40,6 +48,6 @@

render: function render() {
var _props = this.props;
var componentId = _props.componentId;
var label = _props.label;
var children = _props.children;
var _props = this.props,
componentId = _props.componentId,
label = _props.label,
children = _props.children;

@@ -61,8 +69,3 @@ var className = (0, _classnames2.default)({

_Col2.default,
{
className: 'control-label',
componentClass: 'label',
htmlFor: componentId,
sm: 3
},
{ className: 'control-label', componentClass: 'label', htmlFor: componentId, sm: 3 },
label

@@ -69,0 +72,0 @@ ),

@@ -5,3 +5,3 @@ 'use strict';

var _formsyReact = require('formsy-react');
var _formsyReact = require('./formsy-react');

@@ -8,0 +8,0 @@ var _formsyReact2 = _interopRequireDefault(_formsyReact);

@@ -9,4 +9,8 @@ 'use strict';

var _formsyReact = require('formsy-react');
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _formsyReact = require('./formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);

@@ -16,4 +20,4 @@

module.exports = function (Component) {
return _react2.default.createClass({
module.exports = function hoc(Component) {
return (0, _createReactClass2.default)({
mixins: [_formsyReact2.default.Mixin],

@@ -20,0 +24,0 @@ render: function render() {

@@ -11,2 +11,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

@@ -16,2 +24,6 @@

var _formsyReact = require('./formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
var _ControlWrapper = require('./ControlWrapper');

@@ -25,21 +37,17 @@

var _formsyReact = require('formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'Input',
propTypes: {
autoCorrect: _react.PropTypes.string,
autoComplete: _react.PropTypes.string,
autoCapitalize: _react.PropTypes.string,
autoFocus: _react.PropTypes.bool,
maxLength: _react.PropTypes.number,
placeholder: _react.PropTypes.string,
leftAddon: _react.PropTypes.node,
rightAddon: _react.PropTypes.node,
type: _react.PropTypes.string
autoCorrect: _propTypes2.default.string,
autoComplete: _propTypes2.default.string,
autoCapitalize: _propTypes2.default.string,
autoFocus: _propTypes2.default.bool,
maxLength: _propTypes2.default.number,
placeholder: _propTypes2.default.string,
leftAddon: _propTypes2.default.node,
rightAddon: _propTypes2.default.node,
type: _propTypes2.default.string
},

@@ -66,17 +74,23 @@

render: function render() {
var _props = this.props;
var autoCapitalize = _props.autoCapitalize;
var autoCorrect = _props.autoCorrect;
var autoComplete = _props.autoComplete;
var autoFocus = _props.autoFocus;
var maxLength = _props.maxLength;
var placeholder = _props.placeholder;
var type = _props.type;
var leftAddon = _props.leftAddon;
var rightAddon = _props.rightAddon;
var _props = this.props,
autoCapitalize = _props.autoCapitalize,
autoCorrect = _props.autoCorrect,
autoComplete = _props.autoComplete,
autoFocus = _props.autoFocus,
maxLength = _props.maxLength,
placeholder = _props.placeholder,
type = _props.type,
leftAddon = _props.leftAddon,
rightAddon = _props.rightAddon;
var onChange = this.onChange;
var controlProps = _extends({}, this.getControlProps(), {
autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, autoComplete: autoComplete, autoFocus: autoFocus,
maxLength: maxLength, placeholder: placeholder, onChange: onChange, type: type
autoCapitalize: autoCapitalize,
autoCorrect: autoCorrect,
autoComplete: autoComplete,
autoFocus: autoFocus,
maxLength: maxLength,
placeholder: placeholder,
onChange: onChange,
type: type
});

@@ -83,0 +97,0 @@ var wrapperProps = _extends({}, this.getWrapperProps(), {

@@ -11,2 +11,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

@@ -28,9 +36,9 @@

exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'InputAddon',
propTypes: {
children: _react.PropTypes.node,
control: _react.PropTypes.instanceOf(_Input2.default),
className: _react.PropTypes.string
children: _propTypes2.default.node,
control: _propTypes2.default.instanceOf(_Input2.default),
className: _propTypes2.default.string
},

@@ -41,9 +49,8 @@

render: function render() {
var _props = this.props;
var control = _props.control;
var children = _props.children;
var className = _props.className;
var _props = this.props,
control = _props.control,
children = _props.children,
className = _props.className,
props = _objectWithoutProperties(_props, ['control', 'children', 'className']);
var props = _objectWithoutProperties(_props, ['control', 'children', 'className']);
var spanProps = _extends({}, props, {

@@ -50,0 +57,0 @@ className: (0, _classnames2.default)('input-group-addon', className)

@@ -11,2 +11,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

@@ -16,2 +24,6 @@

var _formsyReact = require('./formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
var _ControlWrapper = require('./ControlWrapper');

@@ -25,16 +37,12 @@

var _formsyReact = require('formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'RadioGroup',
propTypes: {
className: _react.PropTypes.string,
onChange: _react.PropTypes.func,
options: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.array, _react2.default.PropTypes.object]),
value: _react.PropTypes.string
className: _propTypes2.default.string,
onChange: _propTypes2.default.func,
options: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object]),
value: _propTypes2.default.string
},

@@ -81,6 +89,3 @@

'label',
{
className: 'radio-inline',
key: index
},
{ className: 'radio-inline', key: index },
_react2.default.createElement('input', props),

@@ -87,0 +92,0 @@ entry.label

@@ -11,2 +11,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

@@ -16,2 +24,10 @@

var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _formsyReact = require('./formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
var _ControlWrapper = require('./ControlWrapper');

@@ -25,19 +41,11 @@

var _formsyReact = require('formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'Select',
propTypes: {
onChange: _react.PropTypes.func,
options: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.array, _react2.default.PropTypes.object]),
placeholder: _react.PropTypes.string
onChange: _propTypes2.default.func,
options: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object]),
placeholder: _propTypes2.default.string
},

@@ -44,0 +52,0 @@

@@ -11,2 +11,10 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _createReactClass = require('create-react-class');
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

@@ -16,2 +24,6 @@

var _formsyReact = require('./formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
var _ControlWrapper = require('./ControlWrapper');

@@ -25,15 +37,11 @@

var _formsyReact = require('formsy-react');
var _formsyReact2 = _interopRequireDefault(_formsyReact);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _react2.default.createClass({
exports.default = (0, _createReactClass2.default)({
displayName: 'Textarea',
propTypes: {
maxLength: _react.PropTypes.number,
placeholder: _react.PropTypes.string,
rows: _react.PropTypes.number
maxLength: _propTypes2.default.number,
placeholder: _propTypes2.default.string,
rows: _propTypes2.default.number
},

@@ -53,6 +61,6 @@

render: function render() {
var _props = this.props;
var maxLength = _props.maxLength;
var rows = _props.rows;
var placeholder = _props.placeholder;
var _props = this.props,
maxLength = _props.maxLength,
rows = _props.rows,
placeholder = _props.placeholder;
var onChange = this.onChange;

@@ -59,0 +67,0 @@

{
"name": "@doctolib/react-form",
"version": "3.1.0",
"version": "4.0.0",
"description": "Set of React form components based on react-formsy.",

@@ -10,6 +10,6 @@ "main": "lib/index.js",

"scripts": {
"coveralls": "gulp coveralls",
"travis": "npm run lint && npm run coveralls",
"build": "babel -d lib src",
"travis": "yarn lint",
"lint": "eslint .",
"test": "gulp test"
"format": "prettier --write \"src/**/*.js\""
},

@@ -32,37 +32,31 @@ "repository": {

"devDependencies": {
"@doctolib/gulp-tasks": "^5.0.0",
"babel-eslint": "^6.0.3",
"babel-preset-doctolib": "^2.0.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"chai": "^3.4.0",
"chai-dom": "^1.2.0",
"dirty-chai": "^1.2.2",
"eslint": "^2.8.0",
"eslint-config-doctolib": "^2.0.0",
"eslint-plugin-mocha": "^2.2.0",
"eslint-plugin-react": "^5.0.1",
"eslint-plugin-babel": "^3.3.0",
"gulp": "^3.9.1",
"react": "^15.0.1",
"react-addons-pure-render-mixin": "^15.0.1",
"react-addons-test-utils": "^15.0.1",
"react-bootstrap": "^0.30.2",
"react-dom": "^15.0.1",
"sinon": "^1.17.2",
"sinon-chai": "^2.8.0"
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"prettier": "^1.11.1",
"react": "^16.3.1",
"react-bootstrap": "^0.32.1",
"react-dom": "^16.3.1"
},
"examples": {
"title": "React form"
},
"dependencies": {
"classnames": "^2.2.0",
"formsy-react": "^0.18.0"
"create-react-class": "^15.6.3",
"form-data-to-object": "^0.2.0",
"prop-types": "^15.6.1",
"react-addons-pure-render-mixin": "^15.6.2"
},
"peerDependencies": {
"react": "^15.0.1",
"react-dom": "^15.0.1",
"react-addons-pure-render-mixin": "^15.0.1",
"react-bootstrap": "^0.30.2"
"react": ">=15",
"react-addons-pure-render-mixin": ">=15",
"react-bootstrap": ">=0.30",
"react-dom": ">=15"
}
}
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