@atlaskit/smart-card 45.6.10 → 45.6.11
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 +9 -0
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +14 -7
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
- package/dist/cjs/view/EmbedModal/index.js +29 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +8 -6
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +4 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.compiled.css +0 -1
- package/dist/cjs/view/common/ai-summary/index.js +2 -8
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +13 -6
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
- package/dist/es2019/view/EmbedModal/index.js +30 -3
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +8 -6
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +4 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.compiled.css +0 -1
- package/dist/es2019/view/common/ai-summary/index.js +2 -8
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +14 -7
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
- package/dist/esm/view/EmbedModal/index.js +30 -3
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +8 -6
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +4 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.compiled.css +0 -1
- package/dist/esm/view/common/ai-summary/index.js +2 -8
- package/dist/types/view/EmbedModal/components/link-info/index.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/link-info/link-info-button/index.d.ts +3 -2
- package/dist/types/view/EmbedModal/components/link-info/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -2
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 45.6.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a6bff0d62fbcd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6bff0d62fbcd) -
|
|
8
|
+
NAVX-4719 Adding keyboard focus support for embed modal
|
|
9
|
+
- [`3d8749ffa2391`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d8749ffa2391) -
|
|
10
|
+
Clean up platform_sl_3p_auth_rovo_action_kill_switch
|
|
11
|
+
|
|
3
12
|
## 45.6.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -30,12 +30,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
var extensionKey = (0, _helpers.getExtensionKey)(response);
|
|
33
|
-
var isGoogleProvider = extensionKey === 'google-object-provider';
|
|
34
33
|
var isInlineExperimentEnabled = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_inline_tailored_cta_killswitch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_inline_tailored_cta', 'isEnabled', true);
|
|
35
|
-
var is3PAuthRovoActionEnabled = isGoogleProvider && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
36
34
|
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) === 'CONFLUENCE';
|
|
37
35
|
var is3PEmbedPostAuthActionsEnabled = isEmbedRovoActionsFooterExperimentEnabled === true;
|
|
38
|
-
var isSupportedFeature =
|
|
36
|
+
var isSupportedFeature = is3PBlockPostAuthActionsEnabled || isInlineExperimentEnabled || is3PEmbedPostAuthActionsEnabled;
|
|
39
37
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
40
38
|
var url = (0, _linkExtractors.extractSmartLinkUrl)(response);
|
|
41
39
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -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: "45.6.
|
|
14
|
+
packageVersion: "45.6.10" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
require("./index.compiled.css");
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _reactIntl = require("react-intl");
|
|
14
15
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
@@ -17,6 +18,7 @@ var _fullscreenEnter = _interopRequireDefault(require("@atlaskit/icon/core/fulls
|
|
|
17
18
|
var _fullscreenExit = _interopRequireDefault(require("@atlaskit/icon/core/fullscreen-exit"));
|
|
18
19
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
19
20
|
var _modalDialog = require("@atlaskit/modal-dialog");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
22
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
21
23
|
var _messages = require("../../../../messages");
|
|
22
24
|
var _Icon = require("../../../common/Icon");
|
|
@@ -42,13 +44,14 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
42
44
|
onViewButtonClick = _ref.onViewButtonClick,
|
|
43
45
|
size = _ref.size,
|
|
44
46
|
testId = _ref.testId,
|
|
45
|
-
title = _ref.title
|
|
47
|
+
title = _ref.title,
|
|
48
|
+
focusRef = _ref.focusRef;
|
|
46
49
|
var _useModal = (0, _modalDialog.useModal)(),
|
|
47
50
|
onClose = _useModal.onClose;
|
|
48
51
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
49
52
|
formatMessage = _useIntl.formatMessage;
|
|
50
53
|
var downloadButton = (0, _react.useMemo)(function () {
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(_linkInfoButton.default, {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_linkInfoButton.default, (0, _extends2.default)({
|
|
52
55
|
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.download),
|
|
53
56
|
icon: function icon() {
|
|
54
57
|
return /*#__PURE__*/_react.default.createElement(_download.default, {
|
|
@@ -60,15 +63,17 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
60
63
|
label: formatMessage(_messages.messages.download),
|
|
61
64
|
onClick: onDownloadButtonClick,
|
|
62
65
|
testId: "".concat(testId, "-download")
|
|
63
|
-
})
|
|
64
|
-
|
|
66
|
+
}, (0, _platformFeatureFlags.fg)('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
67
|
+
focusRef: focusRef
|
|
68
|
+
} : {}));
|
|
69
|
+
}, [onDownloadButtonClick, testId, formatMessage, focusRef]);
|
|
65
70
|
var urlButton = (0, _react.useMemo)(function () {
|
|
66
71
|
if (onViewButtonClick) {
|
|
67
72
|
var label = providerName ? formatMessage(_messages.messages.viewInProvider, {
|
|
68
73
|
providerName: providerName
|
|
69
74
|
}) : formatMessage(_messages.messages.viewOriginal);
|
|
70
75
|
var content = providerName ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.viewIn), " ", providerName) : /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.viewOriginal);
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_linkInfoButton.default, {
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_linkInfoButton.default, (0, _extends2.default)({
|
|
72
77
|
content: content,
|
|
73
78
|
icon: function icon() {
|
|
74
79
|
return /*#__PURE__*/_react.default.createElement(_linkExternal.default, {
|
|
@@ -81,9 +86,11 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
81
86
|
onClick: onViewButtonClick,
|
|
82
87
|
testId: "".concat(testId, "-url"),
|
|
83
88
|
role: 'link'
|
|
84
|
-
})
|
|
89
|
+
}, (0, _platformFeatureFlags.fg)('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
90
|
+
focusRef: !onDownloadButtonClick ? focusRef : undefined
|
|
91
|
+
} : {}));
|
|
85
92
|
}
|
|
86
|
-
}, [onViewButtonClick, providerName, testId, formatMessage]);
|
|
93
|
+
}, [onViewButtonClick, providerName, testId, formatMessage, onDownloadButtonClick, focusRef]);
|
|
87
94
|
var sizeButton = (0, _react.useMemo)(function () {
|
|
88
95
|
var isFullScreen = size === _constants.MAX_MODAL_SIZE;
|
|
89
96
|
var message = isFullScreen ? _messages.messages.preview_min_size : _messages.messages.preview_max_size;
|
|
@@ -5,8 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _new = require("@atlaskit/button/new");
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
12
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
11
13
|
var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
|
|
12
14
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
@@ -15,14 +17,15 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
15
17
|
label = _ref.label,
|
|
16
18
|
onClick = _ref.onClick,
|
|
17
19
|
testId = _ref.testId,
|
|
18
|
-
role = _ref.role
|
|
20
|
+
role = _ref.role,
|
|
21
|
+
focusRef = _ref.focusRef;
|
|
19
22
|
var onMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
20
23
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
21
24
|
content: content,
|
|
22
25
|
hideTooltipOnClick: true,
|
|
23
26
|
tag: "span",
|
|
24
27
|
testId: "".concat(testId, "-tooltip")
|
|
25
|
-
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, (0, _extends2.default)({
|
|
26
29
|
appearance: "subtle",
|
|
27
30
|
icon: icon,
|
|
28
31
|
label: label,
|
|
@@ -30,6 +33,8 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
30
33
|
onMouseDown: onMouseDown,
|
|
31
34
|
testId: "".concat(testId, "-button"),
|
|
32
35
|
role: role
|
|
33
|
-
}))
|
|
36
|
+
}, (0, _platformFeatureFlags.fg)('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
37
|
+
ref: focusRef
|
|
38
|
+
} : {})));
|
|
34
39
|
};
|
|
35
40
|
var _default = exports.default = LinkInfoButton;
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _tokens = require("@atlaskit/tokens");
|
|
14
15
|
var _constants = require("../../constants");
|
|
15
16
|
var _useInvokeClientAction = _interopRequireDefault(require("../../state/hooks/use-invoke-client-action"));
|
|
@@ -125,6 +126,30 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
125
126
|
if (previewUrl && isSupportTheming) {
|
|
126
127
|
previewUrl = (0, _utils.getPreviewUrlWithTheme)(previewUrl, themeState);
|
|
127
128
|
}
|
|
129
|
+
var focusRef = (0, _react.useRef)(null);
|
|
130
|
+
var hasRestoredFocus = (0, _react.useRef)(false);
|
|
131
|
+
(0, _react.useEffect)(function () {
|
|
132
|
+
if (!isOpen || !(0, _platformFeatureFlags.fg)('navx-4719-a11y-embed-modal-focus-states')) {
|
|
133
|
+
hasRestoredFocus.current = false;
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
var handleWindowBlur = function handleWindowBlur() {
|
|
137
|
+
if (hasRestoredFocus.current) return;
|
|
138
|
+
setTimeout(function () {
|
|
139
|
+
var _focusRef$current;
|
|
140
|
+
// document.hasFocus() returns true when focus moved to an
|
|
141
|
+
// iframe on the same page, false when the window itself
|
|
142
|
+
// lost focus (e.g. user switched browser tabs)
|
|
143
|
+
if (!document.hasFocus()) return;
|
|
144
|
+
hasRestoredFocus.current = true;
|
|
145
|
+
(_focusRef$current = focusRef.current) === null || _focusRef$current === void 0 || _focusRef$current.focus();
|
|
146
|
+
}, 0);
|
|
147
|
+
};
|
|
148
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
149
|
+
return function () {
|
|
150
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
151
|
+
};
|
|
152
|
+
}, [isOpen]);
|
|
128
153
|
return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
129
154
|
height: "100%",
|
|
130
155
|
onClose: handleOnClose,
|
|
@@ -134,7 +159,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
134
159
|
width: width,
|
|
135
160
|
label: title,
|
|
136
161
|
isBlanketHidden: isBlanketHidden
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement(_linkInfo.default, {
|
|
162
|
+
}, /*#__PURE__*/_react.default.createElement(_linkInfo.default, (0, _extends2.default)({
|
|
138
163
|
icon: linkIcon && {
|
|
139
164
|
icon: /*#__PURE__*/_react.default.createElement(_common.BaseIconElement, (0, _extends2.default)({}, linkIcon, {
|
|
140
165
|
size: _constants.SmartLinkSize.Large
|
|
@@ -148,7 +173,9 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
148
173
|
size: width,
|
|
149
174
|
title: title,
|
|
150
175
|
testId: testId
|
|
151
|
-
}
|
|
176
|
+
}, (0, _platformFeatureFlags.fg)('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
177
|
+
focusRef: focusRef
|
|
178
|
+
} : {})), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_embedContent.default, {
|
|
152
179
|
isTrusted: isTrusted,
|
|
153
180
|
name: iframeName,
|
|
154
181
|
src: previewUrl,
|
package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -16,7 +16,6 @@ var _css = require("@atlaskit/css");
|
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
18
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
19
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
20
19
|
var _utils = require("../../../utils");
|
|
21
20
|
var _actionIcon = _interopRequireDefault(require("../action-icon"));
|
|
22
21
|
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); }
|
|
@@ -43,11 +42,14 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
43
42
|
onClickCallback();
|
|
44
43
|
}
|
|
45
44
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
46
|
-
|
|
47
|
-
//
|
|
48
|
-
|
|
45
|
+
|
|
46
|
+
// FIX-ME: This is required for ResolvedHoverCardFooterBlock action to show proper size
|
|
47
|
+
// ResolvedHoverCardFooterBlock is currently not used but keeping inside the code base for
|
|
48
|
+
// upcoming experiment to refresh HoverCard design
|
|
49
|
+
// If ResolvedHoverCardFooterBlock is cleaned up, this code can be removed.
|
|
50
|
+
var showSpinnerSize24 = false;
|
|
49
51
|
var icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(_actionIcon.default, {
|
|
50
|
-
icon:
|
|
52
|
+
icon: showSpinnerSize24 ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
51
53
|
xcss: styles.spinner
|
|
52
54
|
}, /*#__PURE__*/React.createElement(_spinner.default, {
|
|
53
55
|
size: 16,
|
|
@@ -64,7 +66,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
64
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
65
67
|
,
|
|
66
68
|
style: style
|
|
67
|
-
}, (0, _platformFeatureFlags.fg)('
|
|
69
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_action_refactoring') ? {
|
|
68
70
|
'aria-label': ariaLabel
|
|
69
71
|
} : {}), /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
70
72
|
alignBlock: "center",
|
|
@@ -27,7 +27,7 @@ var AISummaryActionComponent = exports.AISummaryActionComponent = function AISum
|
|
|
27
27
|
(0, _react.useEffect)(function () {
|
|
28
28
|
onLoadingChange === null || onLoadingChange === void 0 || onLoadingChange(status === 'loading');
|
|
29
29
|
}, [onLoadingChange, status]);
|
|
30
|
-
return status === 'done' ? (0, _platformFeatureFlags.fg)('
|
|
30
|
+
return status === 'done' ? (0, _platformFeatureFlags.fg)('platform_sl_action_refactoring') ? /*#__PURE__*/_react.default.createElement(_copySummaryAction.CopySummaryActionNew, (0, _extends2.default)({}, props, {
|
|
31
31
|
summary: content,
|
|
32
32
|
testId: testId
|
|
33
33
|
})) : /*#__PURE__*/_react.default.createElement(_copySummaryAction.CopySummaryAction, (0, _extends2.default)({}, props, {
|
|
@@ -86,7 +86,7 @@ var FollowAction = function FollowAction(props) {
|
|
|
86
86
|
};
|
|
87
87
|
return /*#__PURE__*/_react.default.createElement(_serverAction.default, (0, _extends2.default)({
|
|
88
88
|
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, label)
|
|
89
|
-
}, (0, _platformFeatureFlags.fg)('
|
|
89
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_action_refactoring') ? {
|
|
90
90
|
ariaLabel: intl.formatMessage(label)
|
|
91
91
|
} : {}, {
|
|
92
92
|
icon: followIcon,
|
|
@@ -49,10 +49,10 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
49
49
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
50
50
|
return actionData ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
51
51
|
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
52
|
-
}, (0, _platformFeatureFlags.fg)('
|
|
52
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_action_refactoring') ? {
|
|
53
53
|
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
54
54
|
} : {}, {
|
|
55
|
-
icon: /*#__PURE__*/_react.default.createElement(_relatedLinksActionIcon.default, (0, _platformFeatureFlags.fg)('
|
|
55
|
+
icon: /*#__PURE__*/_react.default.createElement(_relatedLinksActionIcon.default, (0, _platformFeatureFlags.fg)('platform_sl_action_refactoring') ? {
|
|
56
56
|
iconSize: props.iconSize
|
|
57
57
|
} : {}),
|
|
58
58
|
onClick: onClick,
|
|
@@ -22,7 +22,6 @@ var _excluded = ["testId", "onActionClick", "hideProvider"];
|
|
|
22
22
|
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); }
|
|
23
23
|
/**
|
|
24
24
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
25
|
-
* @featureGate platform_sl_3p_auth_rovo_action_kill_switch
|
|
26
25
|
*/
|
|
27
26
|
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.ActionName.RovoChatAction];
|
|
28
27
|
var ignoreContainerMarginStyles = null;
|
|
@@ -56,6 +55,9 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
56
55
|
});
|
|
57
56
|
return arr.map(function (name) {
|
|
58
57
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
58
|
+
|
|
59
|
+
// Note: For the spinner to render properly, e.g. AI summary action,
|
|
60
|
+
// the spinner need to be updated. See FIX-ME comment on ActionButton
|
|
59
61
|
return Action ? /*#__PURE__*/React.createElement(Action, {
|
|
60
62
|
key: name,
|
|
61
63
|
as: "stack-item",
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.hoverCardClassName = exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
@@ -279,16 +278,14 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
279
278
|
});
|
|
280
279
|
}
|
|
281
280
|
if (isResolved) {
|
|
282
|
-
return /*#__PURE__*/_react.default.createElement(_resolved.default,
|
|
283
|
-
actionOptions: actionOptions
|
|
284
|
-
} : undefined, {
|
|
281
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.default, {
|
|
285
282
|
cardState: cardState,
|
|
286
283
|
extensionKey: extensionKey,
|
|
287
284
|
flexibleCardProps: flexibleCardProps,
|
|
288
285
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
289
286
|
onActionClick: onActionClick,
|
|
290
287
|
titleBlockProps: titleBlockProps
|
|
291
|
-
})
|
|
288
|
+
});
|
|
292
289
|
}
|
|
293
290
|
return null;
|
|
294
291
|
}();
|
|
@@ -330,16 +327,14 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
330
327
|
});
|
|
331
328
|
}
|
|
332
329
|
if (cardState.status === 'resolved') {
|
|
333
|
-
return /*#__PURE__*/_react.default.createElement(_resolved.default,
|
|
334
|
-
actionOptions: actionOptions
|
|
335
|
-
} : undefined, {
|
|
330
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.default, {
|
|
336
331
|
cardState: cardState,
|
|
337
332
|
extensionKey: extensionKey,
|
|
338
333
|
flexibleCardProps: flexibleCardProps,
|
|
339
334
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
340
335
|
onActionClick: onActionClick,
|
|
341
336
|
titleBlockProps: titleBlockProps
|
|
342
|
-
})
|
|
337
|
+
});
|
|
343
338
|
}
|
|
344
339
|
return null;
|
|
345
340
|
};
|
|
@@ -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: "45.6.
|
|
22
|
+
packageVersion: "45.6.10",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -5,6 +5,5 @@
|
|
|
5
5
|
._o5724jg8{white-space:normal}
|
|
6
6
|
._slp31hna{word-wrap:break-word}
|
|
7
7
|
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
8
|
-
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
9
8
|
._te171kdv{-ms-user-select:text}
|
|
10
9
|
._uizt1kdv{-webkit-user-select:text;-ms-user-select:text;user-select:text}
|
|
@@ -11,13 +11,10 @@ require("./index.compiled.css");
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _markdownToJsx = _interopRequireDefault(require("markdown-to-jsx"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
16
14
|
var _ulist = _interopRequireDefault(require("./ulist"));
|
|
17
15
|
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); }
|
|
18
16
|
var baseStyle = null;
|
|
19
|
-
var
|
|
20
|
-
var textStyleOld = null;
|
|
17
|
+
var textStyle = null;
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
20
|
* A component to render a response from AI in markdown text.
|
|
@@ -35,14 +32,11 @@ var AISummary = function AISummary(_ref) {
|
|
|
35
32
|
if (!content && minHeight === 0) {
|
|
36
33
|
return null;
|
|
37
34
|
}
|
|
38
|
-
var is3pExperimentEnabled =
|
|
39
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
40
|
-
(0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
41
35
|
return /*#__PURE__*/React.createElement(_markdownToJsx.default, {
|
|
42
36
|
"data-testid": testId
|
|
43
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
44
38
|
,
|
|
45
|
-
className: (0, _runtime.ax)(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv",
|
|
39
|
+
className: (0, _runtime.ax)(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", "_syazazsu", className]),
|
|
46
40
|
children: content,
|
|
47
41
|
options: {
|
|
48
42
|
forceWrapper: true,
|
|
@@ -25,12 +25,10 @@ const extractRovoChatAction = ({
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
const extensionKey = getExtensionKey(response);
|
|
28
|
-
const isGoogleProvider = extensionKey === 'google-object-provider';
|
|
29
28
|
const isInlineExperimentEnabled = fg('platform_sl_3p_auth_inline_tailored_cta_killswitch') && expValEqualsNoExposure('platform_sl_3p_auth_inline_tailored_cta', 'isEnabled', true);
|
|
30
|
-
const is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
31
29
|
const is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) === 'CONFLUENCE';
|
|
32
30
|
const is3PEmbedPostAuthActionsEnabled = isEmbedRovoActionsFooterExperimentEnabled === true;
|
|
33
|
-
const isSupportedFeature =
|
|
31
|
+
const isSupportedFeature = is3PBlockPostAuthActionsEnabled || isInlineExperimentEnabled || is3PEmbedPostAuthActionsEnabled;
|
|
34
32
|
const isOptIn = (actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
35
33
|
const url = extractSmartLinkUrl(response);
|
|
36
34
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -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: "45.6.
|
|
5
|
+
packageVersion: "45.6.10" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
5
|
import React, { useMemo } from 'react';
|
|
@@ -9,6 +10,7 @@ import VidFullScreenOnIcon from '@atlaskit/icon/core/fullscreen-enter';
|
|
|
9
10
|
import FullscreenExitIcon from '@atlaskit/icon/core/fullscreen-exit';
|
|
10
11
|
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
11
12
|
import { CloseButton, useModal } from '@atlaskit/modal-dialog';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
15
|
import { messages } from '../../../../messages';
|
|
14
16
|
import { Icon } from '../../../common/Icon';
|
|
@@ -33,7 +35,8 @@ const LinkInfo = ({
|
|
|
33
35
|
onViewButtonClick,
|
|
34
36
|
size,
|
|
35
37
|
testId,
|
|
36
|
-
title
|
|
38
|
+
title,
|
|
39
|
+
focusRef
|
|
37
40
|
}) => {
|
|
38
41
|
const {
|
|
39
42
|
onClose
|
|
@@ -41,7 +44,7 @@ const LinkInfo = ({
|
|
|
41
44
|
const {
|
|
42
45
|
formatMessage
|
|
43
46
|
} = useIntl();
|
|
44
|
-
const downloadButton = useMemo(() => /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
47
|
+
const downloadButton = useMemo(() => /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
45
48
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
46
49
|
icon: () => /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
47
50
|
label: "",
|
|
@@ -51,14 +54,16 @@ const LinkInfo = ({
|
|
|
51
54
|
label: formatMessage(messages.download),
|
|
52
55
|
onClick: onDownloadButtonClick,
|
|
53
56
|
testId: `${testId}-download`
|
|
54
|
-
}
|
|
57
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
58
|
+
focusRef
|
|
59
|
+
} : {})), [onDownloadButtonClick, testId, formatMessage, focusRef]);
|
|
55
60
|
const urlButton = useMemo(() => {
|
|
56
61
|
if (onViewButtonClick) {
|
|
57
62
|
const label = providerName ? formatMessage(messages.viewInProvider, {
|
|
58
63
|
providerName
|
|
59
64
|
}) : formatMessage(messages.viewOriginal);
|
|
60
65
|
const content = providerName ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.viewIn), " ", providerName) : /*#__PURE__*/React.createElement(FormattedMessage, messages.viewOriginal);
|
|
61
|
-
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
66
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
62
67
|
content: content,
|
|
63
68
|
icon: () => /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
64
69
|
label: "",
|
|
@@ -69,9 +74,11 @@ const LinkInfo = ({
|
|
|
69
74
|
onClick: onViewButtonClick,
|
|
70
75
|
testId: `${testId}-url`,
|
|
71
76
|
role: 'link'
|
|
72
|
-
})
|
|
77
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
78
|
+
focusRef: !onDownloadButtonClick ? focusRef : undefined
|
|
79
|
+
} : {}));
|
|
73
80
|
}
|
|
74
|
-
}, [onViewButtonClick, providerName, testId, formatMessage]);
|
|
81
|
+
}, [onViewButtonClick, providerName, testId, formatMessage, onDownloadButtonClick, focusRef]);
|
|
75
82
|
const sizeButton = useMemo(() => {
|
|
76
83
|
const isFullScreen = size === MAX_MODAL_SIZE;
|
|
77
84
|
const message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
6
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
5
7
|
const LinkInfoButton = ({
|
|
@@ -8,7 +10,8 @@ const LinkInfoButton = ({
|
|
|
8
10
|
label,
|
|
9
11
|
onClick,
|
|
10
12
|
testId,
|
|
11
|
-
role
|
|
13
|
+
role,
|
|
14
|
+
focusRef
|
|
12
15
|
}) => {
|
|
13
16
|
const onMouseDown = useMouseDownEvent();
|
|
14
17
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -16,7 +19,7 @@ const LinkInfoButton = ({
|
|
|
16
19
|
hideTooltipOnClick: true,
|
|
17
20
|
tag: "span",
|
|
18
21
|
testId: `${testId}-tooltip`
|
|
19
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
22
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
20
23
|
appearance: "subtle",
|
|
21
24
|
icon: icon,
|
|
22
25
|
label: label,
|
|
@@ -24,6 +27,8 @@ const LinkInfoButton = ({
|
|
|
24
27
|
onMouseDown: onMouseDown,
|
|
25
28
|
testId: `${testId}-button`,
|
|
26
29
|
role: role
|
|
27
|
-
})
|
|
30
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
31
|
+
ref: focusRef
|
|
32
|
+
} : {})));
|
|
28
33
|
};
|
|
29
34
|
export default LinkInfoButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useCallback, useRef, useState } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
5
6
|
import { SmartLinkSize } from '../../constants';
|
|
6
7
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -101,6 +102,30 @@ const EmbedModal = ({
|
|
|
101
102
|
if (previewUrl && isSupportTheming) {
|
|
102
103
|
previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
|
|
103
104
|
}
|
|
105
|
+
const focusRef = useRef(null);
|
|
106
|
+
const hasRestoredFocus = useRef(false);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (!isOpen || !fg('navx-4719-a11y-embed-modal-focus-states')) {
|
|
109
|
+
hasRestoredFocus.current = false;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const handleWindowBlur = () => {
|
|
113
|
+
if (hasRestoredFocus.current) return;
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
var _focusRef$current;
|
|
116
|
+
// document.hasFocus() returns true when focus moved to an
|
|
117
|
+
// iframe on the same page, false when the window itself
|
|
118
|
+
// lost focus (e.g. user switched browser tabs)
|
|
119
|
+
if (!document.hasFocus()) return;
|
|
120
|
+
hasRestoredFocus.current = true;
|
|
121
|
+
(_focusRef$current = focusRef.current) === null || _focusRef$current === void 0 ? void 0 : _focusRef$current.focus();
|
|
122
|
+
}, 0);
|
|
123
|
+
};
|
|
124
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
125
|
+
return () => {
|
|
126
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
127
|
+
};
|
|
128
|
+
}, [isOpen]);
|
|
104
129
|
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
|
|
105
130
|
height: "100%",
|
|
106
131
|
onClose: handleOnClose,
|
|
@@ -110,7 +135,7 @@ const EmbedModal = ({
|
|
|
110
135
|
width: width,
|
|
111
136
|
label: title,
|
|
112
137
|
isBlanketHidden: isBlanketHidden
|
|
113
|
-
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
138
|
+
}, /*#__PURE__*/React.createElement(LinkInfo, _extends({
|
|
114
139
|
icon: linkIcon && {
|
|
115
140
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
116
141
|
size: SmartLinkSize.Large
|
|
@@ -124,7 +149,9 @@ const EmbedModal = ({
|
|
|
124
149
|
size: width,
|
|
125
150
|
title: title,
|
|
126
151
|
testId: testId
|
|
127
|
-
}
|
|
152
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
153
|
+
focusRef
|
|
154
|
+
} : {})), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(EmbedContent, {
|
|
128
155
|
isTrusted: isTrusted,
|
|
129
156
|
name: iframeName,
|
|
130
157
|
src: previewUrl,
|
package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -8,7 +8,6 @@ import { cx } from '@atlaskit/css';
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
12
11
|
import { getPrimitivesInlineSpaceBySize } from '../../../utils';
|
|
13
12
|
import ActionIcon from '../action-icon';
|
|
14
13
|
const styles = {
|
|
@@ -35,11 +34,14 @@ const ActionButton = ({
|
|
|
35
34
|
onClickCallback();
|
|
36
35
|
}
|
|
37
36
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
37
|
+
|
|
38
|
+
// FIX-ME: This is required for ResolvedHoverCardFooterBlock action to show proper size
|
|
39
|
+
// ResolvedHoverCardFooterBlock is currently not used but keeping inside the code base for
|
|
40
|
+
// upcoming experiment to refresh HoverCard design
|
|
41
|
+
// If ResolvedHoverCardFooterBlock is cleaned up, this code can be removed.
|
|
42
|
+
const showSpinnerSize24 = false;
|
|
41
43
|
const icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
42
|
-
icon:
|
|
44
|
+
icon: showSpinnerSize24 ? /*#__PURE__*/React.createElement(Box, {
|
|
43
45
|
xcss: styles.spinner
|
|
44
46
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
45
47
|
size: 16,
|
|
@@ -56,7 +58,7 @@ const ActionButton = ({
|
|
|
56
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
57
59
|
,
|
|
58
60
|
style: style
|
|
59
|
-
}, fg('
|
|
61
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
60
62
|
'aria-label': ariaLabel
|
|
61
63
|
} : {}), /*#__PURE__*/React.createElement(Inline, {
|
|
62
64
|
alignBlock: "center",
|
|
@@ -21,7 +21,7 @@ export const AISummaryActionComponent = props => {
|
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
onLoadingChange === null || onLoadingChange === void 0 ? void 0 : onLoadingChange(status === 'loading');
|
|
23
23
|
}, [onLoadingChange, status]);
|
|
24
|
-
return status === 'done' ? fg('
|
|
24
|
+
return status === 'done' ? fg('platform_sl_action_refactoring') ? /*#__PURE__*/React.createElement(CopySummaryActionNew, _extends({}, props, {
|
|
25
25
|
summary: content,
|
|
26
26
|
testId: testId
|
|
27
27
|
})) : /*#__PURE__*/React.createElement(CopySummaryAction, _extends({}, props, {
|