@panneau/form-inline 3.0.307 → 4.0.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 (2) hide show
  1. package/es/index.js +11 -38
  2. package/package.json +7 -7
package/es/index.js CHANGED
@@ -1,46 +1,21 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
3
  import React from 'react';
4
- import PropTypes from 'prop-types';
5
- import { PropTypes as PropTypes$1 } from '@panneau/core';
6
- import Form from '@panneau/element-form';
7
4
  import { useFieldComponent } from '@panneau/core/contexts';
5
+ import Form from '@panneau/element-form';
8
6
 
9
7
  var _excluded = ["fields", "status", "value", "onChange", "className", "onSubmit"];
10
- var propTypes = {
11
- fields: PropTypes$1.fields.isRequired,
12
- value: PropTypes.object,
13
- // eslint-disable-line react/forbid-prop-types
14
- onChange: PropTypes.func.isRequired,
15
- onSubmit: PropTypes.func,
16
- status: PropTypes$1.formStatus,
17
- generalError: PropTypes.string,
18
- errors: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),
19
- buttons: PropTypes.arrayOf(PropTypes.shape({
20
- type: PropTypes.oneOf(['submit', 'button', 'link', 'reset']),
21
- id: PropTypes.string,
22
- label: PropTypes.string,
23
- position: PropTypes.string,
24
- onClick: PropTypes.func
25
- })),
26
- className: PropTypes.string
27
- };
28
- var defaultProps = {
29
- status: null,
30
- value: null,
31
- onSubmit: null,
32
- generalError: null,
33
- errors: null,
34
- buttons: null,
35
- className: null
36
- };
37
- var InlineForm = function InlineForm(_ref) {
8
+ function InlineForm(_ref) {
38
9
  var fields = _ref.fields,
39
- status = _ref.status,
40
- value = _ref.value,
10
+ _ref$status = _ref.status,
11
+ status = _ref$status === void 0 ? null : _ref$status,
12
+ _ref$value = _ref.value,
13
+ value = _ref$value === void 0 ? null : _ref$value,
41
14
  onChange = _ref.onChange,
42
- className = _ref.className,
43
- onSubmit = _ref.onSubmit,
15
+ _ref$className = _ref.className,
16
+ className = _ref$className === void 0 ? null : _ref$className,
17
+ _ref$onSubmit = _ref.onSubmit,
18
+ onSubmit = _ref$onSubmit === void 0 ? null : _ref$onSubmit,
44
19
  props = _objectWithoutProperties(_ref, _excluded);
45
20
  var FieldsComponent = useFieldComponent('fields');
46
21
  return /*#__PURE__*/React.createElement(Form, Object.assign({
@@ -56,8 +31,6 @@ var InlineForm = function InlineForm(_ref) {
56
31
  value: value,
57
32
  onChange: onChange
58
33
  }));
59
- };
60
- InlineForm.propTypes = propTypes;
61
- InlineForm.defaultProps = defaultProps;
34
+ }
62
35
 
63
36
  export { InlineForm as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-inline",
3
- "version": "3.0.307",
3
+ "version": "4.0.0",
4
4
  "description": "Inline form",
5
5
  "keywords": [
6
6
  "javascript"
@@ -57,17 +57,17 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@babel/runtime": "^7.12.5",
60
- "@panneau/core": "^3.0.307",
61
- "@panneau/element-button": "^3.0.307",
62
- "@panneau/element-form": "^3.0.307",
63
- "@panneau/field-fields": "^3.0.307",
60
+ "@panneau/core": "^4.0.0",
61
+ "@panneau/element-button": "^4.0.0",
62
+ "@panneau/element-form": "^4.0.0",
63
+ "@panneau/field-fields": "^4.0.0",
64
64
  "classnames": "^2.5.1",
65
65
  "lodash-es": "^4.17.21",
66
66
  "prop-types": "^15.7.2",
67
- "react-intl": "^5.15.8||^6.0.0"
67
+ "react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
68
68
  },
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "cbe5e8b1705d01c5653a4df617a06243344310d3"
72
+ "gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
73
73
  }