@panneau/form-two-pane 4.0.1 → 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 -21
  2. package/package.json +8 -8
package/es/index.js CHANGED
@@ -1,9 +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
- import React from 'react';
5
5
  import { useFieldComponent, usePreviewComponent } from '@panneau/core/contexts';
6
6
  import Form from '@panneau/element-form';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
8
 
8
9
  var _excluded = ["resource", "fields", "status", "value", "onChange", "onSubmit", "errors", "buttons", "children", "className"];
9
10
  function TwoPaneForm(_ref) {
@@ -30,26 +31,30 @@ function TwoPaneForm(_ref) {
30
31
  id = _ref2$id === void 0 ? null : _ref2$id;
31
32
  var FieldsComponent = useFieldComponent('fields');
32
33
  var PreviewComponent = usePreviewComponent(id);
33
- return /*#__PURE__*/React.createElement("div", {
34
- className: "container-fluid row gx-4"
35
- }, /*#__PURE__*/React.createElement(Form, Object.assign({
36
- className: classNames(['form', 'col-12', 'col-lg-6', _defineProperty({}, className, className !== null)]),
37
- resource: resource,
38
- status: status,
39
- buttons: buttons,
40
- onSubmit: onSubmit,
41
- errors: errors
42
- }, props), /*#__PURE__*/React.createElement(FieldsComponent, {
43
- fields: fields,
44
- value: value,
45
- onChange: onChange,
46
- errors: errors
47
- })), /*#__PURE__*/React.createElement("div", {
48
- className: "col-12 col-lg-6"
49
- }, PreviewComponent !== null ? /*#__PURE__*/React.createElement(PreviewComponent, {
50
- resource: resource,
51
- value: value
52
- }) : 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
+ });
53
58
  }
54
59
 
55
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.1",
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.1",
61
- "@panneau/data": "^4.0.1",
62
- "@panneau/element-button": "^4.0.1",
63
- "@panneau/element-form": "^4.0.1",
64
- "@panneau/field-fields": "^4.0.1",
65
- "@panneau/themes": "^4.0.1",
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": "dbdf65640625c027ecd56cf2b816b80a5c38cb8d"
74
+ "gitHead": "e854451a718c6bc7dcde2b804c9913d8ac0297ff"
75
75
  }