@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.
- package/es/index.js +26 -20
- 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__*/
|
|
33
|
-
className: "container-fluid row gx-4"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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.
|
|
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.
|
|
61
|
-
"@panneau/data": "^4.0.
|
|
62
|
-
"@panneau/element-button": "^4.0.
|
|
63
|
-
"@panneau/element-form": "^4.0.
|
|
64
|
-
"@panneau/field-fields": "^4.0.
|
|
65
|
-
"@panneau/themes": "^4.0.
|
|
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": "
|
|
74
|
+
"gitHead": "e854451a718c6bc7dcde2b804c9913d8ac0297ff"
|
|
75
75
|
}
|