@panneau/display-link 3.0.308 → 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.
Files changed (2) hide show
  1. package/es/index.js +16 -32
  2. 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
- var propTypes = {
9
- item: PropTypes.shape({
10
- id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
11
- }),
12
- value: PropTypes.string,
13
- label: PropTypes.string,
14
- labelPath: PropTypes.string,
15
- external: PropTypes.bool,
16
- target: PropTypes.string,
17
- placeholder: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
18
- };
19
- var defaultProps = {
20
- item: null,
21
- value: null,
22
- label: null,
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.0.308",
3
+ "version": "4.0.0",
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": "^3.0.307",
53
- "@panneau/themes": "^3.0.308",
52
+ "@panneau/core": "^4.0.0",
53
+ "@panneau/themes": "^4.0.0",
54
54
  "lodash-es": "^4.17.21",
55
55
  "prop-types": "^15.7.2",
56
- "react-intl": "^5.15.8||^6.0.0",
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": "8711276a09fcda499a4a2f206554f9cd995976f5"
62
+ "gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
63
63
  }