@atlaskit/link-datasource 1.4.5 → 1.5.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/CHANGELOG.md +6 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/assets-modal/modal/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/render-type/link/index.js +6 -2
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/render-type/link/index.js +6 -2
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/assets-modal/modal/index.js +1 -1
- package/dist/esm/ui/issue-like-table/render-type/link/index.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#40840](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40840) [`66c9f6469c5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/66c9f6469c5) - [ux] Wrap link values in smart link hover card component
|
|
8
|
+
|
|
3
9
|
## 1.4.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -231,7 +231,7 @@ var analyticsContextAttributes = {
|
|
|
231
231
|
};
|
|
232
232
|
var analyticsContextData = {
|
|
233
233
|
packageName: "@atlaskit/link-datasource",
|
|
234
|
-
packageVersion: "1.
|
|
234
|
+
packageVersion: "1.5.0",
|
|
235
235
|
source: 'datasourceConfigModal'
|
|
236
236
|
};
|
|
237
237
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -9,6 +9,7 @@ exports.default = exports.LINK_TYPE_TEST_ID = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _smartCard = require("@atlaskit/smart-card");
|
|
12
|
+
var _hoverCard = require("@atlaskit/smart-card/hover-card");
|
|
12
13
|
var _linkUrl = _interopRequireDefault(require("@atlaskit/smart-card/link-url"));
|
|
13
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
15
|
var _typography = require("@atlaskit/theme/typography");
|
|
@@ -36,14 +37,17 @@ var LinkRenderType = function LinkRenderType(_ref) {
|
|
|
36
37
|
return (style === null || style === void 0 ? void 0 : style.appearance) && linkStyles[style.appearance] || {};
|
|
37
38
|
}, [style]);
|
|
38
39
|
var anchor = (0, _react.useMemo)(function () {
|
|
39
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_hoverCard.HoverCard, {
|
|
41
|
+
url: url,
|
|
42
|
+
showServerActions: true
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_linkUrl.default, {
|
|
40
44
|
href: url,
|
|
41
45
|
style: _objectSpread(_objectSpread({}, linkStyle), {}, {
|
|
42
46
|
fontSize: _styled.FieldTextFontSize
|
|
43
47
|
}),
|
|
44
48
|
"data-testid": testId,
|
|
45
49
|
target: "_blank"
|
|
46
|
-
}, text || url);
|
|
50
|
+
}, text || url));
|
|
47
51
|
}, [linkStyle, url, text, testId]);
|
|
48
52
|
var SmartCard = function SmartCard() {
|
|
49
53
|
return /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { Card } from '@atlaskit/smart-card';
|
|
3
|
+
import { HoverCard } from '@atlaskit/smart-card/hover-card';
|
|
3
4
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
4
5
|
import { N300 } from '@atlaskit/theme/colors';
|
|
5
6
|
import { h300 } from '@atlaskit/theme/typography';
|
|
@@ -22,7 +23,10 @@ const LinkRenderType = ({
|
|
|
22
23
|
const linkStyle = useMemo(() => {
|
|
23
24
|
return (style === null || style === void 0 ? void 0 : style.appearance) && linkStyles[style.appearance] || {};
|
|
24
25
|
}, [style]);
|
|
25
|
-
const anchor = useMemo(() => /*#__PURE__*/React.createElement(
|
|
26
|
+
const anchor = useMemo(() => /*#__PURE__*/React.createElement(HoverCard, {
|
|
27
|
+
url: url,
|
|
28
|
+
showServerActions: true
|
|
29
|
+
}, /*#__PURE__*/React.createElement(LinkUrl, {
|
|
26
30
|
href: url,
|
|
27
31
|
style: {
|
|
28
32
|
...linkStyle,
|
|
@@ -30,7 +34,7 @@ const LinkRenderType = ({
|
|
|
30
34
|
},
|
|
31
35
|
"data-testid": testId,
|
|
32
36
|
target: "_blank"
|
|
33
|
-
}, text || url), [linkStyle, url, text, testId]);
|
|
37
|
+
}, text || url)), [linkStyle, url, text, testId]);
|
|
34
38
|
const SmartCard = () => /*#__PURE__*/React.createElement(Card, {
|
|
35
39
|
appearance: "inline",
|
|
36
40
|
url: url,
|
|
@@ -222,7 +222,7 @@ var analyticsContextAttributes = {
|
|
|
222
222
|
};
|
|
223
223
|
var analyticsContextData = {
|
|
224
224
|
packageName: "@atlaskit/link-datasource",
|
|
225
|
-
packageVersion: "1.
|
|
225
|
+
packageVersion: "1.5.0",
|
|
226
226
|
source: 'datasourceConfigModal'
|
|
227
227
|
};
|
|
228
228
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -3,6 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { Card } from '@atlaskit/smart-card';
|
|
6
|
+
import { HoverCard } from '@atlaskit/smart-card/hover-card';
|
|
6
7
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
7
8
|
import { N300 } from '@atlaskit/theme/colors';
|
|
8
9
|
import { h300 } from '@atlaskit/theme/typography';
|
|
@@ -25,14 +26,17 @@ var LinkRenderType = function LinkRenderType(_ref) {
|
|
|
25
26
|
return (style === null || style === void 0 ? void 0 : style.appearance) && linkStyles[style.appearance] || {};
|
|
26
27
|
}, [style]);
|
|
27
28
|
var anchor = useMemo(function () {
|
|
28
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
+
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
30
|
+
url: url,
|
|
31
|
+
showServerActions: true
|
|
32
|
+
}, /*#__PURE__*/React.createElement(LinkUrl, {
|
|
29
33
|
href: url,
|
|
30
34
|
style: _objectSpread(_objectSpread({}, linkStyle), {}, {
|
|
31
35
|
fontSize: FieldTextFontSize
|
|
32
36
|
}),
|
|
33
37
|
"data-testid": testId,
|
|
34
38
|
target: "_blank"
|
|
35
|
-
}, text || url);
|
|
39
|
+
}, text || url));
|
|
36
40
|
}, [linkStyle, url, text, testId]);
|
|
37
41
|
var SmartCard = function SmartCard() {
|
|
38
42
|
return /*#__PURE__*/React.createElement(Card, {
|