@atlaskit/link-datasource 1.4.5 → 1.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#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
14
+
3
15
  ## 1.4.5
4
16
 
5
17
  ### Patch Changes
@@ -8,6 +8,6 @@ var EVENT_CHANNEL = 'media';
8
8
  exports.EVENT_CHANNEL = EVENT_CHANNEL;
9
9
  var packageMetaData = {
10
10
  packageName: "@atlaskit/link-datasource",
11
- packageVersion: "1.4.5"
11
+ packageVersion: "1.5.1"
12
12
  };
13
13
  exports.packageMetaData = packageMetaData;
@@ -231,7 +231,7 @@ var analyticsContextAttributes = {
231
231
  };
232
232
  var analyticsContextData = {
233
233
  packageName: "@atlaskit/link-datasource",
234
- packageVersion: "1.4.5",
234
+ packageVersion: "1.5.1",
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(_linkUrl.default, {
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,5 @@
1
1
  export const EVENT_CHANNEL = 'media';
2
2
  export const packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.4.5"
4
+ packageVersion: "1.5.1"
5
5
  };
@@ -205,7 +205,7 @@ const analyticsContextAttributes = {
205
205
  };
206
206
  const analyticsContextData = {
207
207
  packageName: "@atlaskit/link-datasource",
208
- packageVersion: "1.4.5",
208
+ packageVersion: "1.5.1",
209
209
  source: 'datasourceConfigModal'
210
210
  };
211
211
  const contextData = {
@@ -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(LinkUrl, {
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,
@@ -1,5 +1,5 @@
1
1
  export var EVENT_CHANNEL = 'media';
2
2
  export var packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.4.5"
4
+ packageVersion: "1.5.1"
5
5
  };
@@ -222,7 +222,7 @@ var analyticsContextAttributes = {
222
222
  };
223
223
  var analyticsContextData = {
224
224
  packageName: "@atlaskit/link-datasource",
225
- packageVersion: "1.4.5",
225
+ packageVersion: "1.5.1",
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(LinkUrl, {
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.4.5",
3
+ "version": "1.5.1",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/smart-card": "^26.31.0",
58
58
  "@atlaskit/spinner": "^15.6.0",
59
59
  "@atlaskit/tag": "^11.6.0",
60
- "@atlaskit/textfield": "5.6.7",
60
+ "@atlaskit/textfield": "5.6.8",
61
61
  "@atlaskit/theme": "^12.6.0",
62
62
  "@atlaskit/tokens": "^1.25.0",
63
63
  "@atlaskit/tooltip": "^17.8.0",