@atlaskit/smart-card 26.56.4 → 26.57.0

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 (128) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/constants.js +5 -1
  3. package/dist/cjs/extractors/flexible/actions/extract-ai-summary-action.js +20 -0
  4. package/dist/cjs/extractors/flexible/actions/extract-follow-action.js +4 -1
  5. package/dist/cjs/extractors/flexible/actions/index.js +4 -2
  6. package/dist/cjs/extractors/flexible/index.js +3 -2
  7. package/dist/cjs/messages.js +50 -0
  8. package/dist/cjs/state/hooks/use-ai-summary-config/index.js +19 -0
  9. package/dist/cjs/state/hooks/use-ai-summary-config/types.js +5 -0
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/utils/get-is-ai-summary-enabled.js +13 -0
  12. package/dist/cjs/view/Card/types.js +1 -0
  13. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +60 -0
  14. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/index.js +19 -0
  15. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/types.js +5 -0
  16. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +29 -0
  17. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +53 -3
  18. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +29 -0
  19. package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
  20. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
  21. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +2 -2
  22. package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -1
  23. package/dist/cjs/view/FlexibleCard/components/utils.js +14 -1
  24. package/dist/cjs/view/FlexibleCard/index.js +4 -1
  25. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -1
  26. package/dist/cjs/view/HoverCard/utils.js +1 -7
  27. package/dist/cjs/view/LinkUrl/index.js +1 -1
  28. package/dist/es2019/constants.js +4 -1
  29. package/dist/es2019/extractors/flexible/actions/extract-ai-summary-action.js +14 -0
  30. package/dist/es2019/extractors/flexible/actions/extract-follow-action.js +5 -2
  31. package/dist/es2019/extractors/flexible/actions/index.js +6 -3
  32. package/dist/es2019/extractors/flexible/index.js +3 -2
  33. package/dist/es2019/messages.js +50 -0
  34. package/dist/es2019/state/flexible-ui-context/types.js +1 -1
  35. package/dist/es2019/state/hooks/use-ai-summary-config/index.js +12 -0
  36. package/dist/es2019/state/hooks/use-ai-summary-config/types.js +1 -0
  37. package/dist/es2019/utils/analytics/analytics.js +1 -1
  38. package/dist/es2019/utils/get-is-ai-summary-enabled.js +5 -0
  39. package/dist/es2019/view/Card/types.js +1 -0
  40. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +51 -0
  41. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/index.js +12 -0
  42. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/types.js +1 -0
  43. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +18 -0
  44. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +40 -3
  45. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +18 -0
  46. package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
  47. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
  48. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +2 -2
  49. package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -1
  50. package/dist/es2019/view/FlexibleCard/components/utils.js +7 -0
  51. package/dist/es2019/view/FlexibleCard/index.js +4 -1
  52. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -1
  53. package/dist/es2019/view/HoverCard/utils.js +0 -4
  54. package/dist/es2019/view/LinkUrl/index.js +1 -1
  55. package/dist/esm/constants.js +4 -1
  56. package/dist/esm/extractors/flexible/actions/extract-ai-summary-action.js +14 -0
  57. package/dist/esm/extractors/flexible/actions/extract-follow-action.js +5 -2
  58. package/dist/esm/extractors/flexible/actions/index.js +5 -3
  59. package/dist/esm/extractors/flexible/index.js +3 -2
  60. package/dist/esm/messages.js +50 -0
  61. package/dist/esm/state/flexible-ui-context/types.js +1 -1
  62. package/dist/esm/state/hooks/use-ai-summary-config/index.js +13 -0
  63. package/dist/esm/state/hooks/use-ai-summary-config/types.js +1 -0
  64. package/dist/esm/utils/analytics/analytics.js +1 -1
  65. package/dist/esm/utils/get-is-ai-summary-enabled.js +7 -0
  66. package/dist/esm/view/Card/types.js +1 -0
  67. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +50 -0
  68. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/index.js +12 -0
  69. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/types.js +1 -0
  70. package/dist/esm/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +22 -0
  71. package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +46 -3
  72. package/dist/esm/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +22 -0
  73. package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
  74. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
  75. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +2 -2
  76. package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -1
  77. package/dist/esm/view/FlexibleCard/components/utils.js +13 -0
  78. package/dist/esm/view/FlexibleCard/index.js +4 -1
  79. package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -1
  80. package/dist/esm/view/HoverCard/utils.js +0 -6
  81. package/dist/esm/view/LinkUrl/index.js +1 -1
  82. package/dist/types/constants.d.ts +4 -0
  83. package/dist/types/extractors/common/__mocks__/jsonld.d.ts +2 -0
  84. package/dist/types/extractors/flexible/actions/extract-ai-summary-action.d.ts +5 -0
  85. package/dist/types/extractors/flexible/actions/index.d.ts +2 -1
  86. package/dist/types/extractors/flexible/index.d.ts +1 -1
  87. package/dist/types/messages.d.ts +1 -1
  88. package/dist/types/state/flexible-ui-context/types.d.ts +9 -1
  89. package/dist/types/state/hooks/use-ai-summary-config/index.d.ts +2 -0
  90. package/dist/types/state/hooks/use-ai-summary-config/types.d.ts +5 -0
  91. package/dist/types/utils/get-is-ai-summary-enabled.d.ts +2 -0
  92. package/dist/types/view/Card/types.d.ts +2 -1
  93. package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +4 -0
  94. package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/index.d.ts +4 -0
  95. package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/types.d.ts +2 -0
  96. package/dist/types/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +3 -0
  97. package/dist/types/view/FlexibleCard/components/actions/follow-action/goal-icon/index.d.ts +3 -0
  98. package/dist/types/view/FlexibleCard/components/actions/follow-action/projects-icon/index.d.ts +3 -0
  99. package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
  100. package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +2 -2
  101. package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +2 -2
  102. package/dist/types/view/FlexibleCard/components/utils.d.ts +1 -0
  103. package/dist/types/view/FlexibleCard/types.d.ts +2 -0
  104. package/dist/types/view/HoverCard/utils.d.ts +0 -1
  105. package/dist/types-ts4.5/constants.d.ts +4 -0
  106. package/dist/types-ts4.5/extractors/common/__mocks__/jsonld.d.ts +2 -0
  107. package/dist/types-ts4.5/extractors/flexible/actions/extract-ai-summary-action.d.ts +5 -0
  108. package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +2 -1
  109. package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
  110. package/dist/types-ts4.5/messages.d.ts +1 -1
  111. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +9 -1
  112. package/dist/types-ts4.5/state/hooks/use-ai-summary-config/index.d.ts +2 -0
  113. package/dist/types-ts4.5/state/hooks/use-ai-summary-config/types.d.ts +5 -0
  114. package/dist/types-ts4.5/utils/get-is-ai-summary-enabled.d.ts +2 -0
  115. package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
  116. package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +4 -0
  117. package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/index.d.ts +4 -0
  118. package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/types.d.ts +2 -0
  119. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +3 -0
  120. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/goal-icon/index.d.ts +3 -0
  121. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/projects-icon/index.d.ts +3 -0
  122. package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
  123. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/index.d.ts +2 -2
  124. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +2 -2
  125. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +1 -0
  126. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +2 -0
  127. package/dist/types-ts4.5/view/HoverCard/utils.d.ts +0 -1
  128. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { extractLink } from '@atlaskit/link-extractors';
