@panneau/display-text-description 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 +18 -36
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -2,42 +2,26 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import get from 'lodash-es/get';
|
|
4
4
|
import isObject from 'lodash-es/isObject';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import React, { useMemo } from 'react';
|
|
7
6
|
import { useIntl } from 'react-intl';
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
value
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
descriptionPath: null,
|
|
27
|
-
descriptionValues: null,
|
|
28
|
-
locale: null,
|
|
29
|
-
selected: false,
|
|
30
|
-
className: null
|
|
31
|
-
};
|
|
32
|
-
var TextDescription = function TextDescription(_ref) {
|
|
33
|
-
var initialValue = _ref.value,
|
|
34
|
-
placeholder = _ref.placeholder,
|
|
35
|
-
parentLocale = _ref.locale,
|
|
36
|
-
item = _ref.item,
|
|
37
|
-
descriptionPath = _ref.descriptionPath,
|
|
38
|
-
descriptionValues = _ref.descriptionValues,
|
|
39
|
-
selected = _ref.selected,
|
|
40
|
-
className = _ref.className;
|
|
8
|
+
function TextDescription(_ref) {
|
|
9
|
+
var _ref$value = _ref.value,
|
|
10
|
+
initialValue = _ref$value === void 0 ? null : _ref$value,
|
|
11
|
+
_ref$placeholder = _ref.placeholder,
|
|
12
|
+
placeholder = _ref$placeholder === void 0 ? null : _ref$placeholder,
|
|
13
|
+
_ref$locale = _ref.locale,
|
|
14
|
+
parentLocale = _ref$locale === void 0 ? null : _ref$locale,
|
|
15
|
+
_ref$item = _ref.item,
|
|
16
|
+
item = _ref$item === void 0 ? null : _ref$item,
|
|
17
|
+
_ref$descriptionPath = _ref.descriptionPath,
|
|
18
|
+
descriptionPath = _ref$descriptionPath === void 0 ? null : _ref$descriptionPath,
|
|
19
|
+
_ref$descriptionValue = _ref.descriptionValues,
|
|
20
|
+
descriptionValues = _ref$descriptionValue === void 0 ? null : _ref$descriptionValue,
|
|
21
|
+
_ref$selected = _ref.selected,
|
|
22
|
+
selected = _ref$selected === void 0 ? false : _ref$selected,
|
|
23
|
+
_ref$className = _ref.className,
|
|
24
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
41
25
|
var _useIntl = useIntl(),
|
|
42
26
|
locale = _useIntl.locale;
|
|
43
27
|
var _useMemo = useMemo(function () {
|
|
@@ -60,8 +44,6 @@ var TextDescription = function TextDescription(_ref) {
|
|
|
60
44
|
'text-body': !selected
|
|
61
45
|
}])
|
|
62
46
|
}, /*#__PURE__*/React.createElement("small", null, label))) : /*#__PURE__*/React.createElement(React.Fragment, null, value || placeholder);
|
|
63
|
-
}
|
|
64
|
-
TextDescription.propTypes = propTypes;
|
|
65
|
-
TextDescription.defaultProps = defaultProps;
|
|
47
|
+
}
|
|
66
48
|
|
|
67
49
|
export { TextDescription as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/display-text-description",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Text with description in list",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.12.5",
|
|
52
|
-
"@panneau/core": "^
|
|
53
|
-
"@panneau/themes": "^
|
|
52
|
+
"@panneau/core": "^4.0.0",
|
|
53
|
+
"@panneau/themes": "^4.0.0",
|
|
54
54
|
"classnames": "^2.5.1",
|
|
55
55
|
"lodash-es": "^4.17.21",
|
|
56
56
|
"prop-types": "^15.7.2",
|
|
57
|
-
"react-intl": "^5.15.8
|
|
57
|
+
"react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
|
|
63
63
|
}
|