@panneau/form-inline 1.0.0-alpha.95 → 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.
Files changed (3) hide show
  1. package/es/index.js +3 -2
  2. package/lib/index.js +18 -17
  3. package/package.json +11 -11
package/es/index.js CHANGED
@@ -6,6 +6,7 @@ import { PropTypes } from '@panneau/core';
6
6
  import Form from '@panneau/element-form';
7
7
  import { useFieldComponent } from '@panneau/core/contexts';
8
8
 
9
+ var _excluded = ["fields", "status", "value", "onChange", "className", "onSubmit"];
9
10
  var propTypes = {
10
11
  fields: PropTypes.fields.isRequired,
11
12
  value: PropTypes$1.object,
@@ -41,7 +42,7 @@ var InlineForm = function InlineForm(_ref) {
41
42
  onChange = _ref.onChange,
42
43
  className = _ref.className,
43
44
  onSubmit = _ref.onSubmit,
44
- props = _objectWithoutProperties(_ref, ["fields", "status", "value", "onChange", "className", "onSubmit"]);
45
+ props = _objectWithoutProperties(_ref, _excluded);
45
46
 
46
47
  var FieldsComponent = useFieldComponent('fields');
47
48
  return /*#__PURE__*/React.createElement(Form, Object.assign({
@@ -62,4 +63,4 @@ var InlineForm = function InlineForm(_ref) {
62
63
  InlineForm.propTypes = propTypes;
63
64
  InlineForm.defaultProps = defaultProps;
64
65
 
65
- export default InlineForm;
66
+ export { InlineForm as default };
package/lib/index.js CHANGED
@@ -18,23 +18,24 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
18
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
19
19
  var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
20
20
 
21
+ var _excluded = ["fields", "status", "value", "onChange", "className", "onSubmit"];
21
22
  var propTypes = {
22
23
  fields: core.PropTypes.fields.isRequired,
23
- value: PropTypes__default['default'].object,
24
+ value: PropTypes__default["default"].object,
24
25
  // eslint-disable-line react/forbid-prop-types
25
- onChange: PropTypes__default['default'].func.isRequired,
26
- onSubmit: PropTypes__default['default'].func,
26
+ onChange: PropTypes__default["default"].func.isRequired,
27
+ onSubmit: PropTypes__default["default"].func,
27
28
  status: core.PropTypes.formStatus,
28
- generalError: PropTypes__default['default'].string,
29
- errors: PropTypes__default['default'].objectOf(PropTypes__default['default'].arrayOf(PropTypes__default['default'].string)),
30
- buttons: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
31
- type: PropTypes__default['default'].oneOf(['submit', 'button', 'link', 'reset']),
32
- id: PropTypes__default['default'].string,
33
- label: PropTypes__default['default'].string,
34
- position: PropTypes__default['default'].string,
35
- onClick: PropTypes__default['default'].func
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
36
37
  })),
37
- className: PropTypes__default['default'].string
38
+ className: PropTypes__default["default"].string
38
39
  };
39
40
  var defaultProps = {
40
41
  status: null,
@@ -53,16 +54,16 @@ var InlineForm = function InlineForm(_ref) {
53
54
  onChange = _ref.onChange,
54
55
  className = _ref.className,
55
56
  onSubmit = _ref.onSubmit,
56
- props = _objectWithoutProperties__default['default'](_ref, ["fields", "status", "value", "onChange", "className", "onSubmit"]);
57
+ props = _objectWithoutProperties__default["default"](_ref, _excluded);
57
58
 
58
59
  var FieldsComponent = contexts.useFieldComponent('fields');
59
- return /*#__PURE__*/React__default['default'].createElement(Form__default['default'], Object.assign({
60
+ return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
60
61
  onSubmit: onSubmit,
61
62
  className: className,
62
63
  status: status
63
- }, props), /*#__PURE__*/React__default['default'].createElement(FieldsComponent, {
64
+ }, props), /*#__PURE__*/React__default["default"].createElement(FieldsComponent, {
64
65
  fields: fields.map(function (f) {
65
- return _objectSpread__default['default'](_objectSpread__default['default']({}, f), {}, {
66
+ return _objectSpread__default["default"](_objectSpread__default["default"]({}, f), {}, {
66
67
  inline: true
67
68
  });
68
69
  }),
@@ -74,4 +75,4 @@ var InlineForm = function InlineForm(_ref) {
74
75
  InlineForm.propTypes = propTypes;
75
76
  InlineForm.defaultProps = defaultProps;
76
77
 
77
- exports.default = InlineForm;
78
+ exports["default"] = InlineForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-inline",
3
- "version": "1.0.0-alpha.95",
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.0-alpha.94",
57
- "@panneau/element-button": "^1.0.0-alpha.94",
58
- "@panneau/element-form": "^1.0.0-alpha.94",
59
- "@panneau/field-fields": "^1.0.0-alpha.95",
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": "63db27c610bfb2ffafdf4639a6fa1b4880fdcc87"
68
+ "gitHead": "7f9c472b97c79a5c81da30730549acdde2de5c9f"
69
69
  }