1
+ import { extractLink, extractType } from '@atlaskit/link-extractors';
2
2
  import { SmartLinkActionType } from '@atlaskit/linking-types';
3
3
  import { getExtensionKey } from '../../../state/helpers';
4
4
  import extractServerAction from '../extract-server-action';
@@ -12,6 +12,8 @@ var extractFollowAction = function extractFollowAction(response, actionOptions,
12
12
  var extensionKey = getExtensionKey(response);
13
13
  var data = response === null || response === void 0 ? void 0 : response.data;
14
14
  var actions = extractServerAction(data);
15
+ var type = extractType(data);
16
+ var isProject = type === null || type === void 0 ? void 0 : type.includes('atlassian:Project');
15
17
  if (!extensionKey || actions.length === 0) {
16
18
  return;
17
19
  }
@@ -41,7 +43,8 @@ var extractFollowAction = function extractFollowAction(response, actionOptions,
41
43
  providerKey: extensionKey,
42
44
  reload: reload
43
45
  },
44
- value: actionType === SmartLinkActionType.FollowEntityAction
46
+ value: actionType === SmartLinkActionType.FollowEntityAction,
47
+ isProject: isProject
45
48
  };
46
49
  };
47
50
  export default extractFollowAction;
@@ -1,12 +1,14 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { ActionName } from '../../../constants';
2
+ import { ActionName, InternalActionName } from '../../../constants';
3
3
  import { extractDownloadAction } from './extract-download-action';
4
4
  import { extractPreviewAction } from './extract-preview-action';
5
+ import { extractAISummaryAction } from './extract-ai-summary-action';
5
6
  import extractFollowAction from './extract-follow-action';
6
7
  import { extractCopyLinkAction } from './extract-copy-link-action';
