@atlaskit/smart-card 46.13.7 → 46.13.8

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  4. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  5. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  6. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  7. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  8. package/dist/cjs/messages.js +10 -0
  9. package/dist/cjs/state/hooks/use-block-card-rovo-action-experiment/index.js +2 -0
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/utils/is-rovo-chat-action-visualize-enabled.js +43 -0
  12. package/dist/cjs/utils/is-special-key.js +1 -4
  13. package/dist/cjs/view/BlockCard/views/ResolvedView.js +9 -2
  14. package/dist/cjs/view/EmbedCard/components/rovo-actions-footer/index.js +4 -1
  15. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +5 -2
  16. package/dist/cjs/view/InlineCard/common/rovo-actions-cta/index.js +28 -5
  17. package/dist/cjs/view/LinkUrl/index.js +1 -1
  18. package/dist/cjs/view/common/rovo-chat-utils/index.js +28 -0
  19. package/dist/cjs/view/common/rovo-post-auth-prompts/index.js +16 -1
  20. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  21. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  22. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  23. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  24. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  25. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  26. package/dist/es2019/messages.js +10 -0
  27. package/dist/es2019/state/hooks/use-block-card-rovo-action-experiment/index.js +2 -0
  28. package/dist/es2019/utils/analytics/analytics.js +1 -1
  29. package/dist/es2019/utils/is-rovo-chat-action-visualize-enabled.js +34 -0
  30. package/dist/es2019/utils/is-special-key.js +1 -5
  31. package/dist/es2019/view/BlockCard/views/ResolvedView.js +9 -2
  32. package/dist/es2019/view/EmbedCard/components/rovo-actions-footer/index.js +5 -2
  33. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +5 -2
  34. package/dist/es2019/view/InlineCard/common/rovo-actions-cta/index.js +28 -5
  35. package/dist/es2019/view/LinkUrl/index.js +1 -1
  36. package/dist/es2019/view/common/rovo-chat-utils/index.js +26 -0
  37. package/dist/es2019/view/common/rovo-post-auth-prompts/index.js +15 -1
  38. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  39. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  40. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  41. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  42. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +3 -0
  43. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +3 -0
  44. package/dist/esm/messages.js +10 -0
  45. package/dist/esm/state/hooks/use-block-card-rovo-action-experiment/index.js +2 -0
  46. package/dist/esm/utils/analytics/analytics.js +1 -1
  47. package/dist/esm/utils/is-rovo-chat-action-visualize-enabled.js +37 -0
  48. package/dist/esm/utils/is-special-key.js +1 -5
  49. package/dist/esm/view/BlockCard/views/ResolvedView.js +9 -2
  50. package/dist/esm/view/EmbedCard/components/rovo-actions-footer/index.js +5 -2
  51. package/dist/esm/view/EmbedCard/views/ResolvedView.js +5 -2
  52. package/dist/esm/view/InlineCard/common/rovo-actions-cta/index.js +28 -5
  53. package/dist/esm/view/LinkUrl/index.js +1 -1
  54. package/dist/esm/view/common/rovo-chat-utils/index.js +28 -0
  55. package/dist/esm/view/common/rovo-post-auth-prompts/index.js +16 -1
  56. package/dist/types/messages.d.ts +1 -1
  57. package/dist/types/utils/is-rovo-chat-action-visualize-enabled.d.ts +18 -0
  58. package/dist/types/utils/is-special-key.d.ts +0 -2
  59. package/dist/types/view/EmbedCard/components/rovo-actions-footer/index.d.ts +1 -1
  60. package/dist/types/view/common/rovo-chat-utils/index.d.ts +2 -1
  61. package/dist/types/view/common/rovo-post-auth-prompts/index.d.ts +10 -1
  62. package/package.json +2 -4
@@ -13,6 +13,7 @@ import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-act
13
13
  import useRovoChat from '../../../../state/hooks/use-rovo-chat';
14
14
  import useRovoConfig from '../../../../state/hooks/use-rovo-config';
15
15
  import { useSmartCardState } from '../../../../state/store';
16
+ import { isRovoChatActionVisualizeEnabled } from '../../../../utils/is-rovo-chat-action-visualize-enabled';
16
17
  import { getPromptAction, RovoChatPromptKey } from '../../../common/rovo-chat-utils';
17
18
  import { ActionButton } from '../action-button';
18
19
  import { OneClickChatSpotlightLoader } from '../one-click-chat-spotlight/async';
@@ -48,11 +49,19 @@ const InlineRovoActionButtonLegacy = ({
48
49
  const invoke = useInvokeClientAction({});
49
50
  const promptKey = useMemo(() => {
50
51
  var _cardState$details, _cardState$details$da, _cardState$details$da2, _cardState$details2, _cardState$details2$d, _cardState$details2$d2;
51
- if (extensionKey === 'google-object-provider' && (_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && (_cardState$details$da = _cardState$details.data) !== null && _cardState$details$da !== void 0 && (_cardState$details$da2 = _cardState$details$da['@type']) !== null && _cardState$details$da2 !== void 0 && _cardState$details$da2.includes('schema:SpreadsheetDigitalDocument')) {
52
- return;
53
- }
54
52
  switch (extensionKey) {
55
53
  case 'google-object-provider':
54
+ if ((_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && (_cardState$details$da = _cardState$details.data) !== null && _cardState$details$da !== void 0 && (_cardState$details$da2 = _cardState$details$da['@type']) !== null && _cardState$details$da2 !== void 0 && _cardState$details$da2.includes('schema:SpreadsheetDigitalDocument')) {
55
+ // Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
56
+ if (rovoChatAction && isRovoChatActionVisualizeEnabled({
57
+ extensionKey,
58
+ product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
59
+ response: cardState.details
60
+ })) {
61
+ return RovoChatPromptKey.VISUALIZE;
62
+ }
63
+ return;
64
+ }
56
65
  if ((_cardState$details2 = cardState.details) !== null && _cardState$details2 !== void 0 && (_cardState$details2$d = _cardState$details2.data) !== null && _cardState$details2$d !== void 0 && (_cardState$details2$d2 = _cardState$details2$d['@type']) !== null && _cardState$details2$d2 !== void 0 && _cardState$details2$d2.includes('schema:PresentationDigitalDocument')) {
57
66
  return RovoChatPromptKey.SUMMARIZE_PRESENTATION;
58
67
  }
@@ -68,7 +77,7 @@ const InlineRovoActionButtonLegacy = ({
68
77
  case 'salesforce-object-provider':
69
78
  return RovoChatPromptKey.SALESFORCE_PREP;
70
79
  }
71
- }, [extensionKey, cardState]);
80
+ }, [extensionKey, cardState, rovoChatAction, rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product]);
72
81
  const {
73
82
  data: promptData,
74
83
  content,
@@ -127,6 +136,14 @@ const InlineRovoActionButtonWithSpotlight = ({
127
136
  const promptKey = useMemo(() => {
128
137
  var _cardState$details3, _cardState$details3$d, _cardState$details3$d2, _cardState$details4, _cardState$details4$d, _cardState$details4$d2;
129
138
  if (extensionKey === 'google-object-provider' && (_cardState$details3 = cardState.details) !== null && _cardState$details3 !== void 0 && (_cardState$details3$d = _cardState$details3.data) !== null && _cardState$details3$d !== void 0 && (_cardState$details3$d2 = _cardState$details3$d['@type']) !== null && _cardState$details3$d2 !== void 0 && _cardState$details3$d2.includes('schema:SpreadsheetDigitalDocument')) {
139
+ // Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
140
+ if (rovoChatAction && isRovoChatActionVisualizeEnabled({
141
+ extensionKey,
142
+ product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
143
+ response: cardState.details
144
+ })) {
145
+ return RovoChatPromptKey.VISUALIZE;
146
+ }
130
147
  return;
131
148
  }
132
149
  switch (extensionKey) {
@@ -146,7 +163,7 @@ const InlineRovoActionButtonWithSpotlight = ({
146
163
  case 'salesforce-object-provider':
147
164
  return RovoChatPromptKey.SALESFORCE_PREP;
148
165
  }
149
- }, [extensionKey, cardState]);
166
+ }, [extensionKey, cardState, rovoChatAction, rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product]);
150
167
  const {
151
168
  data: promptData,
152
169
  content,
@@ -181,6 +198,12 @@ const InlineRovoActionButtonWithSpotlight = ({
181
198
  }, /*#__PURE__*/React.createElement(Text, {
182
199
  size: "small"
183
200
  }, content))) : null;
201
+
202
+ // Visualize is not part of the spotlight: its copy is generic ("See takeaways") and Sheets
203
+ // links are excluded from the spotlight experiment, so render the plain button.
204
+ if (promptKey === RovoChatPromptKey.VISUALIZE) {
205
+ return button;
206
+ }
184
207
  return button && isRovoChatEnabled && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction ? /*#__PURE__*/React.createElement(OneClickChatSpotlightLoader, {
185
208
  key: url,
186
209
  url: url,
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "46.13.6",
12
+ packageVersion: "46.13.7",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const LinkUrl = ({
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import AiSearchIcon from '@atlaskit/icon-lab/core/ai-search';
3
3
  import AiChatIcon from '@atlaskit/icon/core/ai-chat';
4
4
  import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
5
+ import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
5
6
  import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
6
7
  import { RovoIcon } from '@atlaskit/logo/rovo/icon';
7
8
  import { CardDisplay } from '../../../constants';
@@ -25,6 +26,7 @@ export let RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
25
26
  RovoChatPromptKey["EXPLAIN_CODE"] = "explain-code";
26
27
  RovoChatPromptKey["CATCH_UP"] = "catch-up";
27
28
  RovoChatPromptKey["SALESFORCE_PREP"] = "salesforce-prep";
29
+ RovoChatPromptKey["VISUALIZE"] = "visualize";
28
30
  return RovoChatPromptKey;
29
31
  }({});
30
32
  const getContext = (intl, product) => {
@@ -365,5 +367,29 @@ export const getPromptAction = ({
365
367
  size: iconSize
366
368
  })
367
369
  };
370
+ case RovoChatPromptKey.VISUALIZE:
371
+ const label_visualize = intl.formatMessage(messages.rovo_prompt_button_visualize);
372
+ const html_visualize = intl.formatMessage(messages.rovo_prompt_message_visualize, {
373
+ url
374
+ }, {
375
+ ignoreTag: true
376
+ });
377
+ const visualizeIconProps = {
378
+ label: label_visualize,
379
+ size: iconSize,
380
+ ...(cardAppearance === CardDisplay.HoverCardPreview ? {
381
+ spacing: 'spacious'
382
+ } : {})
383
+ };
384
+ return {
385
+ content: label_visualize,
386
+ tooltipMessage: label_visualize,
387
+ data: {
388
+ name: label_visualize,
389
+ dialogues: [],
390
+ prompt: htmlToAdf(html_visualize)
391
+ },
392
+ icon: /*#__PURE__*/React.createElement(ChartBarIcon, visualizeIconProps)
393
+ };
368
394
  }
369
395
  };
@@ -1,10 +1,24 @@
1
+ import { isRovoChatActionVisualizeEnabled } from '../../../utils/is-rovo-chat-action-visualize-enabled';
1
2
  import { RovoChatPromptKey } from '../rovo-chat-utils';
2
3
  export const getRovoPostAuthPromptKeys = ({
3
- extensionKey
4
+ extensionKey,
5
+ isRovoChatActionShown = false,
6
+ product,
7
+ response
4
8
  }) => {
5
9
  const defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
6
10
  if (extensionKey === 'github-object-provider' || extensionKey === 'gitlab-object-provider') {
7
11
  return [RovoChatPromptKey.EXPLAIN_CODE, ...defaultPrompts];
8
12
  }
13
+ if (isRovoChatActionShown && isRovoChatActionVisualizeEnabled({
14
+ extensionKey,
15
+ product,
16
+ response
17
+ })) {
18
+ // Visualize goes first (PM decision). The embed Rovo actions footer hides every prompt after
19
+ // the first below 320px (HIDE_SECONDARY_ACTIONS_WIDTH), so this keeps Visualize visible on
20
+ // narrow embeds whenever exposure fires.
21
+ return [RovoChatPromptKey.VISUALIZE, RovoChatPromptKey.SUMMARIZE_DOCUMENT, ...defaultPrompts];
22
+ }
9
23
  return [RovoChatPromptKey.SUMMARIZE_DOCUMENT, ...defaultPrompts];
10
24
  };
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ee0b8e92f9b9c2b3ef643ddd4e755acaff8fd52fb3006b4f413390039d170dc
3
+ size 15497
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27b5287bebe80d65e79b2e2aad2482266f37cc3a30355fa0fd03723d6fbe1ab8
3
+ size 14553
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c95a690756802b01e261263cfa50f0e618423cba1d794ac64304d8a00e3a11a
3
+ size 13556
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6211d122b7ed1b0a8ebd4a1638b7898affa4956ad73122166d837e4995c1757c
3
+ size 12961
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db641c996de33386cdc38f5196e715e29fb02c19557707ee2ff3e7b7298b3327
3
+ size 3898
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b730f2848a00ea72ec96045cac382e4a3cd3b1f1f19d5a64e39e307e68f07d05
3
+ size 2802
@@ -1111,5 +1111,15 @@ export var messages = defineMessages({
1111
1111
  id: 'fabric.linking.pre_auth_block_social_proof_low',
1112
1112
  defaultMessage: 'Your team sees richer <b>{provider}</b> previews.',
1113
1113
  description: 'Social proof message shown on unauthorized 3P block cards when less than 30% of the tenant has connected the provider. {provider} is the 3P app name (e.g. OneDrive).'
1114
+ },
1115
+ rovo_prompt_button_visualize: {
1116
+ id: 'fabric.linking.rovo_prompt_button_visualize.non-final',
1117
+ defaultMessage: 'Visualize',
1118
+ description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
1119
+ },
1120
+ rovo_prompt_message_visualize: {
1121
+ id: 'fabric.linking.rovo_prompt_message_visualize.non-final',
1122
+ defaultMessage: '<p>Visualize this link <a>{url}</a></p>',
1123
+ description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
1114
1124
  }
1115
1125
  });
@@ -25,6 +25,8 @@ var useBlockCardRovoAction = function useBlockCardRovoAction(url, actionOptions)
25
25
  var isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
26
26
  var cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
27
27
  var extensionKey = getExtensionKey(cardState.details);
28
+ // TODO: ASIMO-5567 - Also check canShowAction(CardAction.RovoChatAction, actionOptions) so the
29
+ // hook returns false when the consumer hides the Rovo chat action via actionOptions.hide/exclude.
28
30
  var isRovoChatActionOptedIn = (_actionOptions$rovoCh = actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh2 = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh2 === void 0 ? void 0 : _actionOptions$rovoCh2.optIn) !== null && _actionOptions$rovoCh !== void 0 ? _actionOptions$rovoCh : false;
29
31
  return useMemo(function () {
30
32
  if (!isRovoChatEnabled || !url || !isRovoChatActionOptedIn) {
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "46.13.6" || ''
7
+ packageVersion: "46.13.7" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,37 @@
1
+ import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
2
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
+ /**
4
+ * Rollout state only (kill switch, then experiment). Evaluating the experiment
5
+ * fires exposure, so this must run after every business rule has passed.
6
+ * Remove this function on experiment cleanup; the business rules stay.
7
+ */
8
+ var isVisualizeExperimentEnabled = function isVisualizeExperimentEnabled() {
9
+ return fg('platform_sl_3p_auth_visualize_killswitch') && expVal('platform_sl_3p_auth_visualize_exp', 'isEnabled', false);
10
+ };
11
+
12
+ /**
13
+ * `@type` is a string or string array per JSON-LD, but it comes from the network, so guard
14
+ * against any other shape rather than calling `.includes` on it directly.
15
+ */
16
+ var isGoogleSheetsType = function isGoogleSheetsType(response) {
17
+ var _response$data;
18
+ var type = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data['@type'];
19
+ var types = Array.isArray(type) ? type : [type];
20
+ return types.includes('schema:SpreadsheetDigitalDocument');
21
+ };
22
+
23
+ /**
24
+ * Whether the Rovo chat "Visualize" action is offered for a resolved link.
25
+ *
26
+ * Business rules: Google Sheets links in Confluence.
27
+ *
28
+ * Callers must only call this once the Rovo chat action will be shown for the
29
+ * link (resolved, Rovo chat enabled, opted in and not hidden), so experiment
30
+ * exposure matches what the user sees.
31
+ */
32
+ export var isRovoChatActionVisualizeEnabled = function isRovoChatActionVisualizeEnabled(_ref) {
33
+ var extensionKey = _ref.extensionKey,
34
+ product = _ref.product,
35
+ response = _ref.response;
36
+ return product === 'CONFLUENCE' && extensionKey === 'google-object-provider' && isGoogleSheetsType(response) && isVisualizeExperimentEnabled();
37
+ };
@@ -1,16 +1,12 @@
1
- import { fg } from '@atlaskit/platform-feature-flags/fg';
2
-
3
1
  /**
4
2
  * Meta key = cmd on mac, windows key on windows
5
3
  * Ctrl key on mac by default triggers a right click instead of left click
6
4
  * Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
7
- * Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
8
- * link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
9
5
  *
10
6
  * `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
11
7
  * On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
12
8
  * in which case typically only a standard clickthrough will occur, this is likely a small portion of events
13
9
  */
14
10
  export var isSpecialKey = function isSpecialKey(event) {
15
- return fg('platform-smart-card-shift-key') ? event.metaKey || event.ctrlKey || event.shiftKey : event.metaKey || event.ctrlKey;
11
+ return event.metaKey || event.ctrlKey;
16
12
  };
@@ -11,6 +11,7 @@ import extractRovoChatAction from '../../../extractors/flexible/actions/extract-
11
11
  import { getExtensionKey } from '../../../state/getExtensionKey';
12
12
  import useBlockCardRovoAction from '../../../state/hooks/use-block-card-rovo-action-experiment';
13
13
  import useRovoConfig from '../../../state/hooks/use-rovo-config';
14
+ import { isRovoChatActionVisualizeEnabled } from '../../../utils/is-rovo-chat-action-visualize-enabled';
14
15
  import { RovoChatPromptKey } from '../../common/rovo-chat-utils';
15
16
  import FlexibleCard from '../../FlexibleCard';
16
17
  import { default as FooterBlock } from '../../FlexibleCard/components/blocks/footer-block';
@@ -31,7 +32,6 @@ var footerBlockSafariStyles = null;
31
32
  * @see FlexibleCardProps
32
33
  */
33
34
  var ResolvedView = function ResolvedView(_ref) {
34
- var _cardState$details2;
35
35
  var cardState = _ref.cardState,
36
36
  onClick = _ref.onClick,
37
37
  onAuxClick = _ref.onAuxClick,
@@ -77,12 +77,19 @@ var ResolvedView = function ResolvedView(_ref) {
77
77
  return [RovoChatPromptKey.IDENTIFY_KEY_POINTS].concat(defaultPrompts);
78
78
  }
79
79
  if (extensionKey === 'google-object-provider' && linkType !== null && linkType !== void 0 && linkType.includes('schema:SpreadsheetDigitalDocument')) {
80
+ if (isRovoChatActionVisualizeEnabled({
81
+ extensionKey: extensionKey,
82
+ product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
83
+ response: cardState === null || cardState === void 0 ? void 0 : cardState.details
84
+ })) {
85
+ return [RovoChatPromptKey.IDENTIFY_KEY_TRENDS, RovoChatPromptKey.VISUALIZE].concat(defaultPrompts);
86
+ }
80
87
  return [RovoChatPromptKey.IDENTIFY_KEY_TRENDS].concat(defaultPrompts);
81
88
  }
82
89
  return [RovoChatPromptKey.SUMMARIZE_LINK].concat(defaultPrompts);
83
90
  }
84
91
  return [];
85
- }, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey, is3PRovoBlockRovoActionEnabled]);
92
+ }, [cardState === null || cardState === void 0 ? void 0 : cardState.details, extensionKey, is3PRovoBlockRovoActionEnabled, rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product]);
86
93
  var footerActions = useMemo(function () {
87
94
  var showRovoResolvedView = (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved' && cardState.details && extractRovoChatAction({
88
95
  response: cardState.details,
@@ -13,7 +13,7 @@ import Button from '@atlaskit/button/default/button';
13
13
  import { WidthObserver } from '@atlaskit/width-detector/width-observer';
14
14
  import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-action';
15
15
  import useRovoChat from '../../../../state/hooks/use-rovo-chat';
16
- import { getPromptAction } from '../../../common/rovo-chat-utils';
16
+ import { getPromptAction, RovoChatPromptKey } from '../../../common/rovo-chat-utils';
17
17
  import AIEditIcon from '../../../FlexibleCard/assets/ai-edit-icon';
18
18
  var HIDE_SECONDARY_ACTIONS_WIDTH = 320;
19
19
  var PRIMARY_ACTION_ICON_ONLY_WIDTH = 220;
@@ -102,9 +102,12 @@ var EmbedRovoActionsFooter = function EmbedRovoActionsFooter(_ref2) {
102
102
  return actions;
103
103
  }
104
104
  var isPrimaryAction = actions.length === 0;
105
+ // The primary action normally uses the branded AI icon. Visualize keeps its own
106
+ // chart icon so the action stays recognisable, including in the icon-only view.
107
+ var shouldUseBrandedIcon = isPrimaryAction && promptKey !== RovoChatPromptKey.VISUALIZE;
105
108
  actions.push( /*#__PURE__*/React.createElement(RovoPromptButton, {
106
109
  hideContent: isPrimaryAction && shouldHidePrimaryActionContent,
107
- icon: isPrimaryAction ? /*#__PURE__*/React.createElement(AIEditIcon, null) : promptAction.icon,
110
+ icon: shouldUseBrandedIcon ? /*#__PURE__*/React.createElement(AIEditIcon, null) : promptAction.icon,
108
111
  key: promptKey,
109
112
  onClick: onClick,
110
113
  promptAction: promptAction,
@@ -71,9 +71,12 @@ var EmbedFrameWithRovoFooter = function EmbedFrameWithRovoFooter(_ref) {
71
71
  return [];
72
72
  }
73
73
  return getRovoPostAuthPromptKeys({
74
- extensionKey: getExtensionKey(details)
74
+ extensionKey: getExtensionKey(details),
75
+ isRovoChatActionShown: !!rovoActionData,
76
+ product: product,
77
+ response: details
75
78
  });
76
- }, [details, isEmbedRovoActionsFooterEnabled]);
79
+ }, [details, isEmbedRovoActionsFooterEnabled, product, rovoActionData]);
77
80
  var footer = React.useMemo(function () {
78
81
  return rovoActionData && prompts.length > 0 ? fg('platform_sl_replace_react_loadable') ? /*#__PURE__*/React.createElement(LazyEmbedRovoActionsFooter, {
79
82
  actionData: rovoActionData,
@@ -18,6 +18,7 @@ import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-act
18
18
  import useRovoChat from '../../../../state/hooks/use-rovo-chat';
19
19
  import useRovoConfig from '../../../../state/hooks/use-rovo-config';
20
20
  import { useSmartCardState } from '../../../../state/store';
21
+ import { isRovoChatActionVisualizeEnabled } from '../../../../utils/is-rovo-chat-action-visualize-enabled';
21
22
  import { getPromptAction, RovoChatPromptKey } from '../../../common/rovo-chat-utils';
22
23
  import { ActionButton } from '../action-button';
23
24
  import { OneClickChatSpotlightLoader } from '../one-click-chat-spotlight/async';
@@ -53,11 +54,19 @@ var InlineRovoActionButtonLegacy = function InlineRovoActionButtonLegacy(_ref) {
53
54
  var invoke = useInvokeClientAction({});
54
55
  var promptKey = useMemo(function () {
55
56
  var _cardState$details, _cardState$details2;
56
- if (extensionKey === 'google-object-provider' && (_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details.data) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details['@type']) !== null && _cardState$details !== void 0 && _cardState$details.includes('schema:SpreadsheetDigitalDocument')) {
57
- return;
58
- }
59
57
  switch (extensionKey) {
60
58
  case 'google-object-provider':
59
+ if ((_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details.data) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details['@type']) !== null && _cardState$details !== void 0 && _cardState$details.includes('schema:SpreadsheetDigitalDocument')) {
60
+ // Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
61
+ if (rovoChatAction && isRovoChatActionVisualizeEnabled({
62
+ extensionKey: extensionKey,
63
+ product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
64
+ response: cardState.details
65
+ })) {
66
+ return RovoChatPromptKey.VISUALIZE;
67
+ }
68
+ return;
69
+ }
61
70
  if ((_cardState$details2 = cardState.details) !== null && _cardState$details2 !== void 0 && (_cardState$details2 = _cardState$details2.data) !== null && _cardState$details2 !== void 0 && (_cardState$details2 = _cardState$details2['@type']) !== null && _cardState$details2 !== void 0 && _cardState$details2.includes('schema:PresentationDigitalDocument')) {
62
71
  return RovoChatPromptKey.SUMMARIZE_PRESENTATION;
63
72
  }
@@ -73,7 +82,7 @@ var InlineRovoActionButtonLegacy = function InlineRovoActionButtonLegacy(_ref) {
73
82
  case 'salesforce-object-provider':
74
83
  return RovoChatPromptKey.SALESFORCE_PREP;
75
84
  }
76
- }, [extensionKey, cardState]);
85
+ }, [extensionKey, cardState, rovoChatAction, rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product]);
77
86
  var _ref2 = promptKey ? getPromptAction({
78
87
  promptKey: promptKey,
79
88
  intl: intl,
@@ -144,6 +153,14 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
144
153
  var promptKey = useMemo(function () {
145
154
  var _cardState$details3, _cardState$details4;
146
155
  if (extensionKey === 'google-object-provider' && (_cardState$details3 = cardState.details) !== null && _cardState$details3 !== void 0 && (_cardState$details3 = _cardState$details3.data) !== null && _cardState$details3 !== void 0 && (_cardState$details3 = _cardState$details3['@type']) !== null && _cardState$details3 !== void 0 && _cardState$details3.includes('schema:SpreadsheetDigitalDocument')) {
156
+ // Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
157
+ if (rovoChatAction && isRovoChatActionVisualizeEnabled({
158
+ extensionKey: extensionKey,
159
+ product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
160
+ response: cardState.details
161
+ })) {
162
+ return RovoChatPromptKey.VISUALIZE;
163
+ }
147
164
  return;
148
165
  }
149
166
  switch (extensionKey) {
@@ -163,7 +180,7 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
163
180
  case 'salesforce-object-provider':
164
181
  return RovoChatPromptKey.SALESFORCE_PREP;
165
182
  }
166
- }, [extensionKey, cardState]);
183
+ }, [extensionKey, cardState, rovoChatAction, rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product]);
167
184
  var _ref4 = promptKey ? getPromptAction({
168
185
  promptKey: promptKey,
169
186
  intl: intl,
@@ -213,6 +230,12 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
213
230
  }, /*#__PURE__*/React.createElement(Text, {
214
231
  size: "small"
215
232
  }, content))) : null;
233
+
234
+ // Visualize is not part of the spotlight: its copy is generic ("See takeaways") and Sheets
235
+ // links are excluded from the spotlight experiment, so render the plain button.
236
+ if (promptKey === RovoChatPromptKey.VISUALIZE) {
237
+ return button;
238
+ }
216
239
  return button && isRovoChatEnabled && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction ? /*#__PURE__*/React.createElement(OneClickChatSpotlightLoader, {
217
240
  key: url,
218
241
  url: url,
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "46.13.6",
15
+ packageVersion: "46.13.7",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -1,7 +1,11 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
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; }
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; }
1
4
  import React from 'react';
2
5
  import AiSearchIcon from '@atlaskit/icon-lab/core/ai-search';
3
6
  import AiChatIcon from '@atlaskit/icon/core/ai-chat';
4
7
  import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
8
+ import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
5
9
  import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
6
10
  import { RovoIcon } from '@atlaskit/logo/rovo/icon';
7
11
  import { CardDisplay } from '../../../constants';
@@ -25,6 +29,7 @@ export var RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
25
29
  RovoChatPromptKey["EXPLAIN_CODE"] = "explain-code";
26
30
  RovoChatPromptKey["CATCH_UP"] = "catch-up";
27
31
  RovoChatPromptKey["SALESFORCE_PREP"] = "salesforce-prep";
32
+ RovoChatPromptKey["VISUALIZE"] = "visualize";
28
33
  return RovoChatPromptKey;
29
34
  }({});
30
35
  var getContext = function getContext(intl, product) {
@@ -364,5 +369,28 @@ export var getPromptAction = function getPromptAction(_ref) {
364
369
  size: iconSize
365
370
  })
366
371
  };
372
+ case RovoChatPromptKey.VISUALIZE:
373
+ var label_visualize = intl.formatMessage(messages.rovo_prompt_button_visualize);
374
+ var html_visualize = intl.formatMessage(messages.rovo_prompt_message_visualize, {
375
+ url: url
376
+ }, {
377
+ ignoreTag: true
378
+ });
379
+ var visualizeIconProps = _objectSpread({
380
+ label: label_visualize,
381
+ size: iconSize
382
+ }, cardAppearance === CardDisplay.HoverCardPreview ? {
383
+ spacing: 'spacious'
384
+ } : {});
385
+ return {
386
+ content: label_visualize,
387
+ tooltipMessage: label_visualize,
388
+ data: {
389
+ name: label_visualize,
390
+ dialogues: [],
391
+ prompt: htmlToAdf(html_visualize)
392
+ },
393
+ icon: /*#__PURE__*/React.createElement(ChartBarIcon, visualizeIconProps)
394
+ };
367
395
  }
368
396
  };
@@ -1,9 +1,24 @@
1
+ import { isRovoChatActionVisualizeEnabled } from '../../../utils/is-rovo-chat-action-visualize-enabled';
1
2
  import { RovoChatPromptKey } from '../rovo-chat-utils';
2
3
  export var getRovoPostAuthPromptKeys = function getRovoPostAuthPromptKeys(_ref) {
3
- var extensionKey = _ref.extensionKey;
4
+ var extensionKey = _ref.extensionKey,
5
+ _ref$isRovoChatAction = _ref.isRovoChatActionShown,
6
+ isRovoChatActionShown = _ref$isRovoChatAction === void 0 ? false : _ref$isRovoChatAction,
7
+ product = _ref.product,
8
+ response = _ref.response;
4
9
  var defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
5
10
  if (extensionKey === 'github-object-provider' || extensionKey === 'gitlab-object-provider') {
6
11
  return [RovoChatPromptKey.EXPLAIN_CODE].concat(defaultPrompts);
7
12
  }
13
+ if (isRovoChatActionShown && isRovoChatActionVisualizeEnabled({
14
+ extensionKey: extensionKey,
15
+ product: product,
16
+ response: response
17
+ })) {
18
+ // Visualize goes first (PM decision). The embed Rovo actions footer hides every prompt after
19
+ // the first below 320px (HIDE_SECONDARY_ACTIONS_WIDTH), so this keeps Visualize visible on
20
+ // narrow embeds whenever exposure fires.
21
+ return [RovoChatPromptKey.VISUALIZE, RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
22
+ }
8
23
  return [RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
9
24
  };
@@ -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' | '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';
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' | 'rovo_prompt_button_visualize' | 'rovo_prompt_message_visualize';
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_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_3p_account' | 'connect_inline_provider_to_update' | 'connect_inline_social_proof' | 'connect_inline_to_update' | '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_with_title' | 'preview_modal' | 'preview_modal_with_title' | 'preview_panel' | 'preview_panel_with_title' | '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;
@@ -0,0 +1,18 @@
1
+ import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
2
+ import type { ProductType } from '@atlaskit/linking-common/types';
3
+ type IsRovoChatActionVisualizeEnabledOptions = {
4
+ extensionKey?: string;
5
+ product?: ProductType;
6
+ response?: JsonLd.Response;
7
+ };
8
+ /**
9
+ * Whether the Rovo chat "Visualize" action is offered for a resolved link.
10
+ *
11
+ * Business rules: Google Sheets links in Confluence.
12
+ *
13
+ * Callers must only call this once the Rovo chat action will be shown for the
14
+ * link (resolved, Rovo chat enabled, opted in and not hidden), so experiment
15
+ * exposure matches what the user sees.
16
+ */
17
+ export declare const isRovoChatActionVisualizeEnabled: ({ extensionKey, product, response, }: IsRovoChatActionVisualizeEnabledOptions) => boolean;
18
+ export {};
@@ -3,8 +3,6 @@ import React from 'react';
3
3
  * Meta key = cmd on mac, windows key on windows
4
4
  * Ctrl key on mac by default triggers a right click instead of left click
5
5
  * Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
6
- * Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
7
- * link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
8
6
  *
9
7
  * `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
10
8
  * On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { RovoChatActionData } from '../../../../state/flexible-ui-context/types';
7
- import { type RovoChatPromptKey } from '../../../common/rovo-chat-utils';
7
+ import { RovoChatPromptKey } from '../../../common/rovo-chat-utils';
8
8
  type EmbedRovoActionsFooterProps = {
9
9
  actionData: RovoChatActionData;
10
10
  prompts: RovoChatPromptKey[];
@@ -20,7 +20,8 @@ export declare enum RovoChatPromptKey {
20
20
  SUMMARIZE_PRESENTATION = "summarize-presentation",
21
21
  EXPLAIN_CODE = "explain-code",
22
22
  CATCH_UP = "catch-up",
23
- SALESFORCE_PREP = "salesforce-prep"
23
+ SALESFORCE_PREP = "salesforce-prep",
24
+ VISUALIZE = "visualize"
24
25
  }
25
26
  type PromptActionProps = {
26
27
  cardAppearance?: CardDisplay;
@@ -1,5 +1,14 @@
1
+ import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
2
+ import type { ProductType } from '@atlaskit/linking-common/types';
1
3
  import { RovoChatPromptKey } from '../rovo-chat-utils';
2
4
  export type RovoPostAuthPromptKeysOptions = {
3
5
  extensionKey?: string;
6
+ /**
7
+ * Whether the Rovo chat action will be shown for the link. Prompt experiments
8
+ * (e.g. Visualize) are only evaluated, firing exposure, when this is true.
9
+ */
10
+ isRovoChatActionShown?: boolean;
11
+ product?: ProductType;
12
+ response?: JsonLd.Response;
4
13
  };
5
- export declare const getRovoPostAuthPromptKeys: ({ extensionKey, }: RovoPostAuthPromptKeysOptions) => RovoChatPromptKey[];
14
+ export declare const getRovoPostAuthPromptKeys: ({ extensionKey, isRovoChatActionShown, product, response, }: RovoPostAuthPromptKeysOptions) => RovoChatPromptKey[];