@panneau/form-two-pane 3.0.307 → 4.0.0
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 +16 -45
- package/package.json +9 -9
package/es/index.js
CHANGED
|
@@ -1,56 +1,29 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import { PropTypes as PropTypes$1 } from '@panneau/core';
|
|
7
5
|
import { useFieldComponent, usePreviewComponent } from '@panneau/core/contexts';
|
|
8
6
|
import Form from '@panneau/element-form';
|
|
9
7
|
|
|
10
8
|
var _excluded = ["resource", "fields", "status", "value", "onChange", "onSubmit", "errors", "buttons", "children", "className"];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
id: PropTypes.string
|
|
15
|
-
}),
|
|
16
|
-
value: PropTypes.object,
|
|
17
|
-
// eslint-disable-line react/forbid-prop-types
|
|
18
|
-
onChange: PropTypes.func.isRequired,
|
|
19
|
-
onSubmit: PropTypes.func.isRequired,
|
|
20
|
-
status: PropTypes$1.formStatus,
|
|
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
|
|
29
|
-
})),
|
|
30
|
-
children: PropTypes.node,
|
|
31
|
-
className: PropTypes.string
|
|
32
|
-
};
|
|
33
|
-
var defaultProps = {
|
|
34
|
-
resource: null,
|
|
35
|
-
status: null,
|
|
36
|
-
value: null,
|
|
37
|
-
generalError: null,
|
|
38
|
-
errors: null,
|
|
39
|
-
buttons: null,
|
|
40
|
-
children: null,
|
|
41
|
-
className: null
|
|
42
|
-
};
|
|
43
|
-
var TwoPaneForm = function TwoPaneForm(_ref) {
|
|
44
|
-
var resource = _ref.resource,
|
|
9
|
+
function TwoPaneForm(_ref) {
|
|
10
|
+
var _ref$resource = _ref.resource,
|
|
11
|
+
resource = _ref$resource === void 0 ? null : _ref$resource,
|
|
45
12
|
fields = _ref.fields,
|
|
46
|
-
status = _ref.status,
|
|
47
|
-
|
|
13
|
+
_ref$status = _ref.status,
|
|
14
|
+
status = _ref$status === void 0 ? null : _ref$status,
|
|
15
|
+
_ref$value = _ref.value,
|
|
16
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
48
17
|
onChange = _ref.onChange,
|
|
49
18
|
onSubmit = _ref.onSubmit,
|
|
50
|
-
errors = _ref.errors,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
19
|
+
_ref$errors = _ref.errors,
|
|
20
|
+
errors = _ref$errors === void 0 ? null : _ref$errors,
|
|
21
|
+
_ref$buttons = _ref.buttons,
|
|
22
|
+
buttons = _ref$buttons === void 0 ? null : _ref$buttons,
|
|
23
|
+
_ref$children = _ref.children,
|
|
24
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
25
|
+
_ref$className = _ref.className,
|
|
26
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
54
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
28
|
var _ref2 = resource || {},
|
|
56
29
|
_ref2$id = _ref2.id,
|
|
@@ -77,8 +50,6 @@ var TwoPaneForm = function TwoPaneForm(_ref) {
|
|
|
77
50
|
resource: resource,
|
|
78
51
|
value: value
|
|
79
52
|
}) : children));
|
|
80
|
-
}
|
|
81
|
-
TwoPaneForm.propTypes = propTypes;
|
|
82
|
-
TwoPaneForm.defaultProps = defaultProps;
|
|
53
|
+
}
|
|
83
54
|
|
|
84
55
|
export { TwoPaneForm as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/form-two-pane",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Two-pane resource forms",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.12.5",
|
|
60
|
-
"@panneau/core": "^
|
|
61
|
-
"@panneau/data": "^
|
|
62
|
-
"@panneau/element-button": "^
|
|
63
|
-
"@panneau/element-form": "^
|
|
64
|
-
"@panneau/field-fields": "^
|
|
65
|
-
"@panneau/themes": "^
|
|
60
|
+
"@panneau/core": "^4.0.0",
|
|
61
|
+
"@panneau/data": "^4.0.0",
|
|
62
|
+
"@panneau/element-button": "^4.0.0",
|
|
63
|
+
"@panneau/element-form": "^4.0.0",
|
|
64
|
+
"@panneau/field-fields": "^4.0.0",
|
|
65
|
+
"@panneau/themes": "^4.0.0",
|
|
66
66
|
"classnames": "^2.5.1",
|
|
67
67
|
"lodash-es": "^4.17.21",
|
|
68
68
|
"prop-types": "^15.7.2",
|
|
69
|
-
"react-intl": "^5.15.8
|
|
69
|
+
"react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
|
|
75
75
|
}
|