7
- var extractActions = function extractActions(response, data, actionOptions, id) {
8
+ var extractActions = function extractActions(response, url, actionOptions, id, aiSummaryConfig) {
8
9
  var _action;
9
- var action = (_action = {}, _defineProperty(_action, ActionName.CopyLinkAction, extractCopyLinkAction(data, actionOptions)), _defineProperty(_action, ActionName.DownloadAction, extractDownloadAction(data, actionOptions)), _defineProperty(_action, ActionName.FollowAction, extractFollowAction(response, actionOptions, id)), _defineProperty(_action, ActionName.PreviewAction, extractPreviewAction(response, actionOptions)), _action);
10
+ var data = response.data;
11
+ var action = (_action = {}, _defineProperty(_action, ActionName.CopyLinkAction, extractCopyLinkAction(data, actionOptions)), _defineProperty(_action, ActionName.DownloadAction, extractDownloadAction(data, actionOptions)), _defineProperty(_action, ActionName.FollowAction, extractFollowAction(response, actionOptions, id)), _defineProperty(_action, ActionName.PreviewAction, extractPreviewAction(response, actionOptions)), _defineProperty(_action, InternalActionName.AISummaryAction, extractAISummaryAction(response, url, actionOptions, aiSummaryConfig)), _action);
10
12
  return Object.values(action).some(function (value) {
11
13
  return Boolean(value);
12
14
  }) ? action : undefined;
@@ -15,14 +15,15 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
15
15
  id = _ref.id,
16
16
  renderers = _ref.renderers,
17
17
  actionOptions = _ref.actionOptions,
18
- response = _ref.response;
18
+ response = _ref.response,
19
+ aiSummaryConfig = _ref.aiSummaryConfig;
19
20
  if (!response) {
20
21
  return undefined;
21
22
  }
22
23
  var data = response.data;
23
24
  var url = extractLink(data);
24
25
  return {
25
- actions: extractActions(response, data, actionOptions, id),
26
+ actions: extractActions(response, url, actionOptions, id, aiSummaryConfig),
26
27
  assignedToGroup: extractPersonAssignedToAsArray(data),
27
28
  attachmentCount: extractAttachmentCount(data),
28
29
  authorGroup: extractPersonCreatedBy(data),
@@ -195,6 +195,16 @@ export var messages = defineMessages({
195
195
  defaultMessage: 'Download file',
196
196
  description: 'Allow a user to download a file'
197
197
  },
198
+ ai_summary_action: {
199
+ id: 'fabric.linking.ai_summary_action.nonfinal',
200
+ defaultMessage: 'Summarize with AI',
201
+ description: 'Allow a user to summarize a link'
202
+ },
203
+ ai_summary_action_description: {
204
+ id: 'fabric.linking.ai_summary_action_description.nonfinal',
205
+ defaultMessage: 'Summarize the content of this link using Atlassian Intelligence.',
206
+ description: 'Description of what the summarize link with AI action does'
207
+ },
198
208
  edit: {
199
209
  id: 'fabric.linking.edit',
200
210
  defaultMessage: 'Edit',
@@ -205,6 +215,26 @@ export var messages = defineMessages({
205
215
  defaultMessage: 'Follow',
206
216
  description: 'Click to follow a project.'
207
217
  },
218
+ follow_project_description: {
219
+ id: 'fabric.linking.follow_project_description.nonfinal',
220
+ defaultMessage: 'Follow to get notifications on this project',
221
+ description: 'Description on what Follow does'
222
+ },
223
+ follow_project: {
224
+ id: 'fabric.linking.follow_project.nonfinal',
225
+ defaultMessage: 'Follow project',
226
+ description: 'Click to follow a project.'
227
+ },
228
+ follow_goal_description: {
229
+ id: 'fabric.linking.follow_goal_description.nonfinal',
230
+ defaultMessage: 'Follow this goal to get notifications on updates',
231
+ description: 'Description on what Follow does'
232
+ },
233
+ follow_goal: {
234
+ id: 'fabric.linking.follow_goal.nonfinal',
235
+ defaultMessage: 'Follow goal',
236
+ description: 'Click to follow a project.'
237
+ },
208
238
  go_back: {
209
239
  id: 'fabric.linking.go_back',
210
240
  defaultMessage: 'Go back',
@@ -465,6 +495,26 @@ export var messages = defineMessages({
465
495
  defaultMessage: 'Unfollow',
466
496
  description: 'Click to unfollow a project.'
467
497
  },
498
+ unfollow_project_description: {
499
+ id: 'fabric.linking.unfollow_project_description.nonfinal',
500
+ defaultMessage: 'Unfollow to stop receiving project notifications',
501
+ description: 'Description on what Unfollow does'
502
+ },
503
+ unfollow_project: {
504
+ id: 'fabric.linking.unfollow_project.nonfinal',
505
+ defaultMessage: 'Unfollow project',
506
+ description: 'Click to unfollow a project.'
507
+ },
508
+ unfollow_goal_description: {
509
+ id: 'fabric.linking.unfollow_goal_description.nonfinal',
510
+ defaultMessage: 'Unfollow to stop receiving notifications for this goal',
511
+ description: 'Description on what Unfollow does'
512
+ },
513
+ unfollow_goal: {
514
+ id: 'fabric.linking.unfollow_goal.nonfinal',
515
+ defaultMessage: 'Unfollow goal',
516
+ description: 'Click to unfollow a project.'
517
+ },
468
518
  unlink_account: {
469
519
  id: 'fabric.linking.unlink_account',
470
520
  defaultMessage: 'Unlink Account',
@@ -1,4 +1,4 @@
1
- import { ActionName } from '../../constants';
1
+ import { ActionName, InternalActionName } from '../../constants';
2
2
 
3
3
  /**
4
4
  * This provides the data that will be used by Smart Links Flexible UI to populate it's
@@ -0,0 +1,13 @@
1
+ import { useSmartLinkContext } from '@atlaskit/link-provider';
2
+ import { useMemo } from 'react';
3
+ export var useAISummaryConfig = function useAISummaryConfig() {
4
+ var _useSmartLinkContext = useSmartLinkContext(),
5
+ product = _useSmartLinkContext.product,
6
+ isAdminHubAIEnabled = _useSmartLinkContext.isAdminHubAIEnabled;
7
+ return useMemo(function () {
8
+ return {
9
+ product: product,
10
+ isAdminHubAIEnabled: isAdminHubAIEnabled
11
+ };
12
+ }, [product, isAdminHubAIEnabled]);
13
+ };
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.56.4"
18
+ packageVersion: "26.57.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,7 @@
1
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ export var getIsAISummaryEnabled = function getIsAISummaryEnabled() {
3
+ var _response$meta;
4
+ var isAdminHubAIEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
5
+ var response = arguments.length > 1 ? arguments[1] : undefined;
6
+ return Boolean(getBooleanFF('platform.linking-platform.smart-card.hover-card-ai-summaries') && isAdminHubAIEnabled && (response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('AISummary')));
7
+ };
@@ -5,5 +5,6 @@ export var CardAction = /*#__PURE__*/function (CardAction) {
5
5
  CardAction["ChangeStatusAction"] = "ChangeStatusAction";
6
6
  CardAction["FollowAction"] = "FollowAction";
7
7
  CardAction["CopyLinkAction"] = "CopyLinkAction";
8
+ CardAction["AISummaryAction"] = "AISummaryAction";
8
9
  return CardAction;
9
10
  }({});
@@ -0,0 +1,50 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onClick", "url", "ari", "product"];
4
+ import React, { useCallback } from 'react';
5
+ import { FormattedMessage } from 'react-intl-next';
6
+ import { messages } from '../../../../../messages';
7
+ import Action from '../action';
8
+ import AiIcon from '../../../../common/ai-icon';
9
+ import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
10
+ import { useAISummary } from '../../../../../state/hooks/use-ai-summary';
11
+ export var AISummaryActionComponent = function AISummaryActionComponent(_ref) {
12
+ var onClickCallback = _ref.onClick,
13
+ _ref$url = _ref.url,
14
+ url = _ref$url === void 0 ? '' : _ref$url,
15
+ _ref$ari = _ref.ari,
16
+ ari = _ref$ari === void 0 ? '' : _ref$ari,
17
+ product = _ref.product,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+ var _useAnalyticsEvents = useAnalyticsEvents(),
20
+ fireEvent = _useAnalyticsEvents.fireEvent;
21
+ var _useAISummary = useAISummary({
22
+ url: url,
23
+ ari: ari,
24
+ product: product
25
+ }),
26
+ status = _useAISummary.state.status,
27
+ summariseUrl = _useAISummary.summariseUrl;
28
+ var handleActionClick = useCallback(function () {
29
+ fireEvent('ui.button.clicked.aiSummary', {});
30
+ fireEvent('track.aiInteraction.initiated', {
31
+ aiFeatureName: 'Smart Links Summary',
32
+ proactiveAIGenerated: 0,
33
+ userGeneratedAI: 1
34
+ });
35
+ summariseUrl();
36
+ onClickCallback === null || onClickCallback === void 0 || onClickCallback();
37
+ }, [fireEvent, onClickCallback, summariseUrl]);
38
+ if (status === 'ready' || status === 'error') {
39
+ return /*#__PURE__*/React.createElement(Action, _extends({
40
+ content: /*#__PURE__*/React.createElement(FormattedMessage, messages.ai_summary_action),
41
+ icon: /*#__PURE__*/React.createElement(AiIcon, {
42
+ label: "Summarise with AI"
43
+ }),
44
+ onClick: handleActionClick,
45
+ testId: "smart-action-ai-summary-action",
46
+ tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.ai_summary_action_description)
47
+ }, props));
48
+ }
49
+ return null;
50
+ };
@@ -0,0 +1,12 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
4
+ import { InternalActionName } from '../../../../../constants';
5
+ import { AISummaryActionComponent } from './ai-summary-action-component';
6
+ var AISummaryAction = function AISummaryAction(props) {
7
+ var _context$actions;
8
+ var context = useFlexibleUiContext();
9
+ var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.AISummaryAction];
10
+ return actionData ? /*#__PURE__*/React.createElement(AISummaryActionComponent, _extends({}, actionData, props)) : null;
11
+ };
12
+ export default AISummaryAction;
@@ -0,0 +1,22 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import Icon from '@atlaskit/icon';
3
+ import React from 'react';
4
+ var GoalGlyph = function GoalGlyph(props) {
5
+ return /*#__PURE__*/React.createElement("svg", {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "16",
8
+ height: "16",
9
+ viewBox: "0 0 16 16",
10
+ fill: "none"
11
+ }, /*#__PURE__*/React.createElement("path", {
12
+ fillRule: "evenodd",
13
+ clipRule: "evenodd",
14
+ d: "M12.6667 8C12.6667 10.5773 10.5773 12.6667 8 12.6667C5.42267 12.6667 3.33333 10.5773 3.33333 8C3.33333 5.42267 5.42267 3.33333 8 3.33333C10.5773 3.33333 12.6667 5.42267 12.6667 8ZM14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM9.33333 8C9.33333 8.73638 8.73638 9.33333 8 9.33333C7.26362 9.33333 6.66667 8.73638 6.66667 8C6.66667 7.26362 7.26362 6.66667 8 6.66667C8.73638 6.66667 9.33333 7.26362 9.33333 8ZM10.6667 8C10.6667 9.47276 9.47276 10.6667 8 10.6667C6.52724 10.6667 5.33333 9.47276 5.33333 8C5.33333 6.52724 6.52724 5.33333 8 5.33333C9.47276 5.33333 10.6667 6.52724 10.6667 8Z",
15
+ fill: "#0C66E4"
16
+ }));
17
+ };
18
+ export var GoalIcon = function GoalIcon(props) {
19
+ return /*#__PURE__*/React.createElement(Icon, _extends({
20
+ glyph: GoalGlyph
21
+ }, props));
22
+ };
@@ -9,6 +9,32 @@ import { messages } from '../../../../../messages';
9
9
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
10
10
  import ServerAction from '../action/server-action';
11
11
  import UnfollowIcon from './unfollow-icon';
12
+ import { importIcon } from '../../utils';
13
+ var importIconMapper = {
14
+ goal: function goal() {
15
+ return import( /* webpackChunkName: "glyphGoal" */'./goal-icon').then(function (_ref) {
16
+ var GoalIcon = _ref.GoalIcon;
17
+ return {
18
+ default: GoalIcon
19
+ };
20
+ });
21
+ },
22
+ projects: function projects() {
23
+ return import( /* webpackChunkName: "glyphProjects" */'./projects-icon').then(function (_ref2) {
24
+ var ProjectsIcon = _ref2.ProjectsIcon;
25
+ return {
26
+ default: ProjectsIcon
27
+ };
28
+ });
29
+ }
30
+ };
31
+ var getIcon = function getIcon(stackIconType) {
32
+ var importFn = importIconMapper[stackIconType];
33
+ if (!importFn) {
34
+ return null;
35
+ }
36
+ return importIcon(importFn);
37
+ };
12
38
  var FollowAction = function FollowAction(props) {
13
39
  var _context$actions, _context$actions2;
14
40
  var context = useFlexibleUiContext();
@@ -18,17 +44,34 @@ var FollowAction = function FollowAction(props) {
18
44
  var _context$actions$Acti = context === null || context === void 0 || (_context$actions2 = context.actions) === null || _context$actions2 === void 0 ? void 0 : _context$actions2[ActionName.FollowAction],
19
45
  value = _context$actions$Acti.value,
20
46
  data = _objectWithoutProperties(_context$actions$Acti, _excluded);
47
+ var isStackItem = props.as === 'stack-item';
48
+ var isProject = data.isProject;
21
49
  var message = value ? messages.follow : messages.unfollow;
50
+ var projectMessage = value ? messages.follow_project : messages.unfollow_project;
51
+ var goalMessage = value ? messages.follow_goal : messages.unfollow_goal;
52
+ var stackMessage = isProject ? projectMessage : goalMessage;
53
+ var label = isStackItem ? stackMessage : message;
54
+ var projectTooltipMessage = value ? messages.follow_project_description : messages.unfollow_project_description;
55
+ var goalTooltipMessage = value ? messages.follow_goal_description : messages.unfollow_goal_description;
56
+ var stackTooltipMessage = isProject ? projectTooltipMessage : goalTooltipMessage;
57
+ var tooltipMessage = isStackItem ? stackTooltipMessage : message;
22
58
  var icon = value ? /*#__PURE__*/React.createElement(InviteTeamIcon, {
23
59
  label: "Follow"
24
60
  }) : /*#__PURE__*/React.createElement(UnfollowIcon, {
25
61
  label: "Unfollow"
26
62
  });
63
+ var stackIconType = isProject ? 'projects' : 'goal';
64
+ var ImportedIcon = getIcon(stackIconType);
65
+ var stackIcon = /*#__PURE__*/React.createElement(ImportedIcon, {
66
+ label: "Follow",
67
+ testId: "smart-action-follow-action-".concat(stackIconType, "-icon")
68
+ });
69
+ var followIcon = isStackItem ? stackIcon : icon;
27
70
  return /*#__PURE__*/React.createElement(ServerAction, _extends({
28
- content: /*#__PURE__*/React.createElement(FormattedMessage, message),
29
- icon: icon,
71
+ content: /*#__PURE__*/React.createElement(FormattedMessage, label),
72
+ icon: followIcon,
30
73
  testId: "smart-action-follow-action",
31
- tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, message)
74
+ tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage)
32
75
  }, data, props));
33
76
  };
34
77
  export default FollowAction;
@@ -0,0 +1,22 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import Icon from '@atlaskit/icon';
3
+ import React from 'react';
4
+ var ProjectsGlyph = function ProjectsGlyph(props) {
5
+ return /*#__PURE__*/React.createElement("svg", {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "16",
8
+ height: "16",
9
+ viewBox: "0 0 16 16",
10
+ fill: "none"
11
+ }, /*#__PURE__*/React.createElement("path", {
12
+ fillRule: "evenodd",
13
+ clipRule: "evenodd",
14
+ d: "M9.88573 4.00002C9.70892 4.00002 9.53935 4.07026 9.41433 4.19528L6.97282 6.63678L4.20525 6.94429C4.05479 6.96101 3.91451 7.02844 3.80746 7.13548L3.60959 7.33335L4.35367 8.07743C4.6791 8.40287 4.6791 8.93051 4.35367 9.25594L3.47152 10.1381C3.21117 10.3984 2.78906 10.3984 2.52871 10.1381C2.26836 9.87774 2.26836 9.45563 2.52871 9.19528L3.0573 8.66669L2.43108 8.04046C2.04055 7.64993 2.04055 7.01677 2.43108 6.62625L2.86465 6.19267C3.18578 5.87154 3.60664 5.66927 4.05801 5.61911L6.36073 5.36326L8.47152 3.25247C8.84659 2.8774 9.3553 2.66669 9.88573 2.66669H12.0001C12.7365 2.66669 13.3334 3.26364 13.3334 4.00002V6.1144C13.3334 6.64483 13.1227 7.15354 12.7477 7.52862L10.6369 9.6394L10.381 11.9421C10.3309 12.3935 10.1286 12.8143 9.80746 13.1355L9.37389 13.5691C8.98336 13.9596 8.3502 13.9596 7.95967 13.5691L7.33345 12.9428L6.80485 13.4714C6.5445 13.7318 6.12239 13.7318 5.86204 13.4714C5.60169 13.2111 5.60169 12.789 5.86204 12.5286L6.74419 11.6465C7.06963 11.321 7.59726 11.321 7.9227 11.6465L8.66678 12.3905L8.86466 12.1927C8.9717 12.0856 9.03912 11.9453 9.05584 11.7949L9.36335 9.02731L11.8049 6.58581C11.9299 6.46078 12.0001 6.29121 12.0001 6.1144V4.00002H9.88573ZM5.80486 10.1953C6.06521 10.4556 6.06521 10.8777 5.80486 11.1381L3.80486 13.1381C3.54451 13.3984 3.1224 13.3984 2.86205 13.1381C2.6017 12.8777 2.6017 12.4556 2.86205 12.1953L4.86205 10.1953C5.1224 9.93493 5.54451 9.93493 5.80486 10.1953ZM10.0001 6.66669C10.3683 6.66669 10.6668 6.36821 10.6668 6.00002C10.6668 5.63183 10.3683 5.33335 10.0001 5.33335C9.63193 5.33335 9.33346 5.63183 9.33346 6.00002C9.33346 6.36821 9.63193 6.66669 10.0001 6.66669Z",
15
+ fill: "#0C66E4"
16
+ }));
17
+ };
18
+ export var ProjectsIcon = function ProjectsIcon(props) {
19
+ return /*#__PURE__*/React.createElement(Icon, _extends({
20
+ glyph: ProjectsGlyph
21
+ }, props));
22
+ };
@@ -4,4 +4,5 @@ export { default as EditAction } from './edit-action';
4
4
  export { default as DownloadAction } from './download-action';
5
5
  export { default as FollowAction } from './follow-action';
6
6
  export { default as PreviewAction } from './preview-action';
7
- export { default as CopyLinkAction } from './copy-link-action';
7
+ export { default as CopyLinkAction } from './copy-link-action';
8
+ export { default as AISummaryAction } from './ai-summary-action';
@@ -1,6 +1,6 @@
1
1
  import { Stack, xcss } from '@atlaskit/primitives';
2
2
  import React, { useMemo } from 'react';
3
- import { ActionName, SmartLinkSize } from '../../../../../constants';
3
+ import { SmartLinkSize } from '../../../../../constants';
4
4
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
5
5
  import * as Actions from '../../actions';
6
6
  import { getPrimitivesPaddingSpaceBySize } from '../../utils';
@@ -10,7 +10,7 @@ var ignoreContainerPaddingStyles = xcss({
10
10
  marginLeft: 'calc(var(--container-gap-left) * -1)',
11
11
  marginRight: 'calc(var(--container-gap-right) * -1)'
12
12
  });
13
- var DEFAULT_SORT_ORDER = [ActionName.PreviewAction, ActionName.CopyLinkAction];
13
+ var DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
14
14
  var sort = function sort(a, b) {
15
15
  var idxA = DEFAULT_SORT_ORDER.indexOf(a);
16
16
  var idxB = DEFAULT_SORT_ORDER.indexOf(b);
@@ -12,8 +12,6 @@ import AIStateIndicator from '../ai-state-indicator';
12
12
  import { renderElementItems } from '../../utils';
13
13
  import { messages } from '../../../../../../messages';
14
14
  import { useAISummary } from '../../../../../../state/hooks/use-ai-summary';
15
- import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
16
- import { useSmartLinkContext } from '@atlaskit/link-provider';
17
15
  import AIIcon from '../../../../../common/ai-icon';
18
16
  import AISummary from '../../../../../common/ai-summary';
19
17
  import { useAnalyticsEvents } from '../../../../../../common/analytics/generated/use-analytics-events';
@@ -22,6 +20,8 @@ import AIEventErrorViewed from '../ai-event-error-viewed';
22
20
  import { di } from 'react-magnetic-di';
23
21
  import { css } from '@emotion/react';
24
22
  import FeatureDiscovery from '../feature-discovery';
23
+ import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
24
+ import { useSmartLinkContext } from '@atlaskit/link-provider';
25
25
  export var AISummaryBlockErrorIndicator = function AISummaryBlockErrorIndicator(_ref) {
26
26
  var showErrorIndicator = _ref.showErrorIndicator,
27
27
  error = _ref.error,
@@ -7,7 +7,7 @@ import { SmartLinkStatus } from '../../../../../constants';
7
7
  import { Snippet } from '../../elements';
8
8
  import { getMaxLines } from '../../utils';
9
9
  var DEFAULT_MAX_LINES = 3;
10
- var MAXIMUM_MAX_LINES = 3;
10
+ var MAXIMUM_MAX_LINES = 6;
11
11
  var MINIMUM_MAX_LINES = 1;
12
12
 
13
13
  /**
@@ -12,6 +12,7 @@ import { FormattedMessage } from 'react-intl-next';
12
12
  import { SmartLinkSize } from '../../../constants';
13
13
  import Icon from './elements/icon';
14
14
  import { openEmbedModal } from '../../EmbedModal/utils';
15
+ import Loadable from 'react-loadable';
15
16
  export var sizeToButtonSpacing = (_sizeToButtonSpacing = {}, _defineProperty(_sizeToButtonSpacing, SmartLinkSize.Small, 'none'), _defineProperty(_sizeToButtonSpacing, SmartLinkSize.Medium, 'compact'), _defineProperty(_sizeToButtonSpacing, SmartLinkSize.Large, 'compact'), _defineProperty(_sizeToButtonSpacing, SmartLinkSize.XLarge, 'default'), _sizeToButtonSpacing);
16
17
  export var getFormattedMessage = function getFormattedMessage(message) {
17
18
  if (message) {
@@ -56,6 +57,18 @@ export var getIconWidth = function getIconWidth(size) {
56
57
  return '.75rem';
57
58
  }
58
59
  };
60
+ export var importIcon = function importIcon(importFn) {
61
+ return Loadable({
62
+ loader: function loader() {
63
+ return importFn().then(function (module) {
64
+ return module.default;
65
+ });
66
+ },
67
+ loading: function loading() {
68
+ return null;
69
+ }
70
+ }); // Because we're using dynamic loading here, TS will not be able to infer the type.
71
+ };
59
72
  export var getLinkLineHeight = function getLinkLineHeight(size) {
60
73
  switch (size) {
61
74
  case SmartLinkSize.XLarge:
@@ -7,6 +7,7 @@ import { SmartLinkStatus } from '../../constants';
7
7
  import Container from './components/container';
8
8
  import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
9
9
  import { getContextByStatus, getRetryOptions } from './utils';
10
+ import { useAISummaryConfig } from '../../state/hooks/use-ai-summary-config';
10
11
 
11
12
  /**
12
13
  * This represents a Flexible Card: a link represented by a card with metadata.
@@ -33,11 +34,13 @@ var FlexibleCard = function FlexibleCard(_ref) {
33
34
  testId = _ref.testId,
34
35
  ui = _ref.ui,
35
36
  url = _ref.url;
37
+ var aiSummaryConfig = useAISummaryConfig();
36
38
  var cardType = cardState.status,
37
39
  details = cardState.details;
38
40
  var status = cardType;
39
41
  var context = useMemo(function () {
40
42
  return getContextByStatus({
43
+ aiSummaryConfig: aiSummaryConfig,
41
44
  response: details,
42
45
  id: id,
43
46
  renderers: renderers,
@@ -45,7 +48,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
45
48
  status: status,
46
49
  url: url
47
50
  });
48
- }, [details, id, renderers, actionOptions, status, url]);
51
+ }, [aiSummaryConfig, details, id, renderers, actionOptions, status, url]);
49
52
  var retry = getRetryOptions(url, status, details, onAuthorize);
50
53
  var _ref2 = context || {},
51
54
  title = _ref2.title;
@@ -13,7 +13,7 @@ import { useSmartLinkAnalytics } from '../../../state/analytics';
13
13
  import { getExtensionKey, getServices } from '../../../state/helpers';
14
14
  import { isSpecialEvent } from '../../../utils';
15
15
  import { flexibleUiOptions, titleBlockCss } from '../styled';
16
- import { getSimulatedMetadata, getIsAISummaryEnabled } from '../utils';
16
+ import { getSimulatedMetadata } from '../utils';
17
17
  import HoverCardLoadingView from './views/resolving';
18
18
  import HoverCardUnauthorisedView from './views/unauthorised';
19
19
  import HoverCardResolvedView from './views/resolved';
@@ -23,6 +23,7 @@ import { fireLinkClickedEvent } from '../../../utils/analytics/click';
23
23
  import { useSmartCardState } from '../../../state/store';
24
24
  import HoverCardForbiddenView from './views/forbidden';
25
25
  import ContentContainer from './ContentContainer';
26
+ import { getIsAISummaryEnabled } from '../../../utils/get-is-ai-summary-enabled';
26
27
  export var hoverCardClassName = 'smart-links-hover-preview';
27
28
  export var getCopyAction = function getCopyAction(url) {
28
29
  return {
@@ -198,10 +198,4 @@ export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata() {
198
198
  default:
199
199
  return defaultMetadata;
200
200
  }
201
- };
202
- export var getIsAISummaryEnabled = function getIsAISummaryEnabled() {
203
- var _response$meta;
204
- var isAdminHubAIEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
205
- var response = arguments.length > 1 ? arguments[1] : undefined;
206
- return Boolean(getBooleanFF('platform.linking-platform.smart-card.hover-card-ai-summaries') && isAdminHubAIEnabled && (response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('AISummary')));
207
201
  };
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.56.4",
13
+ packageVersion: "26.57.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -139,6 +139,10 @@ export declare enum ActionName {
139
139
  DownloadAction = "DownloadAction",
140
140
  CustomAction = "CustomAction"
141
141
  }
142
+ export declare enum InternalActionName {
143
+ AISummaryAction = "AISummaryAction"
144
+ }
145
+ export type FlexibleUiActionName = keyof typeof ActionName | keyof typeof InternalActionName;
142
146
  /**
143
147
  * Flexible UI icons - each mapped to AK icons.
144
148
  */
@@ -22,7 +22,9 @@ export declare const TEST_PULL_REQUEST: JsonLd.Data.SourceCodePullRequest;
22
22
  export declare const TEST_TASK: JsonLd.Data.Task;
23
23
  export declare const TEST_META_DATA: JsonLd.Meta.BaseMeta;
24
24
  export declare const TEST_RESOLVED_META_DATA: JsonLd.Meta.BaseMeta;
25
+ export declare const TEST_RESOLVED_META_DATA_WITH_AI_SUMMARY: JsonLd.Meta.BaseMeta;
25
26
  export declare const TEST_DOCUMENT: JsonLd.Data.Document;
27
+ export declare const TEST_DOCUMENT_WITH_ARI: JsonLd.Data.Document;
26
28
  export declare const TEST_CURRENT_DOCUMENT: JsonLd.Data.Document;
27
29
  export declare const TEST_DOWNLOAD_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
28
30
  export declare const TEST_UNDEFINED_LINK: JsonLd.Data.UndefinedLinkDocument;
@@ -0,0 +1,5 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import { type CardActionOptions } from '../../../view/Card/types';
3
+ import { AISummaryActionData } from '../../../state/flexible-ui-context/types';
4
+ import { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
5
+ export declare const extractAISummaryAction: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, aiSummaryConfig?: AISummaryConfig) => AISummaryActionData | undefined;
@@ -1,5 +1,6 @@
1
1
  import type { JsonLd } from 'json-ld-types';
2
2
  import type { FlexibleUiActions } from '../../../state/flexible-ui-context/types';
3
+ import { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
3
4
  import type { CardActionOptions } from '../../../view/Card/types';
4
- declare const extractActions: (response: JsonLd.Response, data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions, id?: string) => FlexibleUiActions | undefined;
5
+ declare const extractActions: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, id?: string, aiSummaryConfig?: AISummaryConfig) => FlexibleUiActions | undefined;
5
6
  export default extractActions;
@@ -1,4 +1,4 @@
1
1
  import { FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
2
2
  import { ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
3
- declare const extractFlexibleUiContext: ({ id, renderers, actionOptions, response, }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
3
+ declare const extractFlexibleUiContext: ({ id, renderers, actionOptions, response, aiSummaryConfig, }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
4
4
  export default extractFlexibleUiContext;
@@ -1,6 +1,6 @@
1
1
  import { MessageDescriptor } from 'react-intl-next';
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 MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | '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' | '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' | 'preview_description' | 'preview_improved' | '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' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | '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' | 'follow_goal' | 'follow_goal_description' | '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' | 'preview_description' | 'preview_improved' | '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' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };