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

react-jsonschema-form

Package Overview
Dependencies
Maintainers
6
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jsonschema-form - npm Package Compare versions

Comparing version 0.47.0 to 0.48.0

44

lib/components/fields/ArrayField.js

@@ -15,2 +15,6 @@ "use strict";

var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _utils = require("../../utils");

@@ -652,24 +656,24 @@

ArrayField.propTypes = {
schema: _react.PropTypes.object.isRequired,
uiSchema: _react.PropTypes.shape({
"ui:options": _react.PropTypes.shape({
addable: _react.PropTypes.bool,
orderable: _react.PropTypes.bool,
removable: _react.PropTypes.bool
schema: _propTypes2.default.object.isRequired,
uiSchema: _propTypes2.default.shape({
"ui:options": _propTypes2.default.shape({
addable: _propTypes2.default.bool,
orderable: _propTypes2.default.bool,
removable: _propTypes2.default.bool
})
}),
idSchema: _react.PropTypes.object,
errorSchema: _react.PropTypes.object,
onChange: _react.PropTypes.func.isRequired,
onBlur: _react.PropTypes.func,
formData: _react.PropTypes.array,
required: _react.PropTypes.bool,
disabled: _react.PropTypes.bool,
readonly: _react.PropTypes.bool,
autofocus: _react.PropTypes.bool,
registry: _react.PropTypes.shape({
widgets: _react.PropTypes.objectOf(_react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.object])).isRequired,
fields: _react.PropTypes.objectOf(_react.PropTypes.func).isRequired,
definitions: _react.PropTypes.object.isRequired,
formContext: _react.PropTypes.object.isRequired
idSchema: _propTypes2.default.object,
errorSchema: _propTypes2.default.object,
onChange: _propTypes2.default.func.isRequired,
onBlur: _propTypes2.default.func,
formData: _propTypes2.default.array,
required: _propTypes2.default.bool,
disabled: _propTypes2.default.bool,
readonly: _propTypes2.default.bool,
autofocus: _propTypes2.default.bool,
registry: _propTypes2.default.shape({
widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])).isRequired,
fields: _propTypes2.default.objectOf(_propTypes2.default.func).isRequired,
definitions: _propTypes2.default.object.isRequired,
formContext: _propTypes2.default.object.isRequired
})

@@ -676,0 +680,0 @@ };

@@ -15,2 +15,6 @@ "use strict";

var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _utils = require("../../utils");

@@ -161,16 +165,16 @@

ObjectField.propTypes = {
schema: _react.PropTypes.object.isRequired,
uiSchema: _react.PropTypes.object,
errorSchema: _react.PropTypes.object,
idSchema: _react.PropTypes.object,
onChange: _react.PropTypes.func.isRequired,
formData: _react.PropTypes.object,
required: _react.PropTypes.bool,
disabled: _react.PropTypes.bool,
readonly: _react.PropTypes.bool,
registry: _react.PropTypes.shape({
widgets: _react.PropTypes.objectOf(_react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.object])).isRequired,
fields: _react.PropTypes.objectOf(_react.PropTypes.func).isRequired,
definitions: _react.PropTypes.object.isRequired,
formContext: _react.PropTypes.object.isRequired
schema: _propTypes2.default.object.isRequired,
uiSchema: _propTypes2.default.object,
errorSchema: _propTypes2.default.object,
idSchema: _propTypes2.default.object,
onChange: _propTypes2.default.func.isRequired,
formData: _propTypes2.default.object,
required: _propTypes2.default.bool,
disabled: _propTypes2.default.bool,
readonly: _propTypes2.default.bool,
registry: _propTypes2.default.shape({
widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])).isRequired,
fields: _propTypes2.default.objectOf(_propTypes2.default.func).isRequired,
definitions: _propTypes2.default.object.isRequired,
formContext: _propTypes2.default.object.isRequired
})

@@ -177,0 +181,0 @@ };

@@ -15,2 +15,6 @@ "use strict";

var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _ErrorList = require("./ErrorList");

@@ -266,31 +270,31 @@

