@panneau/form-inline 3.0.119 → 3.0.126

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/lib/index.js +17 -25
  2. package/package.json +8 -7
package/lib/index.js CHANGED
@@ -10,32 +10,24 @@ var core = require('@panneau/core');
10
10
  var Form = require('@panneau/element-form');
11
11
  var contexts = require('@panneau/core/contexts');
12
12
 
13
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
-
15
- var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
16
- var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
17
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
- var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
19
- var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
20
-
21
13
  var _excluded = ["fields", "status", "value", "onChange", "className", "onSubmit"];
22
14
  var propTypes = {
23
15
  fields: core.PropTypes.fields.isRequired,
24
- value: PropTypes__default["default"].object,
16
+ value: PropTypes.object,
25
17
  // eslint-disable-line react/forbid-prop-types
26
- onChange: PropTypes__default["default"].func.isRequired,
27
- onSubmit: PropTypes__default["default"].func,
18
+ onChange: PropTypes.func.isRequired,
19
+ onSubmit: PropTypes.func,
28
20
  status: core.PropTypes.formStatus,
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
21
+ generalError: PropTypes.string,
22
+ errors: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),
23
+ buttons: PropTypes.arrayOf(PropTypes.shape({
24
+ type: PropTypes.oneOf(['submit', 'button', 'link', 'reset']),
25
+ id: PropTypes.string,
26
+ label: PropTypes.string,
27
+ position: PropTypes.string,
28
+ onClick: PropTypes.func
37
29
  })),
38
- className: PropTypes__default["default"].string
30
+ className: PropTypes.string
39
31
  };
40
32
  var defaultProps = {
41
33
  status: null,
@@ -53,15 +45,15 @@ var InlineForm = function InlineForm(_ref) {
53
45
  onChange = _ref.onChange,
54
46
  className = _ref.className,
55
47
  onSubmit = _ref.onSubmit,
56
- props = _objectWithoutProperties__default["default"](_ref, _excluded);
48
+ props = _objectWithoutProperties(_ref, _excluded);
57
49
  var FieldsComponent = contexts.useFieldComponent('fields');
58
- return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
50
+ return /*#__PURE__*/React.createElement(Form, Object.assign({
59
51
  onSubmit: onSubmit,
60
52
  className: className,
61
53
  status: status
62
- }, props), /*#__PURE__*/React__default["default"].createElement(FieldsComponent, {
54
+ }, props), /*#__PURE__*/React.createElement(FieldsComponent, {
63
55
  fields: fields.map(function (f) {
64
- return _objectSpread__default["default"](_objectSpread__default["default"]({}, f), {}, {
56
+ return _objectSpread(_objectSpread({}, f), {}, {
65
57
  inline: true
66
58
  });
67
59
  }),
@@ -73,4 +65,4 @@ InlineForm.propTypes = propTypes;
73
65
  InlineForm.defaultProps = defaultProps;
74
66
  var Inline = InlineForm;
75
67
 
76
- exports["default"] = Inline;
68
+ exports.default = Inline;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-inline",
3
- "version": "3.0.119",
3
+ "version": "3.0.126",
4
4
  "description": "Inline form",
5
5
  "keywords": [
6
6
  "javascript"
@@ -41,7 +41,8 @@
41
41
  "assets"
42
42
  ],
43
43
  "scripts": {
44
- "prepare": "../../scripts/prepare-package.sh"
44
+ "prepublishOnly": "npm run build",
45
+ "build": "../../scripts/prepare-package.sh"
45
46
  },
46
47
  "devDependencies": {
47
48
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
@@ -53,10 +54,10 @@
53
54
  },
54
55
  "dependencies": {
55
56
  "@babel/runtime": "^7.12.5",
56
- "@panneau/core": "^3.0.119",
57
- "@panneau/element-button": "^3.0.119",
58
- "@panneau/element-form": "^3.0.119",
59
- "@panneau/field-fields": "^3.0.119",
57
+ "@panneau/core": "^3.0.126",
58
+ "@panneau/element-button": "^3.0.126",
59
+ "@panneau/element-form": "^3.0.126",
60
+ "@panneau/field-fields": "^3.0.126",
60
61
  "classnames": "^2.2.6",
61
62
  "lodash": "^4.17.21",
62
63
  "prop-types": "^15.7.2",
@@ -65,5 +66,5 @@
65
66
  "publishConfig": {
66
67
  "access": "public"
67
68
  },
68
- "gitHead": "89c8dff2b05f49a7b00b4214943de94222f3521c"
69
+ "gitHead": "fa69ddff3f8cf22b00504093087608d5701e6f6a"
69
70
  }