@atlaskit/smart-card 46.5.0 → 46.5.2
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 +17 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/Frame.js +7 -22
- package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/index.js +7 -12
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/Frame.js +6 -21
- package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/index.js +7 -12
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/Frame.js +7 -22
- package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/index.js +7 -12
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 46.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6bab83f8b76de`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6bab83f8b76de) -
|
|
8
|
+
Remove the unused `jpx-1074-smart-links-iframe` feature gate, preserving the existing
|
|
9
|
+
document-based iframe focus handling.
|
|
10
|
+
|
|
11
|
+
## 46.5.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`c2a714462c2d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c2a714462c2d1) -
|
|
16
|
+
Update One Click Chat Spotlight V2 body and CTA copy behind
|
|
17
|
+
platform_sl_one_click_chat_spotlight_v2_fg.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 46.5.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
25
25
|
var context = exports.context = {
|
|
26
26
|
componentName: 'smart-cards',
|
|
27
27
|
packageName: "@atlaskit/smart-card" || '',
|
|
28
|
-
packageVersion: "46.
|
|
28
|
+
packageVersion: "46.5.1" || ''
|
|
29
29
|
};
|
|
30
30
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
31
31
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,8 +12,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
15
|
-
var _browserApis = require("@atlaskit/browser-apis");
|
|
16
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
15
|
var _getIframeSandboxAttribute = require("../../../utils/get-iframe-sandbox-attribute");
|
|
18
16
|
var _IFrame = require("./IFrame");
|
|
19
17
|
var _IframeDwellTracker = require("./IframeDwellTracker");
|
|
@@ -32,7 +30,6 @@ function mergeRefs(refs) {
|
|
|
32
30
|
}
|
|
33
31
|
var iframeStyles = null;
|
|
34
32
|
var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_ref, iframeRef) {
|
|
35
|
-
var _doc$hasFocus;
|
|
36
33
|
var url = _ref.url,
|
|
37
34
|
_ref$isTrusted = _ref.isTrusted,
|
|
38
35
|
isTrusted = _ref$isTrusted === void 0 ? false : _ref$isTrusted,
|
|
@@ -44,7 +41,6 @@ var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
|
44
41
|
isMouseOverProp = _ref.isMouseOver,
|
|
45
42
|
title = _ref.title,
|
|
46
43
|
extensionKey = _ref.extensionKey;
|
|
47
|
-
var doc = (0, _browserApis.getDocument)();
|
|
48
44
|
var _useState = (0, _react.useState)(false),
|
|
49
45
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
50
46
|
isIframeLoaded = _useState2[0],
|
|
@@ -59,10 +55,8 @@ var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
|
59
55
|
// _or_
|
|
60
56
|
// we can default to false, and set this state once the frame ref is available in a useEffect (safer IMO)
|
|
61
57
|
// which already seems to be existing behavior in a useEffect below.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
65
|
-
(0, _fg.fg)('jpx-1074-smart-links-iframe') ? (_doc$hasFocus = doc === null || doc === void 0 ? void 0 : doc.hasFocus()) !== null && _doc$hasFocus !== void 0 ? _doc$hasFocus : false : document.hasFocus()),
|
|
58
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
59
|
+
var _useState5 = (0, _react.useState)(document.hasFocus()),
|
|
66
60
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
67
61
|
isWindowFocused = _useState6[0],
|
|
68
62
|
setWindowFocused = _useState6[1];
|
|
@@ -101,23 +95,14 @@ var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
|
101
95
|
};
|
|
102
96
|
}, [threshold, mergedRef]);
|
|
103
97
|
(0, _react.useEffect)(function () {
|
|
104
|
-
var _doc$hasFocus2;
|
|
105
98
|
// Initialize with current focus state
|
|
106
|
-
// The below will be removed as part of FG cleanup
|
|
107
99
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
108
|
-
setWindowFocused(
|
|
100
|
+
setWindowFocused(document.hasFocus());
|
|
109
101
|
var onBlur = function onBlur() {
|
|
110
102
|
setWindowFocused(false);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
} else {
|
|
116
|
-
// The below will be removed as part of FG cleanup
|
|
117
|
-
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
118
|
-
if (document.activeElement === ref.current) {
|
|
119
|
-
onIframeFocus && onIframeFocus();
|
|
120
|
-
}
|
|
103
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
104
|
+
if (document.activeElement === ref.current) {
|
|
105
|
+
onIframeFocus && onIframeFocus();
|
|
121
106
|
}
|
|
122
107
|
};
|
|
123
108
|
var onFocus = function onFocus() {
|
|
@@ -129,7 +114,7 @@ var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
|
129
114
|
window.removeEventListener('blur', onBlur);
|
|
130
115
|
window.removeEventListener('focus', onFocus);
|
|
131
116
|
};
|
|
132
|
-
}, [ref, onIframeFocus
|
|
117
|
+
}, [ref, onIframeFocus]);
|
|
133
118
|
if (!url) {
|
|
134
119
|
return null;
|
|
135
120
|
}
|
|
@@ -36,15 +36,10 @@ var messages = (0, _reactIntl.defineMessages)({
|
|
|
36
36
|
defaultMessage: 'Explore this link with Rovo',
|
|
37
37
|
description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
id: 'smart-card.one-click-chat-spotlight-v2.
|
|
41
|
-
defaultMessage: '
|
|
42
|
-
description: 'Spotlight
|
|
43
|
-
},
|
|
44
|
-
github: {
|
|
45
|
-
id: 'smart-card.one-click-chat-spotlight-v2.github.ai-non-final',
|
|
46
|
-
defaultMessage: 'Discover insights from your GitHub Smart Link using Rovo',
|
|
47
|
-
description: 'Spotlight text explaining that the inline action explains the linked GitHub code.'
|
|
39
|
+
body: {
|
|
40
|
+
id: 'smart-card.one-click-chat-spotlight-v2.takeaways-body.ai-non-final',
|
|
41
|
+
defaultMessage: 'Get key decisions and next steps from this link',
|
|
42
|
+
description: 'Spotlight body inviting users to get key decisions and next steps from a linked document or code using Rovo.'
|
|
48
43
|
},
|
|
49
44
|
dismiss: {
|
|
50
45
|
id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
|
|
@@ -52,8 +47,8 @@ var messages = (0, _reactIntl.defineMessages)({
|
|
|
52
47
|
description: 'Dismiss button in the Smart Link spotlight. Hides this spotlight for seven days.'
|
|
53
48
|
},
|
|
54
49
|
action: {
|
|
55
|
-
id: 'smart-card.one-click-chat-spotlight-v2.
|
|
56
|
-
defaultMessage: '
|
|
50
|
+
id: 'smart-card.one-click-chat-spotlight-v2.see-takeaways.ai-non-final',
|
|
51
|
+
defaultMessage: 'See takeaways',
|
|
57
52
|
description: 'Button in the spotlight that invokes the same Rovo action as the highlighted inline button.'
|
|
58
53
|
}
|
|
59
54
|
});
|
|
@@ -278,7 +273,7 @@ function OneClickChatSpotlight(_ref3) {
|
|
|
278
273
|
content: function content() {
|
|
279
274
|
return /*#__PURE__*/_react.default.createElement(VisibleSpotlightCard, {
|
|
280
275
|
onShown: spotlight.onShown,
|
|
281
|
-
body: intl.formatMessage(
|
|
276
|
+
body: intl.formatMessage(messages.body),
|
|
282
277
|
dismissLabel: intl.formatMessage(messages.dismiss),
|
|
283
278
|
actionLabel: intl.formatMessage(messages.action),
|
|
284
279
|
onDismiss: spotlight.onDismiss,
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "46.
|
|
22
|
+
packageVersion: "46.5.1",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "46.
|
|
7
|
+
packageVersion: "46.5.1" || ''
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -6,8 +6,6 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
6
6
|
// eslint-disable-next-line no-unused-vars
|
|
7
7
|
|
|
8
8
|
import { di } from 'react-magnetic-di';
|
|
9
|
-
import { getDocument } from '@atlaskit/browser-apis';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
9
|
import { getIframeSandboxAttribute } from '../../../utils/get-iframe-sandbox-attribute';
|
|
12
10
|
import { IFrame } from './IFrame';
|
|
13
11
|
import { IframeDwellTracker } from './IframeDwellTracker';
|
|
@@ -35,8 +33,6 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
|
|
|
35
33
|
title,
|
|
36
34
|
extensionKey
|
|
37
35
|
}, iframeRef) => {
|
|
38
|
-
var _doc$hasFocus;
|
|
39
|
-
const doc = getDocument();
|
|
40
36
|
const [isIframeLoaded, setIframeLoaded] = useState(false);
|
|
41
37
|
const [isMouseOver, setMouseOver] = useState(false);
|
|
42
38
|
// Accessing the document here for SSR where document.hasFocus may be absent breaks SSR
|
|
@@ -45,10 +41,8 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
|
|
|
45
41
|
// _or_
|
|
46
42
|
// we can default to false, and set this state once the frame ref is available in a useEffect (safer IMO)
|
|
47
43
|
// which already seems to be existing behavior in a useEffect below.
|
|
48
|
-
const [isWindowFocused, setWindowFocused] = useState(
|
|
49
|
-
// The below will be removed as part of FG cleanup
|
|
50
44
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
51
|
-
|
|
45
|
+
const [isWindowFocused, setWindowFocused] = useState(document.hasFocus());
|
|
52
46
|
|
|
53
47
|
// Use prop if provided (from wrapper), otherwise use local state (for backward compatibility)
|
|
54
48
|
const effectiveMouseOver = isMouseOverProp !== undefined ? isMouseOverProp : isMouseOver;
|
|
@@ -79,23 +73,14 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
|
|
|
79
73
|
};
|
|
80
74
|
}, [threshold, mergedRef]);
|
|
81
75
|
useEffect(() => {
|
|
82
|
-
var _doc$hasFocus2;
|
|
83
76
|
// Initialize with current focus state
|
|
84
|
-
// The below will be removed as part of FG cleanup
|
|
85
77
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
86
|
-
setWindowFocused(
|
|
78
|
+
setWindowFocused(document.hasFocus());
|
|
87
79
|
const onBlur = () => {
|
|
88
80
|
setWindowFocused(false);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
// The below will be removed as part of FG cleanup
|
|
95
|
-
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
96
|
-
if (document.activeElement === ref.current) {
|
|
97
|
-
onIframeFocus && onIframeFocus();
|
|
98
|
-
}
|
|
81
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
82
|
+
if (document.activeElement === ref.current) {
|
|
83
|
+
onIframeFocus && onIframeFocus();
|
|
99
84
|
}
|
|
100
85
|
};
|
|
101
86
|
const onFocus = () => {
|
|
@@ -107,7 +92,7 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
|
|
|
107
92
|
window.removeEventListener('blur', onBlur);
|
|
108
93
|
window.removeEventListener('focus', onFocus);
|
|
109
94
|
};
|
|
110
|
-
}, [ref, onIframeFocus
|
|
95
|
+
}, [ref, onIframeFocus]);
|
|
111
96
|
if (!url) {
|
|
112
97
|
return null;
|
|
113
98
|
}
|
|
@@ -24,15 +24,10 @@ const messages = defineMessages({
|
|
|
24
24
|
defaultMessage: 'Explore this link with Rovo',
|
|
25
25
|
description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
id: 'smart-card.one-click-chat-spotlight-v2.
|
|
29
|
-
defaultMessage: '
|
|
30
|
-
description: 'Spotlight
|
|
31
|
-
},
|
|
32
|
-
github: {
|
|
33
|
-
id: 'smart-card.one-click-chat-spotlight-v2.github.ai-non-final',
|
|
34
|
-
defaultMessage: 'Discover insights from your GitHub Smart Link using Rovo',
|
|
35
|
-
description: 'Spotlight text explaining that the inline action explains the linked GitHub code.'
|
|
27
|
+
body: {
|
|
28
|
+
id: 'smart-card.one-click-chat-spotlight-v2.takeaways-body.ai-non-final',
|
|
29
|
+
defaultMessage: 'Get key decisions and next steps from this link',
|
|
30
|
+
description: 'Spotlight body inviting users to get key decisions and next steps from a linked document or code using Rovo.'
|
|
36
31
|
},
|
|
37
32
|
dismiss: {
|
|
38
33
|
id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
|
|
@@ -40,8 +35,8 @@ const messages = defineMessages({
|
|
|
40
35
|
description: 'Dismiss button in the Smart Link spotlight. Hides this spotlight for seven days.'
|
|
41
36
|
},
|
|
42
37
|
action: {
|
|
43
|
-
id: 'smart-card.one-click-chat-spotlight-v2.
|
|
44
|
-
defaultMessage: '
|
|
38
|
+
id: 'smart-card.one-click-chat-spotlight-v2.see-takeaways.ai-non-final',
|
|
39
|
+
defaultMessage: 'See takeaways',
|
|
45
40
|
description: 'Button in the spotlight that invokes the same Rovo action as the highlighted inline button.'
|
|
46
41
|
}
|
|
47
42
|
});
|
|
@@ -253,7 +248,7 @@ export function OneClickChatSpotlight({
|
|
|
253
248
|
}, children),
|
|
254
249
|
content: () => /*#__PURE__*/React.createElement(VisibleSpotlightCard, {
|
|
255
250
|
onShown: spotlight.onShown,
|
|
256
|
-
body: intl.formatMessage(
|
|
251
|
+
body: intl.formatMessage(messages.body),
|
|
257
252
|
dismissLabel: intl.formatMessage(messages.dismiss),
|
|
258
253
|
actionLabel: intl.formatMessage(messages.action),
|
|
259
254
|
onDismiss: spotlight.onDismiss,
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "46.
|
|
12
|
+
packageVersion: "46.5.1",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -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: "46.
|
|
7
|
+
packageVersion: "46.5.1" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -7,8 +7,6 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line no-unused-vars
|
|
8
8
|
|
|
9
9
|
import { di } from 'react-magnetic-di';
|
|
10
|
-
import { getDocument } from '@atlaskit/browser-apis';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
10
|
import { getIframeSandboxAttribute } from '../../../utils/get-iframe-sandbox-attribute';
|
|
13
11
|
import { IFrame } from './IFrame';
|
|
14
12
|
import { IframeDwellTracker } from './IframeDwellTracker';
|
|
@@ -25,7 +23,6 @@ function mergeRefs(refs) {
|
|
|
25
23
|
}
|
|
26
24
|
var iframeStyles = null;
|
|
27
25
|
export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
28
|
-
var _doc$hasFocus;
|
|
29
26
|
var url = _ref.url,
|
|
30
27
|
_ref$isTrusted = _ref.isTrusted,
|
|
31
28
|
isTrusted = _ref$isTrusted === void 0 ? false : _ref$isTrusted,
|
|
@@ -37,7 +34,6 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
37
34
|
isMouseOverProp = _ref.isMouseOver,
|
|
38
35
|
title = _ref.title,
|
|
39
36
|
extensionKey = _ref.extensionKey;
|
|
40
|
-
var doc = getDocument();
|
|
41
37
|
var _useState = useState(false),
|
|
42
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
43
39
|
isIframeLoaded = _useState2[0],
|
|
@@ -52,10 +48,8 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
52
48
|
// _or_
|
|
53
49
|
// we can default to false, and set this state once the frame ref is available in a useEffect (safer IMO)
|
|
54
50
|
// which already seems to be existing behavior in a useEffect below.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
58
|
-
fg('jpx-1074-smart-links-iframe') ? (_doc$hasFocus = doc === null || doc === void 0 ? void 0 : doc.hasFocus()) !== null && _doc$hasFocus !== void 0 ? _doc$hasFocus : false : document.hasFocus()),
|
|
51
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
52
|
+
var _useState5 = useState(document.hasFocus()),
|
|
59
53
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
60
54
|
isWindowFocused = _useState6[0],
|
|
61
55
|
setWindowFocused = _useState6[1];
|
|
@@ -94,23 +88,14 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
94
88
|
};
|
|
95
89
|
}, [threshold, mergedRef]);
|
|
96
90
|
useEffect(function () {
|
|
97
|
-
var _doc$hasFocus2;
|
|
98
91
|
// Initialize with current focus state
|
|
99
|
-
// The below will be removed as part of FG cleanup
|
|
100
92
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
101
|
-
setWindowFocused(
|
|
93
|
+
setWindowFocused(document.hasFocus());
|
|
102
94
|
var onBlur = function onBlur() {
|
|
103
95
|
setWindowFocused(false);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
// The below will be removed as part of FG cleanup
|
|
110
|
-
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
111
|
-
if (document.activeElement === ref.current) {
|
|
112
|
-
onIframeFocus && onIframeFocus();
|
|
113
|
-
}
|
|
96
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
97
|
+
if (document.activeElement === ref.current) {
|
|
98
|
+
onIframeFocus && onIframeFocus();
|
|
114
99
|
}
|
|
115
100
|
};
|
|
116
101
|
var onFocus = function onFocus() {
|
|
@@ -122,7 +107,7 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
122
107
|
window.removeEventListener('blur', onBlur);
|
|
123
108
|
window.removeEventListener('focus', onFocus);
|
|
124
109
|
};
|
|
125
|
-
}, [ref, onIframeFocus
|
|
110
|
+
}, [ref, onIframeFocus]);
|
|
126
111
|
if (!url) {
|
|
127
112
|
return null;
|
|
128
113
|
}
|
|
@@ -27,15 +27,10 @@ var messages = defineMessages({
|
|
|
27
27
|
defaultMessage: 'Explore this link with Rovo',
|
|
28
28
|
description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
|
|
29
29
|
},
|
|
30
|
-
|
|
31
|
-
id: 'smart-card.one-click-chat-spotlight-v2.
|
|
32
|
-
defaultMessage: '
|
|
33
|
-
description: 'Spotlight
|
|
34
|
-
},
|
|
35
|
-
github: {
|
|
36
|
-
id: 'smart-card.one-click-chat-spotlight-v2.github.ai-non-final',
|
|
37
|
-
defaultMessage: 'Discover insights from your GitHub Smart Link using Rovo',
|
|
38
|
-
description: 'Spotlight text explaining that the inline action explains the linked GitHub code.'
|
|
30
|
+
body: {
|
|
31
|
+
id: 'smart-card.one-click-chat-spotlight-v2.takeaways-body.ai-non-final',
|
|
32
|
+
defaultMessage: 'Get key decisions and next steps from this link',
|
|
33
|
+
description: 'Spotlight body inviting users to get key decisions and next steps from a linked document or code using Rovo.'
|
|
39
34
|
},
|
|
40
35
|
dismiss: {
|
|
41
36
|
id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
|
|
@@ -43,8 +38,8 @@ var messages = defineMessages({
|
|
|
43
38
|
description: 'Dismiss button in the Smart Link spotlight. Hides this spotlight for seven days.'
|
|
44
39
|
},
|
|
45
40
|
action: {
|
|
46
|
-
id: 'smart-card.one-click-chat-spotlight-v2.
|
|
47
|
-
defaultMessage: '
|
|
41
|
+
id: 'smart-card.one-click-chat-spotlight-v2.see-takeaways.ai-non-final',
|
|
42
|
+
defaultMessage: 'See takeaways',
|
|
48
43
|
description: 'Button in the spotlight that invokes the same Rovo action as the highlighted inline button.'
|
|
49
44
|
}
|
|
50
45
|
});
|
|
@@ -269,7 +264,7 @@ export function OneClickChatSpotlight(_ref3) {
|
|
|
269
264
|
content: function content() {
|
|
270
265
|
return /*#__PURE__*/React.createElement(VisibleSpotlightCard, {
|
|
271
266
|
onShown: spotlight.onShown,
|
|
272
|
-
body: intl.formatMessage(
|
|
267
|
+
body: intl.formatMessage(messages.body),
|
|
273
268
|
dismissLabel: intl.formatMessage(messages.dismiss),
|
|
274
269
|
actionLabel: intl.formatMessage(messages.action),
|
|
275
270
|
onDismiss: spotlight.onDismiss,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "46.
|
|
15
|
+
packageVersion: "46.5.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "46.5.
|
|
3
|
+
"version": "46.5.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@atlaskit/popup": "^9.0.0",
|
|
83
83
|
"@atlaskit/primitives": "^22.5.0",
|
|
84
84
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
85
|
-
"@atlaskit/react-ufo": "^8.
|
|
86
|
-
"@atlaskit/rovo-triggers": "^11.
|
|
85
|
+
"@atlaskit/react-ufo": "^8.1.0",
|
|
86
|
+
"@atlaskit/rovo-triggers": "^11.10.0",
|
|
87
87
|
"@atlaskit/section-message": "^10.2.0",
|
|
88
88
|
"@atlaskit/select": "^23.1.0",
|
|
89
89
|
"@atlaskit/spinner": "^20.4.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@atlaskit/textfield": "^10.2.0",
|
|
94
94
|
"@atlaskit/theme": "^28.2.0",
|
|
95
95
|
"@atlaskit/tile": "^5.0.0",
|
|
96
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
96
|
+
"@atlaskit/tmp-editor-statsig": "^224.0.0",
|
|
97
97
|
"@atlaskit/tokens": "^20.3.0",
|
|
98
98
|
"@atlaskit/tooltip": "^24.4.0",
|
|
99
99
|
"@atlaskit/ufo": "^2.0.0",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
125
125
|
"@atlaskit/code": "^20.0.0",
|
|
126
126
|
"@atlaskit/css-reset": "^8.4.0",
|
|
127
|
-
"@atlaskit/datetime-picker": "^19.
|
|
127
|
+
"@atlaskit/datetime-picker": "^19.1.0",
|
|
128
128
|
"@atlaskit/media-test-helpers": "^43.0.0",
|
|
129
129
|
"@atlaskit/page": "^15.3.0",
|
|
130
130
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^3.4.0",
|
|
@@ -198,9 +198,6 @@
|
|
|
198
198
|
"jfp-magma-platform-lozenge-jump-fix": {
|
|
199
199
|
"type": "boolean"
|
|
200
200
|
},
|
|
201
|
-
"jpx-1074-smart-links-iframe": {
|
|
202
|
-
"type": "boolean"
|
|
203
|
-
},
|
|
204
201
|
"platform_sl_3p_preauth_better_hovercard_killswitch": {
|
|
205
202
|
"type": "boolean"
|
|
206
203
|
},
|