@panneau/field-display 3.0.160 → 3.0.163
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 +9 -9
- package/lib/index.js +9 -9
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -7,27 +7,27 @@ import { useDisplaysComponentsManager } from '@panneau/core/contexts';
|
|
|
7
7
|
|
|
8
8
|
var styles = {};
|
|
9
9
|
|
|
10
|
-
var _excluded = ["
|
|
10
|
+
var _excluded = ["value", "display", "className"];
|
|
11
11
|
var propTypes = {
|
|
12
12
|
value: PropTypes.bool,
|
|
13
|
-
|
|
13
|
+
display: PropTypes.string,
|
|
14
14
|
className: PropTypes.string
|
|
15
15
|
};
|
|
16
16
|
var defaultProps = {
|
|
17
17
|
value: null,
|
|
18
|
-
|
|
18
|
+
display: null,
|
|
19
19
|
className: null
|
|
20
20
|
};
|
|
21
21
|
var DisplayField = function DisplayField(_ref) {
|
|
22
|
-
var _ref$
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
var _ref$value = _ref.value,
|
|
23
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
24
|
+
_ref$display = _ref.display,
|
|
25
|
+
display = _ref$display === void 0 ? null : _ref$display,
|
|
25
26
|
className = _ref.className,
|
|
26
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
28
|
var displays = useDisplaysComponentsManager();
|
|
28
|
-
var Component = displays.getComponent(
|
|
29
|
-
|
|
30
|
-
return Component !== null ? /*#__PURE__*/React.createElement(Component, Object.assign({
|
|
29
|
+
var Component = displays.getComponent(display) || null;
|
|
30
|
+
return value !== null && Component !== null ? /*#__PURE__*/React.createElement(Component, Object.assign({
|
|
31
31
|
className: classNames([styles.container, _defineProperty({}, className, className !== null)])
|
|
32
32
|
}, props, {
|
|
33
33
|
value: value
|
package/lib/index.js
CHANGED
|
@@ -11,27 +11,27 @@ var contexts = require('@panneau/core/contexts');
|
|
|
11
11
|
|
|
12
12
|
var styles = {};
|
|
13
13
|
|
|
14
|
-
var _excluded = ["
|
|
14
|
+
var _excluded = ["value", "display", "className"];
|
|
15
15
|
var propTypes = {
|
|
16
16
|
value: PropTypes.bool,
|
|
17
|
-
|
|
17
|
+
display: PropTypes.string,
|
|
18
18
|
className: PropTypes.string
|
|
19
19
|
};
|
|
20
20
|
var defaultProps = {
|
|
21
21
|
value: null,
|
|
22
|
-
|
|
22
|
+
display: null,
|
|
23
23
|
className: null
|
|
24
24
|
};
|
|
25
25
|
var DisplayField = function DisplayField(_ref) {
|
|
26
|
-
var _ref$
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
var _ref$value = _ref.value,
|
|
27
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
28
|
+
_ref$display = _ref.display,
|
|
29
|
+
display = _ref$display === void 0 ? null : _ref$display,
|
|
29
30
|
className = _ref.className,
|
|
30
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
32
|
var displays = contexts.useDisplaysComponentsManager();
|
|
32
|
-
var Component = displays.getComponent(
|
|
33
|
-
|
|
34
|
-
return Component !== null ? /*#__PURE__*/React.createElement(Component, Object.assign({
|
|
33
|
+
var Component = displays.getComponent(display) || null;
|
|
34
|
+
return value !== null && Component !== null ? /*#__PURE__*/React.createElement(Component, Object.assign({
|
|
35
35
|
className: classNames([styles.container, _defineProperty({}, className, className !== null)])
|
|
36
36
|
}, props, {
|
|
37
37
|
value: value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-display",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.163",
|
|
4
4
|
"description": "A field rendering a display",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.12.5",
|
|
49
|
-
"@panneau/core": "^3.0.
|
|
50
|
-
"@panneau/themes": "^3.0.
|
|
49
|
+
"@panneau/core": "^3.0.162",
|
|
50
|
+
"@panneau/themes": "^3.0.162",
|
|
51
51
|
"classnames": "^2.5.1",
|
|
52
52
|
"prop-types": "^15.7.2"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "30b29ec9436fb6ead123625baa0bd1b32d69fcac"
|
|
58
58
|
}
|