@panneau/form-two-pane 1.0.0-alpha.23 → 1.0.0-alpha.231

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 +25 -22
  3. package/package.json +12 -12
package/es/index.js CHANGED
@@ -9,6 +9,7 @@ import { useFieldComponent } from '@panneau/core/contexts';
9
9
 
10
10
  var styles = {};
11
11
 
12
+ var _excluded = ["fields", "status", "value", "setValue", "onSubmit", "buttons", "children", "className"];
12
13
  var propTypes = {
13
14
  fields: PropTypes.objectOf(PropTypes.shape({})).isRequired,
14
15
  value: PropTypes.object,
@@ -49,7 +50,7 @@ var TwoPaneForm = function TwoPaneForm(_ref) {
49
50
  buttons = _ref.buttons,
50
51
  children = _ref.children,
51
52
  className = _ref.className,
52
- props = _objectWithoutProperties(_ref, ["fields", "status", "value", "setValue", "onSubmit", "buttons", "children", "className"]);
53
+ props = _objectWithoutProperties(_ref, _excluded);
53
54
 
54
55
  var FieldsComponent = useFieldComponent('fields');
55
56
  var onChange = setValue || null;
@@ -72,4 +73,4 @@ var TwoPaneForm = function TwoPaneForm(_ref) {
72
73
  TwoPaneForm.propTypes = propTypes;
73
74
  TwoPaneForm.defaultProps = defaultProps;
74
75
 
75
- export default TwoPaneForm;
76
+ export { TwoPaneForm as default };
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 _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
6
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
7
  var React = require('react');
@@ -20,25 +22,26 @@ var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
20
22
 
21
23
  var styles = {};
22
24
 
25
+ var _excluded = ["fields", "status", "value", "setValue", "onSubmit", "buttons", "children", "className"];
23
26
  var propTypes = {
24
- fields: PropTypes__default['default'].objectOf(PropTypes__default['default'].shape({})).isRequired,
25
- value: PropTypes__default['default'].object,
27
+ fields: PropTypes__default["default"].objectOf(PropTypes__default["default"].shape({})).isRequired,
28
+ value: PropTypes__default["default"].object,
26
29
  // eslint-disable-line react/forbid-prop-types
27
- setValue: PropTypes__default['default'].func,
28
- onChange: PropTypes__default['default'].func.isRequired,
29
- onSubmit: PropTypes__default['default'].func.isRequired,
30
+ setValue: PropTypes__default["default"].func,
31
+ onChange: PropTypes__default["default"].func.isRequired,
32
+ onSubmit: PropTypes__default["default"].func.isRequired,
30
33
  status: core.PropTypes.formStatus,
31
- generalError: PropTypes__default['default'].string,
32
- errors: PropTypes__default['default'].objectOf(PropTypes__default['default'].arrayOf(PropTypes__default['default'].string)),
33
- buttons: PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
34
- type: PropTypes__default['default'].oneOf(['submit', 'button', 'link', 'reset']),
35
- id: PropTypes__default['default'].string,
36
- label: PropTypes__default['default'].string,
37
- position: PropTypes__default['default'].string,
38
- onClick: PropTypes__default['default'].func
34
+ generalError: PropTypes__default["default"].string,
35
+ errors: PropTypes__default["default"].objectOf(PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)),
36
+ buttons: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
37
+ type: PropTypes__default["default"].oneOf(['submit', 'button', 'link', 'reset']),
38
+ id: PropTypes__default["default"].string,
39
+ label: PropTypes__default["default"].string,
40
+ position: PropTypes__default["default"].string,
41
+ onClick: PropTypes__default["default"].func
39
42
  })),
40
- children: PropTypes__default['default'].node,
41
- className: PropTypes__default['default'].string
43
+ children: PropTypes__default["default"].node,
44
+ className: PropTypes__default["default"].string
42
45
  };
