@atlaskit/smart-card 41.0.6 → 42.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.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +12 -7
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +6 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +12 -7
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 42.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`ad77adef566c2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ad77adef566c2) -
|
|
8
|
+
For short links on a confluence page, use resolved url for preview panels
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 41.0.6
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -54,24 +54,29 @@ var extractInvokePreviewAction = exports.extractInvokePreviewAction = function e
|
|
|
54
54
|
invokeAction: {
|
|
55
55
|
actionFn: function () {
|
|
56
56
|
var _actionFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
57
|
-
var _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
57
|
+
var resolvedUrl, responseUrl, _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
58
58
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
59
59
|
while (1) switch (_context.prev = _context.next) {
|
|
60
60
|
case 0:
|
|
61
61
|
if (!hasPreviewPanel) {
|
|
62
|
-
_context.next =
|
|
62
|
+
_context.next = 6;
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
|
+
resolvedUrl = url;
|
|
66
|
+
if ((0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
67
|
+
responseUrl = response.data && 'url' in response.data ? response.data.url : undefined;
|
|
68
|
+
resolvedUrl = responseUrl || url;
|
|
69
|
+
}
|
|
65
70
|
openPreviewPanel({
|
|
66
71
|
ari: ari,
|
|
67
|
-
url:
|
|
72
|
+
url: resolvedUrl,
|
|
68
73
|
name: name,
|
|
69
74
|
iconUrl: undefined
|
|
70
75
|
});
|
|
71
|
-
_context.next =
|
|
76
|
+
_context.next = 8;
|
|
72
77
|
break;
|
|
73
|
-
case
|
|
74
|
-
_context.next =
|
|
78
|
+
case 6:
|
|
79
|
+
_context.next = 8;
|
|
75
80
|
return (0, _utils.openEmbedModal)(_objectSpread({
|
|
76
81
|
fireEvent: fireEvent,
|
|
77
82
|
extensionKey: extensionKey,
|
|
@@ -91,7 +96,7 @@ var extractInvokePreviewAction = exports.extractInvokePreviewAction = function e
|
|
|
91
96
|
}, (0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') && {
|
|
92
97
|
isInPreviewPanel: isInPreviewPanel
|
|
93
98
|
}));
|
|
94
|
-
case
|
|
99
|
+
case 8:
|
|
95
100
|
case "end":
|
|
96
101
|
return _context.stop();
|
|
97
102
|
}
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "
|
|
14
|
+
packageVersion: "41.0.6"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -25,7 +25,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
25
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
26
|
var PACKAGE_DATA = {
|
|
27
27
|
packageName: "@atlaskit/smart-card",
|
|
28
|
-
packageVersion: "
|
|
28
|
+
packageVersion: "41.0.6",
|
|
29
29
|
componentName: 'linkUrl'
|
|
30
30
|
};
|
|
31
31
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -44,9 +44,14 @@ export const extractInvokePreviewAction = param => {
|
|
|
44
44
|
invokeAction: {
|
|
45
45
|
actionFn: async () => {
|
|
46
46
|
if (hasPreviewPanel) {
|
|
47
|
+
let resolvedUrl = url;
|
|
48
|
+
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
49
|
+
const responseUrl = response.data && 'url' in response.data ? response.data.url : undefined;
|
|
50
|
+
resolvedUrl = responseUrl || url;
|
|
51
|
+
}
|
|
47
52
|
openPreviewPanel({
|
|
48
53
|
ari: ari,
|
|
49
|
-
url:
|
|
54
|
+
url: resolvedUrl,
|
|
50
55
|
name: name,
|
|
51
56
|
iconUrl: undefined
|
|
52
57
|
});
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "
|
|
5
|
+
packageVersion: "41.0.6"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
const PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "
|
|
16
|
+
packageVersion: "41.0.6",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -47,24 +47,29 @@ export var extractInvokePreviewAction = function extractInvokePreviewAction(para
|
|
|
47
47
|
invokeAction: {
|
|
48
48
|
actionFn: function () {
|
|
49
49
|
var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
50
|
-
var _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
50
|
+
var resolvedUrl, responseUrl, _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
51
51
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
52
52
|
while (1) switch (_context.prev = _context.next) {
|
|
53
53
|
case 0:
|
|
54
54
|
if (!hasPreviewPanel) {
|
|
55
|
-
_context.next =
|
|
55
|
+
_context.next = 6;
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
|
+
resolvedUrl = url;
|
|
59
|
+
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
60
|
+
responseUrl = response.data && 'url' in response.data ? response.data.url : undefined;
|
|
61
|
+
resolvedUrl = responseUrl || url;
|
|
62
|
+
}
|
|
58
63
|
openPreviewPanel({
|
|
59
64
|
ari: ari,
|
|
60
|
-
url:
|
|
65
|
+
url: resolvedUrl,
|
|
61
66
|
name: name,
|
|
62
67
|
iconUrl: undefined
|
|
63
68
|
});
|
|
64
|
-
_context.next =
|
|
69
|
+
_context.next = 8;
|
|
65
70
|
break;
|
|
66
|
-
case
|
|
67
|
-
_context.next =
|
|
71
|
+
case 6:
|
|
72
|
+
_context.next = 8;
|
|
68
73
|
return openEmbedModal(_objectSpread({
|
|
69
74
|
fireEvent: fireEvent,
|
|
70
75
|
extensionKey: extensionKey,
|
|
@@ -84,7 +89,7 @@ export var extractInvokePreviewAction = function extractInvokePreviewAction(para
|
|
|
84
89
|
}, expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && {
|
|
85
90
|
isInPreviewPanel: isInPreviewPanel
|
|
86
91
|
}));
|
|
87
|
-
case
|
|
92
|
+
case 8:
|
|
88
93
|
case "end":
|
|
89
94
|
return _context.stop();
|
|
90
95
|
}
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "
|
|
7
|
+
packageVersion: "41.0.6"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -16,7 +16,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
16
16
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
17
17
|
var PACKAGE_DATA = {
|
|
18
18
|
packageName: "@atlaskit/smart-card",
|
|
19
|
-
packageVersion: "
|
|
19
|
+
packageVersion: "41.0.6",
|
|
20
20
|
componentName: 'linkUrl'
|
|
21
21
|
};
|
|
22
22
|
var Anchor = withLinkClickedEvent('a');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "42.0.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/css": "^0.14.0",
|
|
38
38
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
39
39
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
40
|
-
"@atlaskit/form": "^12.
|
|
40
|
+
"@atlaskit/form": "^12.7.0",
|
|
41
41
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
42
42
|
"@atlaskit/heading": "^5.2.0",
|
|
43
43
|
"@atlaskit/icon": "^28.2.0",
|