Form.propTypes = {
schema: _react.PropTypes.object.isRequired,
uiSchema: _react.PropTypes.object,
formData: _react.PropTypes.any,
widgets: _react.PropTypes.objectOf(_react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.object])),
fields: _react.PropTypes.objectOf(_react.PropTypes.func),
ArrayFieldTemplate: _react.PropTypes.func,
FieldTemplate: _react.PropTypes.func,
ErrorList: _react.PropTypes.func,
onChange: _react.PropTypes.func,
onError: _react.PropTypes.func,
showErrorList: _react.PropTypes.bool,
onSubmit: _react.PropTypes.func,
id: _react.PropTypes.string,
className: _react.PropTypes.string,
name: _react.PropTypes.string,
method: _react.PropTypes.string,
target: _react.PropTypes.string,
action: _react.PropTypes.string,
autocomplete: _react.PropTypes.string,
enctype: _react.PropTypes.string,
acceptcharset: _react.PropTypes.string,
noValidate: _react.PropTypes.bool,
noHtml5Validate: _react.PropTypes.bool,
liveValidate: _react.PropTypes.bool,
validate: _react.PropTypes.func,
transformErrors: _react.PropTypes.func,
safeRenderCompletion: _react.PropTypes.bool,
formContext: _react.PropTypes.object
schema: _propTypes2.default.object.isRequired,
uiSchema: _propTypes2.default.object,
formData: _propTypes2.default.any,
widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])),
fields: _propTypes2.default.objectOf(_propTypes2.default.func),
ArrayFieldTemplate: _propTypes2.default.func,
FieldTemplate: _propTypes2.default.func,
ErrorList: _propTypes2.default.func,
onChange: _propTypes2.default.func,
onError: _propTypes2.default.func,
showErrorList: _propTypes2.default.bool,
onSubmit: _propTypes2.default.func,
id: _propTypes2.default.string,
className: _propTypes2.default.string,
name: _propTypes2.default.string,
method: _propTypes2.default.string,
target: _propTypes2.default.string,
action: _propTypes2.default.string,
autocomplete: _propTypes2.default.string,
enctype: _propTypes2.default.string,
acceptcharset: _propTypes2.default.string,
noValidate: _propTypes2.default.bool,
noHtml5Validate: _propTypes2.default.bool,
liveValidate: _propTypes2.default.bool,
validate: _propTypes2.default.func,
transformErrors: _propTypes2.default.func,
safeRenderCompletion: _propTypes2.default.bool,
formContext: _propTypes2.default.object
};
}

@@ -15,2 +15,6 @@ "use strict";

var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _utils = require("../../utils");

@@ -226,12 +230,12 @@

AltDateWidget.propTypes = {
schema: _react.PropTypes.object.isRequired,
id: _react.PropTypes.string.isRequired,
schema: _propTypes2.default.object.isRequired,
id: _propTypes2.default.string.isRequired,
value: _react2.default.PropTypes.string,
required: _react.PropTypes.bool,
disabled: _react.PropTypes.bool,
readonly: _react.PropTypes.bool,
autofocus: _react.PropTypes.bool,
onChange: _react.PropTypes.func,
onBlur: _react.PropTypes.func,
time: _react.PropTypes.bool
required: _propTypes2.default.bool,
disabled: _propTypes2.default.bool,
readonly: _propTypes2.default.bool,
autofocus: _propTypes2.default.bool,
onChange: _propTypes2.default.func,
onBlur: _propTypes2.default.func,
time: _propTypes2.default.bool
};

@@ -238,0 +242,0 @@ }

@@ -13,2 +13,6 @@ "use strict";

var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _utils = require("../../utils");

@@ -191,5 +195,5 @@

FileWidget.propTypes = {
multiple: _react.PropTypes.bool,
value: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.arrayOf(_react.PropTypes.string)]),
autofocus: _react.PropTypes.bool
multiple: _propTypes2.default.bool,
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),
autofocus: _propTypes2.default.bool
};

@@ -196,0 +200,0 @@ }

@@ -361,6 +361,40 @@ "use strict";

// Extract and use the referenced definition if we have it.
var match = /#\/definitions\/(.*)$/.exec($ref);
if (match && match[1] && definitions.hasOwnProperty(match[1])) {
return definitions[match[1]];
var match = /^#\/definitions\/(.*)$/.exec($ref);
if (match && match[1]) {
var parts = match[1].split("/");
var current = definitions;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var part = _step.value;
part = part.replace(/~1/g, "/").replace(/~0/g, "~");
if (current.hasOwnProperty(part)) {
current = current[part];
} else {
// No matching definition found, that's an error (bogus schema?)
throw new Error("Could not find a definition for " + $ref + ".");
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return current;
}
// No matching definition found, that's an error (bogus schema?)

@@ -367,0 +401,0 @@ throw new Error("Could not find a definition for " + $ref + ".");

{
"name": "react-jsonschema-form",
"version": "0.47.0",
"version": "0.48.0",
"description": "A simple React component capable of building HTML forms out of a JSON schema.",

@@ -75,3 +75,3 @@ "scripts": {

"mocha": "^2.5.3",
"prettier": "^1.0.0",
"prettier": "^1.2.2",
"prettier-check": "^1.0.0",

@@ -78,0 +78,0 @@ "prop-types": "^15.5.8",

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

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