@panneau/field-display 3.0.308 → 4.0.1
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 +4 -17
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -1,28 +1,17 @@
|
|
|
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
5
|
import { useDisplaysComponentsManager } from '@panneau/core/contexts';
|
|
7
6
|
|
|
8
7
|
var _excluded = ["value", "display", "className"];
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line react/forbid-prop-types
|
|
11
|
-
value: PropTypes.any,
|
|
12
|
-
display: PropTypes.string,
|
|
13
|
-
className: PropTypes.string
|
|
14
|
-
};
|
|
15
|
-
var defaultProps = {
|
|
16
|
-
value: null,
|
|
17
|
-
display: null,
|
|
18
|
-
className: null
|
|
19
|
-
};
|
|
20
|
-
var DisplayField = function DisplayField(_ref) {
|
|
8
|
+
function DisplayField(_ref) {
|
|
21
9
|
var _ref$value = _ref.value,
|
|
22
10
|
value = _ref$value === void 0 ? null : _ref$value,
|
|
23
11
|
_ref$display = _ref.display,
|
|
24
12
|
display = _ref$display === void 0 ? null : _ref$display,
|
|
25
|
-
className = _ref.className,
|
|
13
|
+
_ref$className = _ref.className,
|
|
14
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
26
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
16
|
var displays = useDisplaysComponentsManager();
|
|
28
17
|
var Component = displays.getComponent(display) || null;
|
|
@@ -31,9 +20,7 @@ var DisplayField = function DisplayField(_ref) {
|
|
|
31
20
|
}, props, {
|
|
32
21
|
value: value
|
|
33
22
|
})) : null;
|
|
34
|
-
}
|
|
35
|
-
DisplayField.propTypes = propTypes;
|
|
36
|
-
DisplayField.defaultProps = defaultProps;
|
|
23
|
+
}
|
|
37
24
|
|
|
38
25
|
var definition = {
|
|
39
26
|
id: 'display',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-display",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "A field rendering a display",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.12.5",
|
|
52
|
-
"@panneau/core": "^
|
|
53
|
-
"@panneau/themes": "^
|
|
52
|
+
"@panneau/core": "^4.0.1",
|
|
53
|
+
"@panneau/themes": "^4.0.1",
|
|
54
54
|
"classnames": "^2.5.1",
|
|
55
55
|
"prop-types": "^15.7.2"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "dbdf65640625c027ecd56cf2b816b80a5c38cb8d"
|
|
61
61
|
}
|