@panneau/display-link 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 +16 -32
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -1,38 +1,24 @@
|
|
|
1
1
|
import get from 'lodash-es/get';
|
|
2
2
|
import isString from 'lodash-es/isString';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { FormattedMessage } from 'react-intl';
|
|
6
5
|
import { Link as Link$1 } from 'wouter';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
item
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
labelPath: null,
|
|
24
|
-
external: false,
|
|
25
|
-
target: null,
|
|
26
|
-
placeholder: null
|
|
27
|
-
};
|
|
28
|
-
var Link = function Link(_ref) {
|
|
29
|
-
var item = _ref.item,
|
|
30
|
-
label = _ref.label,
|
|
31
|
-
labelPath = _ref.labelPath,
|
|
32
|
-
value = _ref.value,
|
|
33
|
-
external = _ref.external,
|
|
34
|
-
target = _ref.target,
|
|
35
|
-
placeholder = _ref.placeholder;
|
|
7
|
+
function Link(_ref) {
|
|
8
|
+
var _ref$item = _ref.item,
|
|
9
|
+
item = _ref$item === void 0 ? null : _ref$item,
|
|
10
|
+
_ref$label = _ref.label,
|
|
11
|
+
label = _ref$label === void 0 ? null : _ref$label,
|
|
12
|
+
_ref$labelPath = _ref.labelPath,
|
|
13
|
+
labelPath = _ref$labelPath === void 0 ? null : _ref$labelPath,
|
|
14
|
+
_ref$value = _ref.value,
|
|
15
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
16
|
+
_ref$external = _ref.external,
|
|
17
|
+
external = _ref$external === void 0 ? false : _ref$external,
|
|
18
|
+
_ref$target = _ref.target,
|
|
19
|
+
target = _ref$target === void 0 ? null : _ref$target,
|
|
20
|
+
_ref$placeholder = _ref.placeholder,
|
|
21
|
+
placeholder = _ref$placeholder === void 0 ? null : _ref$placeholder;
|
|
36
22
|
var itemLabel = get(item, labelPath);
|
|
37
23
|
var finalValue = itemLabel || label || placeholder || /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
38
24
|
id: "e0xuLo",
|
|
@@ -49,8 +35,6 @@ var Link = function Link(_ref) {
|
|
|
49
35
|
}, finalValue) : /*#__PURE__*/React.createElement(Link$1, {
|
|
50
36
|
href: value
|
|
51
37
|
}, finalValue);
|
|
52
|
-
}
|
|
53
|
-
Link.propTypes = propTypes;
|
|
54
|
-
Link.defaultProps = defaultProps;
|
|
38
|
+
}
|
|
55
39
|
|
|
56
40
|
export { Link as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/display-link",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Link item value 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.1",
|
|
53
|
+
"@panneau/themes": "^4.0.1",
|
|
54
54
|
"lodash-es": "^4.17.21",
|
|
55
55
|
"prop-types": "^15.7.2",
|
|
56
|
-
"react-intl": "^5.15.8
|
|
56
|
+
"react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0",
|
|
57
57
|
"wouter": "^3.1.2"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "dbdf65640625c027ecd56cf2b816b80a5c38cb8d"
|
|
63
63
|
}
|