43
46
  var defaultProps = {
44
47
  status: null,
@@ -60,22 +63,22 @@ var TwoPaneForm = function TwoPaneForm(_ref) {
60
63
  buttons = _ref.buttons,
61
64
  children = _ref.children,
62
65
  className = _ref.className,
63
- props = _objectWithoutProperties__default['default'](_ref, ["fields", "status", "value", "setValue", "onSubmit", "buttons", "children", "className"]);
66
+ props = _objectWithoutProperties__default["default"](_ref, _excluded);
64
67
 
65
68
  var FieldsComponent = contexts.useFieldComponent('fields');
66
69
  var onChange = setValue || null;
67
- return /*#__PURE__*/React__default['default'].createElement("div", {
70
+ return /*#__PURE__*/React__default["default"].createElement("div", {
68
71
  className: "d-flex"
69
- }, /*#__PURE__*/React__default['default'].createElement(Form__default['default'], Object.assign({
70
- className: classNames__default['default']([styles.container, 'form', 'w-50', _defineProperty__default['default']({}, className, className !== null)]),
72
+ }, /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
73
+ className: classNames__default["default"]([styles.container, 'form', 'w-50', _defineProperty__default["default"]({}, className, className !== null)]),
71
74
  status: status,
72
75
  buttons: buttons,
73
76
  onSubmit: onSubmit
74
- }, props), /*#__PURE__*/React__default['default'].createElement(FieldsComponent, {
77
+ }, props), /*#__PURE__*/React__default["default"].createElement(FieldsComponent, {
75
78
  fields: fields,
76
79
  value: value,
77
80
  onChange: onChange
78
- })), /*#__PURE__*/React__default['default'].createElement("div", {
81
+ })), /*#__PURE__*/React__default["default"].createElement("div", {
79
82
  className: "w-50"
80
83
  }, children));
81
84
  };
@@ -83,4 +86,4 @@ var TwoPaneForm = function TwoPaneForm(_ref) {
83
86
  TwoPaneForm.propTypes = propTypes;
84
87
  TwoPaneForm.defaultProps = defaultProps;
85
88
 
86
- module.exports = TwoPaneForm;
89
+ exports["default"] = TwoPaneForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-two-pane",
3
- "version": "1.0.0-alpha.23",
3
+ "version": "1.0.0-alpha.231",
4
4
  "description": "Two-pane resource forms",
5
5
  "keywords": [
6
6
  "javascript"
@@ -44,21 +44,21 @@
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",
48
+ "react-dom": "^16.8.0 || ^17.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",
52
+ "react-dom": "^16.8.0 || ^17.0.0"
53
53
  },
54
54
  "dependencies": {
55
55
  "@babel/runtime": "^7.12.5",
56
- "@panneau/core": "^1.0.0-alpha.21",
57
- "@panneau/data": "^1.0.0-alpha.23",
58
- "@panneau/element-button": "^1.0.0-alpha.21",
59
- "@panneau/element-form": "^1.0.0-alpha.23",
60
- "@panneau/field-fields": "^1.0.0-alpha.21",
61
- "@panneau/themes": "^1.0.0-alpha.21",
56
+ "@panneau/core": "^1.0.0-alpha.231",
57
+ "@panneau/data": "^1.0.0-alpha.231",
58
+ "@panneau/element-button": "^1.0.0-alpha.231",
59
+ "@panneau/element-form": "^1.0.0-alpha.231",
60
+ "@panneau/field-fields": "^1.0.0-alpha.231",
61
+ "@panneau/themes": "^1.0.0-alpha.231",
62
62
  "classnames": "^2.2.6",
63
63
  "lodash": "^4.17.21",
64
64
  "prop-types": "^15.7.2",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "9fd9f8d6d7d7e574d3b9e4cbb01022e3abcbb9a6"
70
+ "gitHead": "74eccc596298a471a8985fe2cccf4a201dd18349"
71
71
  }