@atlaskit/smart-card 45.6.9 → 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 +17 -0
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/cjs/messages.js +0 -40
- 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/rovo-chat-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +4 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +9 -37
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -11
- 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/cjs/view/common/rovo-chat-utils/index.js +4 -68
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/es2019/messages.js +0 -40
- 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/rovo-chat-action/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +3 -7
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +3 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +9 -37
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -12
- 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/es2019/view/common/rovo-chat-utils/index.js +4 -68
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/esm/messages.js +0 -40
- 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/rovo-chat-action/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +4 -8
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -14
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +9 -37
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +3 -12
- 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/esm/view/common/rovo-chat-utils/index.js +4 -68
- package/dist/types/messages.d.ts +1 -1
- 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/actions/rovo-chat-action/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- 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/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -1
- package/dist/types/view/HoverCard/types.d.ts +0 -1
- package/dist/types/view/common/rovo-chat-utils/index.d.ts +0 -3
- package/package.json +6 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
|
@@ -38,10 +38,10 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
38
38
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
39
39
|
return actionData ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
40
40
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
41
|
-
}, fg('
|
|
41
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
42
42
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
43
43
|
} : {}, {
|
|
44
|
-
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('
|
|
44
|
+
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_action_refactoring') ? {
|
|
45
45
|
iconSize: props.iconSize
|
|
46
46
|
} : {}),
|
|
47
47
|
onClick: onClick,
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import { di } from 'react-magnetic-di';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { ActionName, SmartLinkSize } from '../../../../../constants';
|
|
10
9
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
11
10
|
import * as Actions from '../../actions';
|
|
@@ -42,18 +41,15 @@ export var getPrimitivesPaddingSpaceBySize = function getPrimitivesPaddingSpaceB
|
|
|
42
41
|
}
|
|
43
42
|
};
|
|
44
43
|
var ActionBlock = function ActionBlock(_ref) {
|
|
45
|
-
var _context$actions;
|
|
46
44
|
var blockRef = _ref.blockRef,
|
|
47
45
|
onClickCallback = _ref.onClick,
|
|
48
46
|
size = _ref.size,
|
|
49
47
|
spaceInline = _ref.spaceInline,
|
|
50
48
|
className = _ref.className,
|
|
51
49
|
_ref$testId = _ref.testId,
|
|
52
|
-
testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId
|
|
53
|
-
isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn;
|
|
50
|
+
testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId;
|
|
54
51
|
var context = useFlexibleUiContext();
|
|
55
52
|
var ui = useFlexibleUiOptionContext();
|
|
56
|
-
var isRovoChatActionAvailable = isAny3pRovoActionsExperimentOn && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction]) !== undefined : undefined;
|
|
57
53
|
var _useState = useState(),
|
|
58
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
59
55
|
message = _useState2[0],
|
|
@@ -77,9 +73,9 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
77
73
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
78
74
|
return;
|
|
79
75
|
}
|
|
80
|
-
var arr =
|
|
76
|
+
var arr = Object.keys(context.actions).filter(function (name) {
|
|
81
77
|
return name !== ActionName.RovoChatAction;
|
|
82
|
-
})
|
|
78
|
+
});
|
|
83
79
|
arr.sort(sort);
|
|
84
80
|
var renderAction = function renderAction(name) {
|
|
85
81
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
@@ -107,7 +103,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
107
103
|
return arr.map(function (name) {
|
|
108
104
|
return renderAction(name);
|
|
109
105
|
});
|
|
110
|
-
}, [context === null || context === void 0 ? void 0 : context.actions,
|
|
106
|
+
}, [context === null || context === void 0 ? void 0 : context.actions, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick]);
|
|
111
107
|
if (!actions) {
|
|
112
108
|
return null;
|
|
113
109
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["testId"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { InternalActionName, SmartLinkStatus } from '../../../../../constants';
|
|
6
6
|
import { useFlexibleCardContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
7
|
-
import AISummaryBlockResolvedView
|
|
7
|
+
import AISummaryBlockResolvedView from './resolved';
|
|
8
8
|
/**
|
|
9
9
|
* Represents an AISummaryBlock, designed to summarising link resource
|
|
10
10
|
* content using AI.
|
|
@@ -13,9 +13,8 @@ import AISummaryBlockResolvedView, { RovoSummaryBlockResolvedView } from './reso
|
|
|
13
13
|
* @see Block
|
|
14
14
|
*/
|
|
15
15
|
var AISummaryBlock = function AISummaryBlock(_ref) {
|
|
16
|
-
var _context$actions, _props$
|
|
17
|
-
var
|
|
18
|
-
_ref$testId = _ref.testId,
|
|
16
|
+
var _context$actions, _props$size, _cardContext$ui;
|
|
17
|
+
var _ref$testId = _ref.testId,
|
|
19
18
|
testId = _ref$testId === void 0 ? 'smart-ai-summary-block' : _ref$testId,
|
|
20
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
20
|
var cardContext = useFlexibleCardContext();
|
|
@@ -27,16 +26,8 @@ var AISummaryBlock = function AISummaryBlock(_ref) {
|
|
|
27
26
|
if (!(actionData !== null && actionData !== void 0 && actionData.url)) {
|
|
28
27
|
return null;
|
|
29
28
|
}
|
|
30
|
-
if (isAny3pRovoActionsExperimentOn) {
|
|
31
|
-
var _props$size, _cardContext$ui;
|
|
32
|
-
return /*#__PURE__*/React.createElement(RovoSummaryBlockResolvedView, _extends({}, props, {
|
|
33
|
-
size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
|
|
34
|
-
testId: testId,
|
|
35
|
-
url: actionData.url
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
29
|
return /*#__PURE__*/React.createElement(AISummaryBlockResolvedView, _extends({}, props, {
|
|
39
|
-
size: (_props$
|
|
30
|
+
size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
|
|
40
31
|
testId: testId,
|
|
41
32
|
url: actionData.url
|
|
42
33
|
}));
|
|
@@ -14,7 +14,6 @@ import { Provider } from '../../elements';
|
|
|
14
14
|
import Block from '../block';
|
|
15
15
|
/**
|
|
16
16
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
17
|
-
* @featureGate platform_sl_3p_auth_rovo_action_kill_switch
|
|
18
17
|
*/
|
|
19
18
|
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [ActionName.RovoChatAction];
|
|
20
19
|
var ignoreContainerMarginStyles = null;
|
|
@@ -48,6 +47,9 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
48
47
|
});
|
|
49
48
|
return arr.map(function (name) {
|
|
50
49
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
50
|
+
|
|
51
|
+
// Note: For the spinner to render properly, e.g. AI summary action,
|
|
52
|
+
// the spinner need to be updated. See FIX-ME comment on ActionButton
|
|
51
53
|
return Action ? /*#__PURE__*/React.createElement(Action, {
|
|
52
54
|
key: name,
|
|
53
55
|
as: "stack-item",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
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; }
|
|
@@ -8,10 +7,8 @@ import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
|
8
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { componentWithCondition, functionUnionWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
12
10
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
13
11
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
|
|
14
|
-
import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
|
|
15
12
|
import { getClickUrl, getDefinitionId, getExtensionKey, getServices } from '../../../state/helpers';
|
|
16
13
|
import useRovoConfig from '../../../state/hooks/use-rovo-config';
|
|
17
14
|
import { useSmartLinkCrossProductUrlWrapperGated } from '../../../state/hooks/use-smart-link-cross-product-url-wrapper';
|
|
@@ -69,8 +66,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
69
66
|
onMouseLeave = _ref4.onMouseLeave,
|
|
70
67
|
onDismiss = _ref4.onDismiss,
|
|
71
68
|
actionOptions = _ref4.actionOptions,
|
|
72
|
-
hoverPreviewOptions = _ref4.hoverPreviewOptions
|
|
73
|
-
showRovoResolvedView = _ref4.showRovoResolvedView;
|
|
69
|
+
hoverPreviewOptions = _ref4.hoverPreviewOptions;
|
|
74
70
|
var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
|
|
75
71
|
createAnalyticsEvent = _useAnalyticsEventsNe.createAnalyticsEvent;
|
|
76
72
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -273,17 +269,14 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
273
269
|
});
|
|
274
270
|
}
|
|
275
271
|
if (isResolved) {
|
|
276
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView,
|
|
277
|
-
actionOptions: actionOptions,
|
|
278
|
-
showRovoResolvedView: showRovoResolvedView
|
|
279
|
-
} : undefined, {
|
|
272
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
|
|
280
273
|
cardState: cardState,
|
|
281
274
|
extensionKey: extensionKey,
|
|
282
275
|
flexibleCardProps: flexibleCardProps,
|
|
283
276
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
284
277
|
onActionClick: onActionClick,
|
|
285
278
|
titleBlockProps: titleBlockProps
|
|
286
|
-
})
|
|
279
|
+
});
|
|
287
280
|
}
|
|
288
281
|
return null;
|
|
289
282
|
}();
|
|
@@ -325,17 +318,14 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
325
318
|
});
|
|
326
319
|
}
|
|
327
320
|
if (cardState.status === 'resolved') {
|
|
328
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView,
|
|
329
|
-
actionOptions: actionOptions,
|
|
330
|
-
showRovoResolvedView: showRovoResolvedView
|
|
331
|
-
} : undefined, {
|
|
321
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
|
|
332
322
|
cardState: cardState,
|
|
333
323
|
extensionKey: extensionKey,
|
|
334
324
|
flexibleCardProps: flexibleCardProps,
|
|
335
325
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
336
326
|
onActionClick: onActionClick,
|
|
337
327
|
titleBlockProps: titleBlockProps
|
|
338
|
-
})
|
|
328
|
+
});
|
|
339
329
|
}
|
|
340
330
|
return null;
|
|
341
331
|
};
|
|
@@ -350,23 +340,10 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
350
340
|
}
|
|
351
341
|
};
|
|
352
342
|
var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(props) {
|
|
353
|
-
var cardState = props.cardState,
|
|
354
|
-
actionOptions = props.actionOptions;
|
|
355
|
-
var rovoConfig = useRovoConfig();
|
|
356
|
-
var isResolved = useIsResolvedView(props);
|
|
357
343
|
var showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
|
|
358
|
-
var showRovoResolvedView = useMemo(function () {
|
|
359
|
-
return isResolved && cardState.details && extractRovoChatAction({
|
|
360
|
-
response: cardState.details,
|
|
361
|
-
rovoConfig: rovoConfig,
|
|
362
|
-
actionOptions: actionOptions
|
|
363
|
-
}) !== undefined;
|
|
364
|
-
}, [actionOptions, cardState.details, rovoConfig, isResolved]);
|
|
365
344
|
var data = useMemo(function () {
|
|
366
345
|
var viewVariant = 'default';
|
|
367
|
-
if (
|
|
368
|
-
viewVariant = 'rovo-resolved-view';
|
|
369
|
-
} else if (showPreauthBetterHovercard) {
|
|
346
|
+
if (showPreauthBetterHovercard) {
|
|
370
347
|
viewVariant = 'rovo-unauthorised-view';
|
|
371
348
|
}
|
|
372
349
|
return {
|
|
@@ -374,17 +351,12 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
|
|
|
374
351
|
viewVariant: viewVariant
|
|
375
352
|
}
|
|
376
353
|
};
|
|
377
|
-
}, [
|
|
354
|
+
}, [showPreauthBetterHovercard]);
|
|
378
355
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
379
356
|
data: data
|
|
380
|
-
}, /*#__PURE__*/React.createElement(HoverCardContent,
|
|
381
|
-
showRovoResolvedView: showRovoResolvedView
|
|
382
|
-
})));
|
|
357
|
+
}, /*#__PURE__*/React.createElement(HoverCardContent, props));
|
|
383
358
|
};
|
|
384
359
|
var _default_1 = componentWithCondition(function () {
|
|
385
|
-
|
|
386
|
-
var flagA = fg('platform_sl_3p_preauth_better_hovercard_killswitch');
|
|
387
|
-
var flagB = fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
388
|
-
return flagA || flagB;
|
|
360
|
+
return fg('platform_sl_3p_preauth_better_hovercard_killswitch');
|
|
389
361
|
}, HoverCardContentWithViewVariant, HoverCardContent);
|
|
390
362
|
export default _default_1;
|
|
@@ -4,13 +4,12 @@ import "./index.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
9
8
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
10
9
|
import { succeedUfoExperience } from '../../../../../state/analytics';
|
|
11
10
|
import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
|
|
12
11
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
13
|
-
import { ActionBlock, AIFooterBlock, AISummaryBlock,
|
|
12
|
+
import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
14
13
|
import { getMetadata } from '../../../utils';
|
|
15
14
|
import ImagePreview from '../../ImagePreview';
|
|
16
15
|
var hiddenSnippetStyles = null;
|
|
@@ -24,14 +23,10 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
24
23
|
flexibleCardProps = _ref.flexibleCardProps,
|
|
25
24
|
isAISummaryEnabled = _ref.isAISummaryEnabled,
|
|
26
25
|
onActionClick = _ref.onActionClick,
|
|
27
|
-
showRovoResolvedView = _ref.showRovoResolvedView,
|
|
28
26
|
titleBlockProps = _ref.titleBlockProps,
|
|
29
27
|
id = _ref.id;
|
|
30
28
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
31
29
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
32
|
-
// We want to fire exposure event only for those cases when user otherwise can see the experiment which would be controlled
|
|
33
|
-
// by all the other condition defined above as a result of what was defined in actionOptions as well as in CardContext.
|
|
34
|
-
var is3PAuthRovoActionsExperimentOn = showRovoResolvedView && expValEquals('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
35
30
|
useEffect(function () {
|
|
36
31
|
// Since this hover view is only rendered on resolved status,
|
|
37
32
|
// there is no need to check for statuses.
|
|
@@ -78,8 +73,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
78
73
|
size: SmartLinkSize.Medium
|
|
79
74
|
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
80
75
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
81
|
-
placeholder: snippet
|
|
82
|
-
isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
|
|
76
|
+
placeholder: snippet
|
|
83
77
|
}) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
84
78
|
testId: "hidden-snippet",
|
|
85
79
|
onRender: onSnippetRender,
|
|
@@ -89,10 +83,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
89
83
|
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
90
84
|
onClick: onActionClick,
|
|
91
85
|
spaceInline: "space.100",
|
|
92
|
-
isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn,
|
|
93
86
|
className: ax(["_n3td1b66"])
|
|
94
|
-
}),
|
|
95
|
-
onActionClick: onActionClick
|
|
96
|
-
}) : /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
87
|
+
}), /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
97
88
|
};
|
|
98
89
|
export default HoverCardResolvedView;
|
|
@@ -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: "45.6.
|
|
15
|
+
packageVersion: "45.6.10",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
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}
|
|
@@ -3,12 +3,9 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import Markdown from 'markdown-to-jsx';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
6
|
import UList from './ulist';
|
|
9
7
|
var baseStyle = null;
|
|
10
|
-
var
|
|
11
|
-
var textStyleOld = null;
|
|
8
|
+
var textStyle = null;
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* A component to render a response from AI in markdown text.
|
|
@@ -26,14 +23,11 @@ var AISummary = function AISummary(_ref) {
|
|
|
26
23
|
if (!content && minHeight === 0) {
|
|
27
24
|
return null;
|
|
28
25
|
}
|
|
29
|
-
var is3pExperimentEnabled =
|
|
30
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
31
|
-
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
32
26
|
return /*#__PURE__*/React.createElement(Markdown, {
|
|
33
27
|
"data-testid": testId
|
|
34
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
35
29
|
,
|
|
36
|
-
className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv",
|
|
30
|
+
className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", "_syazazsu", className]),
|
|
37
31
|
children: content,
|
|
38
32
|
options: {
|
|
39
33
|
forceWrapper: true,
|
|
@@ -7,13 +7,9 @@ import { RovoIcon } from '@atlaskit/logo';
|
|
|
7
7
|
import { CardDisplay } from '../../../constants';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
9
9
|
import AiChapterIcon from '../../FlexibleCard/assets/ai-chapter-icon';
|
|
10
|
-
import AIEditIcon from '../../FlexibleCard/assets/ai-edit-icon';
|
|
11
10
|
import AISearchIcon from '../../FlexibleCard/assets/ai-search-icon';
|
|
12
11
|
import htmlToAdf from '../../FlexibleCard/components/actions/rovo-chat-action/html-to-adf';
|
|
13
12
|
export var RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
|
|
14
|
-
RovoChatPromptKey["RECOMMEND_OTHER_SOURCES"] = "recommend-other-sources";
|
|
15
|
-
RovoChatPromptKey["SHOW_OTHER_MENTIONS"] = "show-other-mentions";
|
|
16
|
-
RovoChatPromptKey["SUGGEST_IMPROVEMENT"] = "suggest-improvement";
|
|
17
13
|
RovoChatPromptKey["SUMMARIZE_LINK"] = "summarize-link";
|
|
18
14
|
RovoChatPromptKey["KEY_HIGHLIGHTS"] = "key-highlights";
|
|
19
15
|
RovoChatPromptKey["ASK_ROVO_ANYTHING"] = "ask-rovo-anything";
|
|
@@ -35,16 +31,14 @@ var getContext = function getContext(intl, product) {
|
|
|
35
31
|
switch (product) {
|
|
36
32
|
case 'CONFLUENCE':
|
|
37
33
|
return {
|
|
38
|
-
contextLong: intl.formatMessage(messages.rovo_prompt_context_confluence_page)
|
|
39
|
-
contextShort: intl.formatMessage(messages.rovo_prompt_context_confluence_page_short)
|
|
34
|
+
contextLong: intl.formatMessage(messages.rovo_prompt_context_confluence_page)
|
|
40
35
|
};
|
|
41
36
|
case 'JSW':
|
|
42
37
|
case 'JWM':
|
|
43
38
|
case 'JSM':
|
|
44
39
|
case 'JPD':
|
|
45
40
|
return {
|
|
46
|
-
contextLong: intl.formatMessage(messages.rovo_prompt_context_jira_work_item)
|
|
47
|
-
contextShort: intl.formatMessage(messages.rovo_prompt_context_jira_work_item_short)
|
|
41
|
+
contextLong: intl.formatMessage(messages.rovo_prompt_context_jira_work_item)
|
|
48
42
|
};
|
|
49
43
|
}
|
|
50
44
|
};
|
|
@@ -59,68 +53,10 @@ export var getPromptAction = function getPromptAction(_ref) {
|
|
|
59
53
|
cardAppearance = _ref.cardAppearance,
|
|
60
54
|
provider = _ref.provider;
|
|
61
55
|
var _ref2 = (_getContext = getContext(intl, product)) !== null && _getContext !== void 0 ? _getContext : {
|
|
62
|
-
contextLong: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
63
|
-
contextShort: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
56
|
+
contextLong: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
64
57
|
},
|
|
65
|
-
contextLong = _ref2.contextLong
|
|
66
|
-
contextShort = _ref2.contextShort;
|
|
58
|
+
contextLong = _ref2.contextLong;
|
|
67
59
|
switch (promptKey) {
|
|
68
|
-
case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
|
|
69
|
-
var label_recommend = intl.formatMessage(messages.rovo_prompt_button_recommend_other_sources);
|
|
70
|
-
var html_recommend = intl.formatMessage(messages.rovo_prompt_message_recommend_other_sources, {
|
|
71
|
-
context: contextLong,
|
|
72
|
-
url: url
|
|
73
|
-
}, {
|
|
74
|
-
ignoreTag: true
|
|
75
|
-
});
|
|
76
|
-
return {
|
|
77
|
-
icon: /*#__PURE__*/React.createElement(AIEditIcon, null),
|
|
78
|
-
content: label_recommend,
|
|
79
|
-
tooltipMessage: label_recommend,
|
|
80
|
-
data: {
|
|
81
|
-
name: label_recommend,
|
|
82
|
-
dialogues: [],
|
|
83
|
-
prompt: htmlToAdf(html_recommend)
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
case RovoChatPromptKey.SHOW_OTHER_MENTIONS:
|
|
87
|
-
var label_other_mentions = intl.formatMessage(messages.rovo_prompt_button_show_other_mentions);
|
|
88
|
-
var html_other_mentions = intl.formatMessage(messages.rovo_prompt_message_show_other_mentions, {
|
|
89
|
-
context: contextLong,
|
|
90
|
-
url: url
|
|
91
|
-
}, {
|
|
92
|
-
ignoreTag: true
|
|
93
|
-
});
|
|
94
|
-
return {
|
|
95
|
-
icon: /*#__PURE__*/React.createElement(AiChapterIcon, null),
|
|
96
|
-
content: label_other_mentions,
|
|
97
|
-
tooltipMessage: label_other_mentions,
|
|
98
|
-
data: {
|
|
99
|
-
name: label_other_mentions,
|
|
100
|
-
dialogues: [],
|
|
101
|
-
prompt: htmlToAdf(html_other_mentions)
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
case RovoChatPromptKey.SUGGEST_IMPROVEMENT:
|
|
105
|
-
var label_improvement = intl.formatMessage(messages.rovo_prompt_button_suggest_improvement, {
|
|
106
|
-
context: contextShort
|
|
107
|
-
});
|
|
108
|
-
var html_improvement = intl.formatMessage(messages.rovo_prompt_message_suggest_improvement, {
|
|
109
|
-
context: contextLong,
|
|
110
|
-
url: url
|
|
111
|
-
}, {
|
|
112
|
-
ignoreTag: true
|
|
113
|
-
});
|
|
114
|
-
return {
|
|
115
|
-
icon: /*#__PURE__*/React.createElement(AISearchIcon, null),
|
|
116
|
-
content: label_improvement,
|
|
117
|
-
tooltipMessage: label_improvement,
|
|
118
|
-
data: {
|
|
119
|
-
name: label_improvement,
|
|
120
|
-
dialogues: [],
|
|
121
|
-
prompt: htmlToAdf(html_improvement)
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
60
|
case RovoChatPromptKey.SUMMARIZE_LINK:
|
|
125
61
|
var label_summarize = intl.formatMessage(messages.ai_summarize);
|
|
126
62
|
var html_summarize = intl.formatMessage(messages.rovo_prompt_message_summarize, {
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | '
|
|
3
|
+
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights' | 'rovo_prompt_message_summarize_document' | 'rovo_prompt_message_summarize_presentation' | 'rovo_prompt_button_explain_code' | 'rovo_prompt_message_explain_code' | 'rovo_prompt_button_catch_up' | 'rovo_prompt_message_catch_up' | 'rovo_prompt_button_salesforce_prep' | 'rovo_prompt_message_salesforce_prep';
|
|
4
4
|
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summary_error_generic_rebrand' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action_rebrand' | 'ai_summary_action_description' | 'ai_summary_action_description_rebrand' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_link_account_embed_teaser_button_next' | 'connect_link_account_embed_teaser_dot_label' | 'connect_link_account_embed_teaser_dot_row_label' | 'connect_link_account_embed_teaser_slide_1_description' | 'connect_link_account_embed_teaser_slide_1_title' | 'connect_link_account_embed_teaser_slide_2_description' | 'connect_link_account_embed_teaser_slide_2_title' | 'connect_link_account_embed_teaser_slide_3_description' | 'connect_link_account_embed_teaser_slide_3_title' | 'connect_link_account_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_inline_social_proof' | 'social_proof_inline_cta_tag_high_with_context' | 'social_proof_inline_cta_tag_high_no_context' | 'social_proof_inline_cta_tag_low_with_context' | 'social_proof_inline_cta_tag_low_no_context' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewInProvider' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey | 'pre_auth_block_social_proof_not_low' | 'pre_auth_block_social_proof_low';
|
|
5
5
|
type Messages = {
|
|
6
6
|
[K in MessageKey]: MessageDescriptor;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type LinkInfoProps } from './types';
|
|
2
|
-
declare const LinkInfo: ({ icon, providerName, onDownloadButtonClick, onResizeButtonClick, onViewButtonClick, size, testId, title, }: LinkInfoProps) => JSX.Element;
|
|
2
|
+
declare const LinkInfo: ({ icon, providerName, onDownloadButtonClick, onResizeButtonClick, onViewButtonClick, size, testId, title, focusRef, }: LinkInfoProps) => JSX.Element;
|
|
3
3
|
export default LinkInfo;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
2
|
import { type IconProp } from '@atlaskit/button/new';
|
|
3
3
|
export type LinkInfoButtonProps = {
|
|
4
4
|
content: React.ReactNode;
|
|
5
|
+
focusRef?: RefObject<HTMLButtonElement>;
|
|
5
6
|
icon: IconProp;
|
|
6
7
|
label: string;
|
|
7
8
|
onClick?: () => void;
|
|
8
9
|
role?: string;
|
|
9
10
|
testId?: string;
|
|
10
11
|
};
|
|
11
|
-
declare const LinkInfoButton: ({ content, icon, label, onClick, testId, role, }: LinkInfoButtonProps) => React.JSX.Element;
|
|
12
|
+
declare const LinkInfoButton: ({ content, icon, label, onClick, testId, role, focusRef, }: LinkInfoButtonProps) => React.JSX.Element;
|
|
12
13
|
export default LinkInfoButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import { type IconProps } from '../../../common/Icon';
|
|
3
3
|
export type LinkInfoProps = {
|
|
4
|
-
focusRef?: RefObject<
|
|
4
|
+
focusRef?: RefObject<HTMLButtonElement>;
|
|
5
5
|
icon?: IconProps;
|
|
6
6
|
onDownloadButtonClick?: () => void;
|
|
7
7
|
onResizeButtonClick?: () => void;
|
|
@@ -28,8 +28,7 @@ export type ActionProps = {
|
|
|
28
28
|
*/
|
|
29
29
|
asDropDownItem?: boolean;
|
|
30
30
|
/**
|
|
31
|
-
* Used
|
|
32
|
-
* Should be removed on clean up of platform_sl_3p_auth_rovo_block_card_kill_switch after finalizing which icons to use long term
|
|
31
|
+
* Used to show different icons for Rovo actions
|
|
33
32
|
*/
|
|
34
33
|
cardAppearance?: CardDisplay;
|
|
35
34
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RovoChatPromptKey } from '../../../../common/rovo-chat-utils';
|
|
2
|
+
import { type RovoChatPromptKey } from '../../../../common/rovo-chat-utils';
|
|
3
3
|
import { type LinkActionProps } from '../types';
|
|
4
4
|
type RovoChatActionProps = LinkActionProps & {
|
|
5
5
|
prompts?: RovoChatPromptKey[];
|
|
@@ -5,5 +5,5 @@ import type { ActionBlockProps } from './types';
|
|
|
5
5
|
* To replace container/index.tsx getPadding() with space token for primitives
|
|
6
6
|
*/
|
|
7
7
|
export declare const getPrimitivesPaddingSpaceBySize: (size: SmartLinkSize) => "var(--ds-space-100)" | "var(--ds-space-200)" | "var(--ds-space-250)" | "var(--ds-space-300)";
|
|
8
|
-
declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, className, testId,
|
|
8
|
+
declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, className, testId, }: ActionBlockProps) => JSX.Element | null;
|
|
9
9
|
export default ActionBlock;
|
|
@@ -2,10 +2,6 @@ import type { Space } from '@atlaskit/primitives/compiled';
|
|
|
2
2
|
import { type FlexibleUiActionName } from '../../../../../constants';
|
|
3
3
|
import type { BlockProps } from '../types';
|
|
4
4
|
export type ActionBlockProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Whether the platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
|
|
7
|
-
*/
|
|
8
|
-
isAny3pRovoActionsExperimentOn?: boolean;
|
|
9
5
|
/**
|
|
10
6
|
* Callback once action is executed.
|
|
11
7
|
*/
|
|
@@ -7,5 +7,5 @@ import { type AISummaryBlockProps } from './types';
|
|
|
7
7
|
* @param {AISummaryBlockProps} AISummaryBlock
|
|
8
8
|
* @see Block
|
|
9
9
|
*/
|
|
10
|
-
declare const AISummaryBlock: ({
|
|
10
|
+
declare const AISummaryBlock: ({ testId, ...props }: AISummaryBlockProps) => React.JSX.Element | null;
|
|
11
11
|
export default AISummaryBlock;
|
|
@@ -5,10 +5,6 @@ export type AISummaryBlockProps = {
|
|
|
5
5
|
* Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
|
|
6
6
|
*/
|
|
7
7
|
aiSummaryMinHeight?: number;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
|
|
10
|
-
*/
|
|
11
|
-
isAny3pRovoActionsExperimentOn?: boolean;
|
|
12
8
|
/**
|
|
13
9
|
* Placeholder to show when summary is not available
|
|
14
10
|
*/
|
|
@@ -126,8 +126,7 @@ export type BaseActionItem = {
|
|
|
126
126
|
*/
|
|
127
127
|
export type BaseDataActionItem = {
|
|
128
128
|
/**
|
|
129
|
-
* Used
|
|
130
|
-
* Should be removed on clean up of platform_sl_3p_auth_rovo_block_card_kill_switch after finalizing which icons to use long term
|
|
129
|
+
* Used to show different icons for Rovo actions
|
|
131
130
|
*/
|
|
132
131
|
cardAppearance?: CardDisplay;
|
|
133
132
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type HoverCardResolvedProps } from './types';
|
|
2
|
-
declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick,
|
|
2
|
+
declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
|
|
3
3
|
export default HoverCardResolvedView;
|
|
@@ -103,7 +103,6 @@ export type HoverCardContentProps = {
|
|
|
103
103
|
onMouseLeave?: MouseEventHandler;
|
|
104
104
|
onResolve: () => void;
|
|
105
105
|
renderers?: CardProviderRenderers;
|
|
106
|
-
showRovoResolvedView?: boolean;
|
|
107
106
|
url: string;
|
|
108
107
|
};
|
|
109
108
|
export type ContentContainerWidthAppearance = 'default' | 'slim';
|
|
@@ -6,9 +6,6 @@ import type { SendPromptMessageData } from '../../../state/hooks/use-rovo-chat';
|
|
|
6
6
|
import type Action from '../../FlexibleCard/components/actions/action';
|
|
7
7
|
import type { ActionProps } from '../../FlexibleCard/components/actions/action/types';
|
|
8
8
|
export declare enum RovoChatPromptKey {
|
|
9
|
-
RECOMMEND_OTHER_SOURCES = "recommend-other-sources",
|
|
10
|
-
SHOW_OTHER_MENTIONS = "show-other-mentions",
|
|
11
|
-
SUGGEST_IMPROVEMENT = "suggest-improvement",
|
|
12
9
|
SUMMARIZE_LINK = "summarize-link",
|
|
13
10
|
KEY_HIGHLIGHTS = "key-highlights",
|
|
14
11
|
ASK_ROVO_ANYTHING = "ask-rovo-anything",
|