@panneau/form-two-pane 4.0.2 → 4.0.4

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 +26 -20
  2. package/package.json +8 -8
package/es/index.js CHANGED
@@ -1,8 +1,10 @@
1
+ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
1
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
4
  import classNames from 'classnames';
4
5
  import { useFieldComponent, usePreviewComponent } from '@panneau/core/contexts';
5
6
  import Form from '@panneau/element-form';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
8
 
7
9
  var _excluded = ["resource", "fields", "status", "value", "onChange", "onSubmit", "errors", "buttons", "children", "className"];
8
10
  function TwoPaneForm(_ref) {
@@ -29,26 +31,30 @@ function TwoPaneForm(_ref) {
29
31
  id = _ref2$id === void 0 ? null : _ref2$id;
30
32
  var FieldsComponent = useFieldComponent('fields');
31
33
  var PreviewComponent = usePreviewComponent(id);
32
- return /*#__PURE__*/React.createElement("div", {
33
- className: "container-fluid row gx-4"
34
- }, /*#__PURE__*/React.createElement(Form, Object.assign({
35
- className: classNames(['form', 'col-12', 'col-lg-6', _defineProperty({}, className, className !== null)]),
36
- resource: resource,
37
- status: status,
38
- buttons: buttons,
39
- onSubmit: onSubmit,
40
- errors: errors
41
- }, props), /*#__PURE__*/React.createElement(FieldsComponent, {
42
- fields: fields,
43
- value: value,
44
- onChange: onChange,
45
- errors: errors
46
- })), /*#__PURE__*/React.createElement("div", {
47
- className: "col-12 col-lg-6"
48
- }, PreviewComponent !== null ? /*#__PURE__*/React.createElement(PreviewComponent, {
49
- resource: resource,
50
- value: value
51
- }) : children));
34
+ return /*#__PURE__*/jsxs("div", {
35
+ className: "container-fluid row gx-4",
36
+ children: [/*#__PURE__*/jsx(Form, _objectSpread(_objectSpread({
37
+ className: classNames(['form', 'col-12', 'col-lg-6', _defineProperty({}, className, className !== null)]),
38
+ resource: resource,
39
+ status: status,
40
+ buttons: buttons,
41
+ onSubmit: onSubmit,
42
+ errors: errors
43
+ }, props), {}, {
44
+ children: /*#__PURE__*/jsx(FieldsComponent, {
45
+ fields: fields,
46
+ value: value,
47
+ onChange: onChange,
48
+ errors: errors
49
+ })
50
+ })), /*#__PURE__*/jsx("div", {
51
+ className: "col-12 col-lg-6",
52
+ children: PreviewComponent !== null ? /*#__PURE__*/jsx(PreviewComponent, {
53
+ resource: resource,
54
+ value: value
55
+ }) : children
56
+ })]
57
+ });
52
58
  }
53
59
 
54
60
  export { TwoPaneForm as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-two-pane",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "Two-pane resource forms",
5
5
  "keywords": [
6
6
  "javascript"
@@ -57,12 +57,12 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@babel/runtime": "^7.12.5",
60
- "@panneau/core": "^4.0.2",
61
- "@panneau/data": "^4.0.2",
62
- "@panneau/element-button": "^4.0.2",
63
- "@panneau/element-form": "^4.0.2",
64
- "@panneau/field-fields": "^4.0.2",
65
- "@panneau/themes": "^4.0.2",
60
+ "@panneau/core": "^4.0.4",
61
+ "@panneau/data": "^4.0.4",
62
+ "@panneau/element-button": "^4.0.4",
63
+ "@panneau/element-form": "^4.0.4",
64
+ "@panneau/field-fields": "^4.0.4",
65
+ "@panneau/themes": "^4.0.4",
66
66
  "classnames": "^2.5.1",
67
67
  "lodash-es": "^4.17.21",
68
68
  "prop-types": "^15.7.2",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "53ad0f27e467992c23158732e0f7d39d8615780b"
74
+ "gitHead": "e854451a718c6bc7dcde2b804c9913d8ac0297ff"
75
75
  }