@panneau/form-inline 1.0.0-y.0 → 1.0.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +1 -1
- package/lib/index.js +19 -17
- package/package.json +11 -11
package/es/index.js
CHANGED
package/lib/index.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
3
5
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
4
6
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
5
7
|
var React = require('react');
|
@@ -19,21 +21,21 @@ var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
19
21
|
var _excluded = ["fields", "status", "value", "onChange", "className", "onSubmit"];
|
20
22
|
var propTypes = {
|
21
23
|
fields: core.PropTypes.fields.isRequired,
|
22
|
-
value: PropTypes__default[
|
24
|
+
value: PropTypes__default["default"].object,
|
23
25
|
// eslint-disable-line react/forbid-prop-types
|
24
|
-
onChange: PropTypes__default[
|
25
|
-
onSubmit: PropTypes__default[
|
26
|
+
onChange: PropTypes__default["default"].func.isRequired,
|
27
|
+
onSubmit: PropTypes__default["default"].func,
|
26
28
|
status: core.PropTypes.formStatus,
|
27
|
-
generalError: PropTypes__default[
|
28
|
-
errors: PropTypes__default[
|
29
|
-
buttons: PropTypes__default[
|
30
|
-
type: PropTypes__default[
|
31
|
-
id: PropTypes__default[
|
32
|
-
label: PropTypes__default[
|
33
|
-
position: PropTypes__default[
|
34
|
-
onClick: PropTypes__default[
|
29
|
+
generalError: PropTypes__default["default"].string,
|
30
|
+
errors: PropTypes__default["default"].objectOf(PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)),
|
31
|
+
buttons: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
32
|
+
type: PropTypes__default["default"].oneOf(['submit', 'button', 'link', 'reset']),
|
33
|
+
id: PropTypes__default["default"].string,
|
34
|
+
label: PropTypes__default["default"].string,
|
35
|
+
position: PropTypes__default["default"].string,
|
36
|
+
onClick: PropTypes__default["default"].func
|
35
37
|
})),
|
36
|
-
className: PropTypes__default[
|
38
|
+
className: PropTypes__default["default"].string
|
37
39
|
};
|
38
40
|
var defaultProps = {
|
39
41
|
status: null,
|
@@ -52,16 +54,16 @@ var InlineForm = function InlineForm(_ref) {
|
|
52
54
|
onChange = _ref.onChange,
|
53
55
|
className = _ref.className,
|
54
56
|
onSubmit = _ref.onSubmit,
|
55
|
-
props = _objectWithoutProperties__default[
|
57
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
56
58
|
|
57
59
|
var FieldsComponent = contexts.useFieldComponent('fields');
|
58
|
-
return /*#__PURE__*/React__default[
|
60
|
+
return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
|
59
61
|
onSubmit: onSubmit,
|
60
62
|
className: className,
|
61
63
|
status: status
|
62
|
-
}, props), /*#__PURE__*/React__default[
|
64
|
+
}, props), /*#__PURE__*/React__default["default"].createElement(FieldsComponent, {
|
63
65
|
fields: fields.map(function (f) {
|
64
|
-
return _objectSpread__default[
|
66
|
+
return _objectSpread__default["default"](_objectSpread__default["default"]({}, f), {}, {
|
65
67
|
inline: true
|
66
68
|
});
|
67
69
|
}),
|
@@ -73,4 +75,4 @@ var InlineForm = function InlineForm(_ref) {
|
|
73
75
|
InlineForm.propTypes = propTypes;
|
74
76
|
InlineForm.defaultProps = defaultProps;
|
75
77
|
|
76
|
-
|
78
|
+
exports["default"] = InlineForm;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@panneau/form-inline",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3-alpha.0",
|
4
4
|
"description": "Inline form",
|
5
5
|
"keywords": [
|
6
6
|
"javascript"
|
@@ -44,26 +44,26 @@
|
|
44
44
|
"prepare": "../../scripts/prepare-package.sh"
|
45
45
|
},
|
46
46
|
"devDependencies": {
|
47
|
-
"react": "^16.8.0",
|
48
|
-
"react-dom": "^16.8.0"
|
47
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
48
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
49
49
|
},
|
50
50
|
"peerDependencies": {
|
51
|
-
"react": "^16.8.0",
|
52
|
-
"react-dom": "^16.8.0"
|
51
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
52
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
53
53
|
},
|
54
54
|
"dependencies": {
|
55
55
|
"@babel/runtime": "^7.12.5",
|
56
|
-
"@panneau/core": "^1.0.
|
57
|
-
"@panneau/element-button": "^1.0.
|
58
|
-
"@panneau/element-form": "^1.0.
|
59
|
-
"@panneau/field-fields": "^1.0.
|
56
|
+
"@panneau/core": "^1.0.3-alpha.0",
|
57
|
+
"@panneau/element-button": "^1.0.3-alpha.0",
|
58
|
+
"@panneau/element-form": "^1.0.3-alpha.0",
|
59
|
+
"@panneau/field-fields": "^1.0.3-alpha.0",
|
60
60
|
"classnames": "^2.2.6",
|
61
61
|
"lodash": "^4.17.21",
|
62
62
|
"prop-types": "^15.7.2",
|
63
|
-
"react-intl": "^5.15.8"
|
63
|
+
"react-intl": "^5.15.8||^6.0.0"
|
64
64
|
},
|
65
65
|
"publishConfig": {
|
66
66
|
"access": "public"
|
67
67
|
},
|
68
|
-
"gitHead": "
|
68
|
+
"gitHead": "7f9c472b97c79a5c81da30730549acdde2de5c9f"
|
69
69
|
}
|