@atlaskit/smart-card 20.1.3 → 21.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 21.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`919a3124eb8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/919a3124eb8) - turn off autofocus for hover card
8
+
9
+ ## 21.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 20.1.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [`8df009f4313`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8df009f4313) - fix metadata status for prefetching
20
+
3
21
  ## 20.1.3
4
22
 
5
23
  ### Patch Changes
@@ -15,6 +15,8 @@ var _react = require("react");
15
15
 
16
16
  var _linkProvider = require("@atlaskit/link-provider");
17
17
 
18
+ var _linkingCommon = require("@atlaskit/linking-common");
19
+
18
20
  function usePrefetch(url) {
19
21
  var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
20
22
  store = _useSmartLinkContext.store,
@@ -70,7 +72,12 @@ function usePrefetch(url) {
70
72
  type: 'resolved',
71
73
  url: url,
72
74
  payload: response
73
- });
75
+ }); // Put the metadata in resolved state, theres no need for a pending or errored state as
76
+ // we are following the same render flow as described by the comments above and below.
77
+
78
+ dispatch((0, _linkingCommon.cardAction)(_linkingCommon.ACTION_UPDATE_METADATA_STATUS, {
79
+ url: url
80
+ }, undefined, undefined, 'resolved'));
74
81
  }
75
82
 
76
83
  _context.next = 14;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "20.1.3",
3
+ "version": "21.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -135,6 +135,7 @@ var HoverCardComponent = function HoverCardComponent(_ref) {
135
135
  onClose: hideCard,
136
136
  placement: "bottom-start",
137
137
  offset: popupOffset.current,
138
+ autoFocus: false,
138
139
  content: function content(_ref2) {
139
140
  var update = _ref2.update;
140
141
  return (0, _core.jsx)("div", {
@@ -1,5 +1,6 @@
1
1
  import { useCallback } from 'react';
2
2
  import { useSmartLinkContext } from '@atlaskit/link-provider';
3
+ import { ACTION_UPDATE_METADATA_STATUS, cardAction } from '@atlaskit/linking-common';
3
4
  export function usePrefetch(url) {
4
5
  const {
5
6
  store,
@@ -45,7 +46,12 @@ export function usePrefetch(url) {
45
46
  type: 'resolved',
46
47
  url,
47
48
  payload: response
48
- });
49
+ }); // Put the metadata in resolved state, theres no need for a pending or errored state as
50
+ // we are following the same render flow as described by the comments above and below.
51
+
52
+ dispatch(cardAction(ACTION_UPDATE_METADATA_STATUS, {
53
+ url
54
+ }, undefined, undefined, 'resolved'));
49
55
  }
50
56
  } catch (_err) {// Do nothing, link will be retried under the hood with exponential backoff.
51
57
  // If it does not succeed even after those retries, the normal resolve flow
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "20.1.3",
3
+ "version": "21.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -99,6 +99,7 @@ export const HoverCardComponent = ({
99
99
  onClose: hideCard,
100
100
  placement: "bottom-start",
101
101
  offset: popupOffset.current,
102
+ autoFocus: false,
102
103
  content: ({
103
104
  update
104
105
  }) => jsx("div", {
@@ -2,6 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { useCallback } from 'react';
4
4
  import { useSmartLinkContext } from '@atlaskit/link-provider';
5
+ import { ACTION_UPDATE_METADATA_STATUS, cardAction } from '@atlaskit/linking-common';
5
6
  export function usePrefetch(url) {
6
7
  var _useSmartLinkContext = useSmartLinkContext(),
7
8
  store = _useSmartLinkContext.store,
@@ -57,7 +58,12 @@ export function usePrefetch(url) {
57
58
  type: 'resolved',
58
59
  url: url,
59
60
  payload: response
60
- });
61
+ }); // Put the metadata in resolved state, theres no need for a pending or errored state as
62
+ // we are following the same render flow as described by the comments above and below.
63
+
64
+ dispatch(cardAction(ACTION_UPDATE_METADATA_STATUS, {
65
+ url: url
66
+ }, undefined, undefined, 'resolved'));
61
67
  }
62
68
 
63
69
  _context.next = 14;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "20.1.3",
3
+ "version": "21.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -108,6 +108,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
108
108
  onClose: hideCard,
109
109
  placement: "bottom-start",
110
110
  offset: popupOffset.current,
111
+ autoFocus: false,
111
112
  content: function content(_ref2) {
112
113
  var update = _ref2.update;
113
114
  return jsx("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "20.1.3",
3
+ "version": "21.0.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/icon-object": "^6.2.0",
34
34
  "@atlaskit/icon-priority": "^6.3.0",
35
35
  "@atlaskit/in-product-testing": "^0.1.0",
36
- "@atlaskit/linking-common": "^1.4.0",
36
+ "@atlaskit/linking-common": "^1.5.0",
37
37
  "@atlaskit/logo": "^13.8.0",
38
38
  "@atlaskit/lozenge": "^11.1.0",
39
39
  "@atlaskit/media-common": "^2.15.0",
@@ -58,7 +58,7 @@
58
58
  "uuid": "^3.1.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/link-provider": "^1.1.5",
61
+ "@atlaskit/link-provider": "^1.2.0",
62
62
  "react": "^16.8.0",
63
63
  "react-dom": "^16.8.0",
64
64
  "react-intl-next": "npm:react-intl@^5.18.1"