@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
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
2
|
import { AnalyticsContext, useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
|
|
4
3
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
5
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { componentWithCondition, functionUnionWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
7
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
7
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
10
8
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
|
|
11
|
-
import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
|
|
12
9
|
import { getClickUrl, getDefinitionId, getExtensionKey, getServices } from '../../../state/helpers';
|
|
13
10
|
import useRovoConfig from '../../../state/hooks/use-rovo-config';
|
|
14
11
|
import { useSmartLinkCrossProductUrlWrapperGated } from '../../../state/hooks/use-smart-link-cross-product-url-wrapper';
|
|
@@ -68,8 +65,7 @@ const HoverCardContent = ({
|
|
|
68
65
|
onMouseLeave,
|
|
69
66
|
onDismiss,
|
|
70
67
|
actionOptions,
|
|
71
|
-
hoverPreviewOptions
|
|
72
|
-
showRovoResolvedView
|
|
68
|
+
hoverPreviewOptions
|
|
73
69
|
}) => {
|
|
74
70
|
var _linkState$status, _cardState$details;
|
|
75
71
|
const {
|
|
@@ -261,17 +257,14 @@ const HoverCardContent = ({
|
|
|
261
257
|
});
|
|
262
258
|
}
|
|
263
259
|
if (isResolved) {
|
|
264
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView,
|
|
265
|
-
actionOptions,
|
|
266
|
-
showRovoResolvedView
|
|
267
|
-
} : undefined, {
|
|
260
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
|
|
268
261
|
cardState: cardState,
|
|
269
262
|
extensionKey: extensionKey,
|
|
270
263
|
flexibleCardProps: flexibleCardProps,
|
|
271
264
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
272
265
|
onActionClick: onActionClick,
|
|
273
266
|
titleBlockProps: titleBlockProps
|
|
274
|
-
})
|
|
267
|
+
});
|
|
275
268
|
}
|
|
276
269
|
return null;
|
|
277
270
|
})();
|
|
@@ -313,17 +306,14 @@ const HoverCardContent = ({
|
|
|
313
306
|
});
|
|
314
307
|
}
|
|
315
308
|
if (cardState.status === 'resolved') {
|
|
316
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView,
|
|
317
|
-
actionOptions,
|
|
318
|
-
showRovoResolvedView
|
|
319
|
-
} : undefined, {
|
|
309
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
|
|
320
310
|
cardState: cardState,
|
|
321
311
|
extensionKey: extensionKey,
|
|
322
312
|
flexibleCardProps: flexibleCardProps,
|
|
323
313
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
324
314
|
onActionClick: onActionClick,
|
|
325
315
|
titleBlockProps: titleBlockProps
|
|
326
|
-
})
|
|
316
|
+
});
|
|
327
317
|
}
|
|
328
318
|
return null;
|
|
329
319
|
};
|
|
@@ -338,23 +328,10 @@ const HoverCardContent = ({
|
|
|
338
328
|
}
|
|
339
329
|
};
|
|
340
330
|
const HoverCardContentWithViewVariant = props => {
|
|
341
|
-
const {
|
|
342
|
-
cardState,
|
|
343
|
-
actionOptions
|
|
344
|
-
} = props;
|
|
345
|
-
const rovoConfig = useRovoConfig();
|
|
346
|
-
const isResolved = useIsResolvedView(props);
|
|
347
331
|
const showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
|
|
348
|
-
const showRovoResolvedView = useMemo(() => isResolved && cardState.details && extractRovoChatAction({
|
|
349
|
-
response: cardState.details,
|
|
350
|
-
rovoConfig,
|
|
351
|
-
actionOptions
|
|
352
|
-
}) !== undefined, [actionOptions, cardState.details, rovoConfig, isResolved]);
|
|
353
332
|
const data = useMemo(() => {
|
|
354
333
|
let viewVariant = 'default';
|
|
355
|
-
if (
|
|
356
|
-
viewVariant = 'rovo-resolved-view';
|
|
357
|
-
} else if (showPreauthBetterHovercard) {
|
|
334
|
+
if (showPreauthBetterHovercard) {
|
|
358
335
|
viewVariant = 'rovo-unauthorised-view';
|
|
359
336
|
}
|
|
360
337
|
return {
|
|
@@ -362,17 +339,12 @@ const HoverCardContentWithViewVariant = props => {
|
|
|
362
339
|
viewVariant
|
|
363
340
|
}
|
|
364
341
|
};
|
|
365
|
-
}, [
|
|
342
|
+
}, [showPreauthBetterHovercard]);
|
|
366
343
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
367
344
|
data: data
|
|
368
|
-
}, /*#__PURE__*/React.createElement(HoverCardContent,
|
|
369
|
-
showRovoResolvedView: showRovoResolvedView
|
|
370
|
-
})));
|
|
345
|
+
}, /*#__PURE__*/React.createElement(HoverCardContent, props));
|
|
371
346
|
};
|
|
372
347
|
const _default_1 = componentWithCondition(() => {
|
|
373
|
-
|
|
374
|
-
const flagA = fg('platform_sl_3p_preauth_better_hovercard_killswitch');
|
|
375
|
-
const flagB = fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
376
|
-
return flagA || flagB;
|
|
348
|
+
return fg('platform_sl_3p_preauth_better_hovercard_killswitch');
|
|
377
349
|
}, HoverCardContentWithViewVariant, HoverCardContent);
|
|
378
350
|
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
|
const hiddenSnippetStyles = null;
|
|
@@ -23,7 +22,6 @@ const HoverCardResolvedView = ({
|
|
|
23
22
|
flexibleCardProps,
|
|
24
23
|
isAISummaryEnabled,
|
|
25
24
|
onActionClick,
|
|
26
|
-
showRovoResolvedView,
|
|
27
25
|
titleBlockProps,
|
|
28
26
|
id
|
|
29
27
|
}) => {
|
|
@@ -31,9 +29,6 @@ const HoverCardResolvedView = ({
|
|
|
31
29
|
const {
|
|
32
30
|
fireEvent
|
|
33
31
|
} = useAnalyticsEvents();
|
|
34
|
-
// We want to fire exposure event only for those cases when user otherwise can see the experiment which would be controlled
|
|
35
|
-
// by all the other condition defined above as a result of what was defined in actionOptions as well as in CardContext.
|
|
36
|
-
const is3PAuthRovoActionsExperimentOn = showRovoResolvedView && expValEquals('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
37
32
|
useEffect(() => {
|
|
38
33
|
// Since this hover view is only rendered on resolved status,
|
|
39
34
|
// there is no need to check for statuses.
|
|
@@ -81,8 +76,7 @@ const HoverCardResolvedView = ({
|
|
|
81
76
|
size: SmartLinkSize.Medium
|
|
82
77
|
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
83
78
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
84
|
-
placeholder: snippet
|
|
85
|
-
isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
|
|
79
|
+
placeholder: snippet
|
|
86
80
|
}) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
87
81
|
testId: "hidden-snippet",
|
|
88
82
|
onRender: onSnippetRender,
|
|
@@ -92,10 +86,7 @@ const HoverCardResolvedView = ({
|
|
|
92
86
|
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
93
87
|
onClick: onActionClick,
|
|
94
88
|
spaceInline: "space.100",
|
|
95
|
-
isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn,
|
|
96
89
|
className: ax(["_n3td1b66"])
|
|
97
|
-
}),
|
|
98
|
-
onActionClick: onActionClick
|
|
99
|
-
}) : /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
90
|
+
}), /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
100
91
|
};
|
|
101
92
|
export default HoverCardResolvedView;
|
|
@@ -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: "45.6.
|
|
12
|
+
packageVersion: "45.6.10",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -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
|
const baseStyle = null;
|
|
10
|
-
const
|
|
11
|
-
const textStyleOld = null;
|
|
8
|
+
const textStyle = null;
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* A component to render a response from AI in markdown text.
|
|
@@ -24,14 +21,11 @@ const AISummary = ({
|
|
|
24
21
|
if (!content && minHeight === 0) {
|
|
25
22
|
return null;
|
|
26
23
|
}
|
|
27
|
-
const is3pExperimentEnabled =
|
|
28
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
29
|
-
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
30
24
|
return /*#__PURE__*/React.createElement(Markdown, {
|
|
31
25
|
"data-testid": testId
|
|
32
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
33
27
|
,
|
|
34
|
-
className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv",
|
|
28
|
+
className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", "_syazazsu", className]),
|
|
35
29
|
children: content,
|
|
36
30
|
options: {
|
|
37
31
|
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 let 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 @@ const 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,69 +53,11 @@ export const getPromptAction = ({
|
|
|
59
53
|
}) => {
|
|
60
54
|
var _getContext;
|
|
61
55
|
const {
|
|
62
|
-
contextLong
|
|
63
|
-
contextShort
|
|
56
|
+
contextLong
|
|
64
57
|
} = (_getContext = getContext(intl, product)) !== null && _getContext !== void 0 ? _getContext : {
|
|
65
|
-
contextLong: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
66
|
-
contextShort: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
58
|
+
contextLong: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
67
59
|
};
|
|
68
60
|
switch (promptKey) {
|
|
69
|
-
case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
|
|
70
|
-
const label_recommend = intl.formatMessage(messages.rovo_prompt_button_recommend_other_sources);
|
|
71
|
-
const html_recommend = intl.formatMessage(messages.rovo_prompt_message_recommend_other_sources, {
|
|
72
|
-
context: contextLong,
|
|
73
|
-
url
|
|
74
|
-
}, {
|
|
75
|
-
ignoreTag: true
|
|
76
|
-
});
|
|
77
|
-
return {
|
|
78
|
-
icon: /*#__PURE__*/React.createElement(AIEditIcon, null),
|
|
79
|
-
content: label_recommend,
|
|
80
|
-
tooltipMessage: label_recommend,
|
|
81
|
-
data: {
|
|
82
|
-
name: label_recommend,
|
|
83
|
-
dialogues: [],
|
|
84
|
-
prompt: htmlToAdf(html_recommend)
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
case RovoChatPromptKey.SHOW_OTHER_MENTIONS:
|
|
88
|
-
const label_other_mentions = intl.formatMessage(messages.rovo_prompt_button_show_other_mentions);
|
|
89
|
-
const html_other_mentions = intl.formatMessage(messages.rovo_prompt_message_show_other_mentions, {
|
|
90
|
-
context: contextLong,
|
|
91
|
-
url
|
|
92
|
-
}, {
|
|
93
|
-
ignoreTag: true
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
icon: /*#__PURE__*/React.createElement(AiChapterIcon, null),
|
|
97
|
-
content: label_other_mentions,
|
|
98
|
-
tooltipMessage: label_other_mentions,
|
|
99
|
-
data: {
|
|
100
|
-
name: label_other_mentions,
|
|
101
|
-
dialogues: [],
|
|
102
|
-
prompt: htmlToAdf(html_other_mentions)
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
case RovoChatPromptKey.SUGGEST_IMPROVEMENT:
|
|
106
|
-
const label_improvement = intl.formatMessage(messages.rovo_prompt_button_suggest_improvement, {
|
|
107
|
-
context: contextShort
|
|
108
|
-
});
|
|
109
|
-
const html_improvement = intl.formatMessage(messages.rovo_prompt_message_suggest_improvement, {
|
|
110
|
-
context: contextLong,
|
|
111
|
-
url
|
|
112
|
-
}, {
|
|
113
|
-
ignoreTag: true
|
|
114
|
-
});
|
|
115
|
-
return {
|
|
116
|
-
icon: /*#__PURE__*/React.createElement(AISearchIcon, null),
|
|
117
|
-
content: label_improvement,
|
|
118
|
-
tooltipMessage: label_improvement,
|
|
119
|
-
data: {
|
|
120
|
-
name: label_improvement,
|
|
121
|
-
dialogues: [],
|
|
122
|
-
prompt: htmlToAdf(html_improvement)
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
61
|
case RovoChatPromptKey.SUMMARIZE_LINK:
|
|
126
62
|
const label_summarize = intl.formatMessage(messages.ai_summarize);
|
|
127
63
|
const html_summarize = intl.formatMessage(messages.rovo_prompt_message_summarize, {
|
|
@@ -24,12 +24,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
var extensionKey = getExtensionKey(response);
|
|
27
|
-
var isGoogleProvider = extensionKey === 'google-object-provider';
|
|
28
27
|
var isInlineExperimentEnabled = fg('platform_sl_3p_auth_inline_tailored_cta_killswitch') && expValEqualsNoExposure('platform_sl_3p_auth_inline_tailored_cta', 'isEnabled', true);
|
|
29
|
-
var is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
30
28
|
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) === 'CONFLUENCE';
|
|
31
29
|
var is3PEmbedPostAuthActionsEnabled = isEmbedRovoActionsFooterExperimentEnabled === true;
|
|
32
|
-
var isSupportedFeature =
|
|
30
|
+
var isSupportedFeature = is3PBlockPostAuthActionsEnabled || isInlineExperimentEnabled || is3PEmbedPostAuthActionsEnabled;
|
|
33
31
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
34
32
|
var url = extractSmartLinkUrl(response);
|
|
35
33
|
return isSupportedFeature && isOptIn ? {
|
package/dist/esm/messages.js
CHANGED
|
@@ -986,51 +986,11 @@ export var messages = defineMessages({
|
|
|
986
986
|
defaultMessage: 'Confluence page',
|
|
987
987
|
description: 'The Confluence page the user see Smart Link in, to be used as the {context} for Rovo prompt message'
|
|
988
988
|
},
|
|
989
|
-
rovo_prompt_context_confluence_page_short: {
|
|
990
|
-
id: 'fabric.linking.rovo_prompt_context_confluence_page_short.non-final',
|
|
991
|
-
defaultMessage: 'page',
|
|
992
|
-
description: 'The Confluence page the user see Smart Link in, to be used as the {context} for Rovo prompt message'
|
|
993
|
-
},
|
|
994
989
|
rovo_prompt_context_jira_work_item: {
|
|
995
990
|
id: 'fabric.linking.rovo_prompt_context_jira_work_item.non-final',
|
|
996
991
|
defaultMessage: 'Jira work item',
|
|
997
992
|
description: 'The Jira work item the user see Smart Link in, to be used as the {context} for Rovo prompt message'
|
|
998
993
|
},
|
|
999
|
-
rovo_prompt_context_jira_work_item_short: {
|
|
1000
|
-
id: 'fabric.linking.rovo_prompt_context_jira_work_item_short.non-final',
|
|
1001
|
-
defaultMessage: 'work item',
|
|
1002
|
-
description: 'The Jira work item the user see Smart Link in, to be used as the {context} for Rovo prompt message'
|
|
1003
|
-
},
|
|
1004
|
-
rovo_prompt_button_recommend_other_sources: {
|
|
1005
|
-
id: 'fabric.linking.rovo_prompt_button_recommend_other_sources.non-final',
|
|
1006
|
-
defaultMessage: 'Recommend other sources',
|
|
1007
|
-
description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
|
|
1008
|
-
},
|
|
1009
|
-
rovo_prompt_message_recommend_other_sources: {
|
|
1010
|
-
id: 'fabric.linking.rovo_prompt_message_recommend_other_sources.non-final',
|
|
1011
|
-
defaultMessage: '<p>From this <a>{url}</a> and the {context} I’m viewing now as context:</p><ul><li><p>Search across all sources I can access for items that discuss <b>similar concepts, themes, or problems</b>, or that <b>reference similar or closely related sources</b> (including links to the same or related pages, issues, or docs).</p></li><li><p>Return the results as a list or table with columns: <code>Item</code>, <code>Type</code>, <code>Short summary</code>, and <code>Why it’s similar</code>.</p></li><li><p>For each result, give a one‑sentence <b>Short summary</b> of what the item is about.</p></li><li><p>In <b>Why it’s similar</b>, briefly explain (in a phrase or short sentence) what makes it related to this Smart Link and/or the item I’m viewing (for example: same project, similar decision, shared requirements, overlapping stakeholders, similar metrics, or referencing related docs).</p></li><li><p>Order the list from <b>most to least relevant</b> based on Rovo’s assessment of semantic similarity to both the Smart Link target and the current item. Prioritize items that I do not own or have not contributed to.</p></li><li><p>If there are more than 5 results, show the <b>5 most relevant</b> and state how many additional items you found.</p></li></ul>',
|
|
1012
|
-
description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1013
|
-
},
|
|
1014
|
-
rovo_prompt_button_show_other_mentions: {
|
|
1015
|
-
id: 'fabric.linking.rovo_prompt_button_show_other_mentions.non-final',
|
|
1016
|
-
defaultMessage: 'Show other mentions',
|
|
1017
|
-
description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
|
|
1018
|
-
},
|
|
1019
|
-
rovo_prompt_message_show_other_mentions: {
|
|
1020
|
-
id: 'fabric.linking.rovo_prompt_message_show_other_mentions.non-final',
|
|
1021
|
-
defaultMessage: '<p>From <a>{url}</a> and the {context} I’m viewing now:</p><ul><li><p>Search across all Confluence pages and Jira work items I can access for other items that contain this exact Smart Link (same underlying URL/resource).</p></li><li><p>List all matching items in a table with columns: <code>Item</code>, <code>Type</code>, <code>Short summary</code>, <code>How this item uses the link</code>, and <code>Relevance to current item</code>.</p></li><li><p>For <code>Short summary</code>, give a one‑sentence description of what the {context} is about.</p></li><li><p>For <code>How this item uses the link</code>, briefly explain the role this link plays there (e.g., decision doc, background context, implementation details, status update).</p></li><li><p>For <code>Relevance to current item</code>, compare each item to the {context} I’m viewing now and label it <code>High</code>, <code>Medium</code>, or <code>Low</code> relevance, with a short reason (a phrase or single clause).</p></li><li><p>If there are more than 15 matches, show the 15 most relevant and tell me how many additional matches exist.</p></li></ul>',
|
|
1022
|
-
description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1023
|
-
},
|
|
1024
|
-
rovo_prompt_button_suggest_improvement: {
|
|
1025
|
-
id: 'fabric.linking.rovo_prompt_button_suggest_improvement.non-final',
|
|
1026
|
-
defaultMessage: 'Suggest {context} improvement',
|
|
1027
|
-
description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
|
|
1028
|
-
},
|
|
1029
|
-
rovo_prompt_message_suggest_improvement: {
|
|
1030
|
-
id: 'fabric.linking.rovo_prompt_message_suggest_improvement.non-final',
|
|
1031
|
-
defaultMessage: '<p>Using the {context} I’m viewing now, plus all files and links referenced in it (including <a>{url}</a>):</p><ul><li><p>Identify unclear reasoning, missing context, or contradictions between the item and its linked files.</p></li><li><p>Call out any places where assumptions are not backed up by data or prior docs.</p></li><li><p>Stay concise: summarize your findings in <b>no more than three short paragraphs of content listed as bullets</b> of no more than a couple of sentences long focused only on the two points above.</p></li><li><p>After presenting that summary, <b>ask me explicitly</b> if I want you to go deeper. Only if I say yes, then:</p><ul><li><p>Suggest concrete rewrites (bullets or short paragraphs) to make the argument clearer, more concise, and better aligned with the supporting files.</p></li><li><p>Propose 3–5 follow‑up edits or additions that would make this item and its linked docs “share‑ready” for stakeholders.</p></li></ul></li></ul>',
|
|
1032
|
-
description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
|
|
1033
|
-
},
|
|
1034
994
|
rovo_prompt_message_summarize: {
|
|
1035
995
|
id: 'fabric.linking.rovo_prompt_message_summarize.non-final',
|
|
1036
996
|
defaultMessage: '<p>Summarize the main ideas and key points of <a>{url}</a> in 3-5 clear, complete bullet points (markdown list).</p><p>Preserve important details such as names, dates, and key decisions.</p>',
|
|
@@ -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: "45.6.
|
|
7
|
+
packageVersion: "45.6.10" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
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,13 +35,14 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
33
35
|
onViewButtonClick = _ref.onViewButtonClick,
|
|
34
36
|
size = _ref.size,
|
|
35
37
|
testId = _ref.testId,
|
|
36
|
-
title = _ref.title
|
|
38
|
+
title = _ref.title,
|
|
39
|
+
focusRef = _ref.focusRef;
|
|
37
40
|
var _useModal = useModal(),
|
|
38
41
|
onClose = _useModal.onClose;
|
|
39
42
|
var _useIntl = useIntl(),
|
|
40
43
|
formatMessage = _useIntl.formatMessage;
|
|
41
44
|
var downloadButton = useMemo(function () {
|
|
42
|
-
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
45
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
43
46
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
44
47
|
icon: function icon() {
|
|
45
48
|
return /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
@@ -51,15 +54,17 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
51
54
|
label: formatMessage(messages.download),
|
|
52
55
|
onClick: onDownloadButtonClick,
|
|
53
56
|
testId: "".concat(testId, "-download")
|
|
54
|
-
})
|
|
55
|
-
|
|
57
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
58
|
+
focusRef: focusRef
|
|
59
|
+
} : {}));
|
|
60
|
+
}, [onDownloadButtonClick, testId, formatMessage, focusRef]);
|
|
56
61
|
var urlButton = useMemo(function () {
|
|
57
62
|
if (onViewButtonClick) {
|
|
58
63
|
var label = providerName ? formatMessage(messages.viewInProvider, {
|
|
59
64
|
providerName: providerName
|
|
60
65
|
}) : formatMessage(messages.viewOriginal);
|
|
61
66
|
var content = providerName ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.viewIn), " ", providerName) : /*#__PURE__*/React.createElement(FormattedMessage, messages.viewOriginal);
|
|
62
|
-
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
67
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
63
68
|
content: content,
|
|
64
69
|
icon: function icon() {
|
|
65
70
|
return /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
@@ -72,9 +77,11 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
72
77
|
onClick: onViewButtonClick,
|
|
73
78
|
testId: "".concat(testId, "-url"),
|
|
74
79
|
role: 'link'
|
|
75
|
-
})
|
|
80
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
81
|
+
focusRef: !onDownloadButtonClick ? focusRef : undefined
|
|
82
|
+
} : {}));
|
|
76
83
|
}
|
|
77
|
-
}, [onViewButtonClick, providerName, testId, formatMessage]);
|
|
84
|
+
}, [onViewButtonClick, providerName, testId, formatMessage, onDownloadButtonClick, focusRef]);
|
|
78
85
|
var sizeButton = useMemo(function () {
|
|
79
86
|
var isFullScreen = size === MAX_MODAL_SIZE;
|
|
80
87
|
var 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
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
@@ -8,14 +10,15 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
8
10
|
label = _ref.label,
|
|
9
11
|
onClick = _ref.onClick,
|
|
10
12
|
testId = _ref.testId,
|
|
11
|
-
role = _ref.role
|
|
13
|
+
role = _ref.role,
|
|
14
|
+
focusRef = _ref.focusRef;
|
|
12
15
|
var onMouseDown = useMouseDownEvent();
|
|
13
16
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14
17
|
content: content,
|
|
15
18
|
hideTooltipOnClick: true,
|
|
16
19
|
tag: "span",
|
|
17
20
|
testId: "".concat(testId, "-tooltip")
|
|
18
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
21
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
19
22
|
appearance: "subtle",
|
|
20
23
|
icon: icon,
|
|
21
24
|
label: label,
|
|
@@ -23,6 +26,8 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
23
26
|
onMouseDown: onMouseDown,
|
|
24
27
|
testId: "".concat(testId, "-button"),
|
|
25
28
|
role: role
|
|
26
|
-
})
|
|
29
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
30
|
+
ref: focusRef
|
|
31
|
+
} : {})));
|
|
27
32
|
};
|
|
28
33
|
export default LinkInfoButton;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import React, { useCallback, useRef, useState } from 'react';
|
|
3
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
4
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
6
7
|
import { SmartLinkSize } from '../../constants';
|
|
7
8
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -116,6 +117,30 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
116
117
|
if (previewUrl && isSupportTheming) {
|
|
117
118
|
previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
|
|
118
119
|
}
|
|
120
|
+
var focusRef = useRef(null);
|
|
121
|
+
var hasRestoredFocus = useRef(false);
|
|
122
|
+
useEffect(function () {
|
|
123
|
+
if (!isOpen || !fg('navx-4719-a11y-embed-modal-focus-states')) {
|
|
124
|
+
hasRestoredFocus.current = false;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
var handleWindowBlur = function handleWindowBlur() {
|
|
128
|
+
if (hasRestoredFocus.current) return;
|
|
129
|
+
setTimeout(function () {
|
|
130
|
+
var _focusRef$current;
|
|
131
|
+
// document.hasFocus() returns true when focus moved to an
|
|
132
|
+
// iframe on the same page, false when the window itself
|
|
133
|
+
// lost focus (e.g. user switched browser tabs)
|
|
134
|
+
if (!document.hasFocus()) return;
|
|
135
|
+
hasRestoredFocus.current = true;
|
|
136
|
+
(_focusRef$current = focusRef.current) === null || _focusRef$current === void 0 || _focusRef$current.focus();
|
|
137
|
+
}, 0);
|
|
138
|
+
};
|
|
139
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
140
|
+
return function () {
|
|
141
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
142
|
+
};
|
|
143
|
+
}, [isOpen]);
|
|
119
144
|
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
|
|
120
145
|
height: "100%",
|
|
121
146
|
onClose: handleOnClose,
|
|
@@ -125,7 +150,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
125
150
|
width: width,
|
|
126
151
|
label: title,
|
|
127
152
|
isBlanketHidden: isBlanketHidden
|
|
128
|
-
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
153
|
+
}, /*#__PURE__*/React.createElement(LinkInfo, _extends({
|
|
129
154
|
icon: linkIcon && {
|
|
130
155
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
131
156
|
size: SmartLinkSize.Large
|
|
@@ -139,7 +164,9 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
139
164
|
size: width,
|
|
140
165
|
title: title,
|
|
141
166
|
testId: testId
|
|
142
|
-
}
|
|
167
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
168
|
+
focusRef: focusRef
|
|
169
|
+
} : {})), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(EmbedContent, {
|
|
143
170
|
isTrusted: isTrusted,
|
|
144
171
|
name: iframeName,
|
|
145
172
|
src: previewUrl,
|
package/dist/esm/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
|
var styles = {
|
|
@@ -34,11 +33,14 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
34
33
|
onClickCallback();
|
|
35
34
|
}
|
|
36
35
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
36
|
+
|
|
37
|
+
// FIX-ME: This is required for ResolvedHoverCardFooterBlock action to show proper size
|
|
38
|
+
// ResolvedHoverCardFooterBlock is currently not used but keeping inside the code base for
|
|
39
|
+
// upcoming experiment to refresh HoverCard design
|
|
40
|
+
// If ResolvedHoverCardFooterBlock is cleaned up, this code can be removed.
|
|
41
|
+
var showSpinnerSize24 = false;
|
|
40
42
|
var icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
41
|
-
icon:
|
|
43
|
+
icon: showSpinnerSize24 ? /*#__PURE__*/React.createElement(Box, {
|
|
42
44
|
xcss: styles.spinner
|
|
43
45
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
44
46
|
size: 16,
|
|
@@ -55,7 +57,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
55
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
56
58
|
,
|
|
57
59
|
style: style
|
|
58
|
-
}, fg('
|
|
60
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
59
61
|
'aria-label': ariaLabel
|
|
60
62
|
} : {}), /*#__PURE__*/React.createElement(Inline, {
|
|
61
63
|
alignBlock: "center",
|
|
@@ -18,7 +18,7 @@ export var AISummaryActionComponent = function AISummaryActionComponent(props) {
|
|
|
18
18
|
useEffect(function () {
|
|
19
19
|
onLoadingChange === null || onLoadingChange === void 0 || onLoadingChange(status === 'loading');
|
|
20
20
|
}, [onLoadingChange, status]);
|
|
21
|
-
return status === 'done' ? fg('
|
|
21
|
+
return status === 'done' ? fg('platform_sl_action_refactoring') ? /*#__PURE__*/React.createElement(CopySummaryActionNew, _extends({}, props, {
|
|
22
22
|
summary: content,
|
|
23
23
|
testId: testId
|
|
24
24
|
})) : /*#__PURE__*/React.createElement(CopySummaryAction, _extends({}, props, {
|
|
@@ -73,7 +73,7 @@ var FollowAction = function FollowAction(props) {
|
|
|
73
73
|
};
|
|
74
74
|
return /*#__PURE__*/React.createElement(ServerAction, _extends({
|
|
75
75
|
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
76
|
-
}, fg('
|
|
76
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
77
77
|
ariaLabel: intl.formatMessage(label)
|
|
78
78
|
} : {}, {
|
|
79
79
|
icon: followIcon,
|
|
@@ -12,10 +12,9 @@ import { ActionName } from '../../../../../constants';
|
|
|
12
12
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
13
13
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
14
14
|
import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
|
|
15
|
-
import { getPromptAction
|
|
15
|
+
import { getPromptAction } from '../../../../common/rovo-chat-utils';
|
|
16
16
|
import Action from '../action';
|
|
17
|
-
var
|
|
18
|
-
var DEFAULT_PROMPTS = GOOGLE_PROMPTS;
|
|
17
|
+
var DEFAULT_PROMPTS = [];
|
|
19
18
|
var RovoChatAction = function RovoChatAction(_ref) {
|
|
20
19
|
var _context$actions;
|
|
21
20
|
var onClickCallback = _ref.onClick,
|