@atlaskit/smart-card 43.26.0 → 43.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +12 -8
- package/dist/cjs/extractors/flexible/actions/index.js +2 -1
- package/dist/cjs/extractors/flexible/index.js +3 -1
- package/dist/cjs/messages.js +55 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/assets/ai-chapter-icon.compiled.css +4 -0
- package/dist/cjs/view/FlexibleCard/assets/ai-chapter-icon.js +51 -0
- package/dist/cjs/view/FlexibleCard/assets/ai-edit-icon.compiled.css +4 -0
- package/dist/cjs/view/FlexibleCard/assets/ai-edit-icon.js +74 -0
- package/dist/cjs/view/FlexibleCard/assets/ai-search-icon.compiled.css +4 -0
- package/dist/cjs/view/FlexibleCard/assets/ai-search-icon.js +66 -0
- package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +89 -47
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/index.js +4 -2
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +12 -8
- package/dist/es2019/extractors/flexible/actions/index.js +2 -1
- package/dist/es2019/extractors/flexible/index.js +2 -0
- package/dist/es2019/messages.js +55 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/assets/ai-chapter-icon.compiled.css +4 -0
- package/dist/es2019/view/FlexibleCard/assets/ai-chapter-icon.js +40 -0
- package/dist/es2019/view/FlexibleCard/assets/ai-edit-icon.compiled.css +4 -0
- package/dist/es2019/view/FlexibleCard/assets/ai-edit-icon.js +63 -0
- package/dist/es2019/view/FlexibleCard/assets/ai-search-icon.compiled.css +4 -0
- package/dist/es2019/view/FlexibleCard/assets/ai-search-icon.js +55 -0
- package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +97 -36
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/index.js +4 -2
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +12 -8
- package/dist/esm/extractors/flexible/actions/index.js +2 -1
- package/dist/esm/extractors/flexible/index.js +3 -1
- package/dist/esm/messages.js +55 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/assets/ai-chapter-icon.compiled.css +4 -0
- package/dist/esm/view/FlexibleCard/assets/ai-chapter-icon.js +42 -0
- package/dist/esm/view/FlexibleCard/assets/ai-edit-icon.compiled.css +4 -0
- package/dist/esm/view/FlexibleCard/assets/ai-edit-icon.js +65 -0
- package/dist/esm/view/FlexibleCard/assets/ai-search-icon.compiled.css +4 -0
- package/dist/esm/view/FlexibleCard/assets/ai-search-icon.js +57 -0
- package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +89 -47
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +1 -1
- package/dist/esm/view/FlexibleCard/index.js +4 -2
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/actions/extract-rovo-chat-action.d.ts +3 -1
- package/dist/types/extractors/flexible/actions/index.d.ts +3 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/messages.d.ts +2 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +6 -1
- package/dist/types/view/FlexibleCard/assets/ai-chapter-icon.d.ts +5 -0
- package/dist/types/view/FlexibleCard/assets/ai-edit-icon.d.ts +5 -0
- package/dist/types/view/FlexibleCard/assets/ai-search-icon.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +3 -2
- package/dist/types/view/FlexibleCard/types.d.ts +2 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/actions/extract-rovo-chat-action.d.ts +3 -1
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +3 -1
- package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +2 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +6 -1
- package/dist/types-ts4.5/view/FlexibleCard/assets/ai-chapter-icon.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/assets/ai-edit-icon.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/assets/ai-search-icon.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +2 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +1 -1
- package/package.json +7 -7
|
@@ -52,7 +52,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
52
52
|
testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId;
|
|
53
53
|
var context = useFlexibleUiContext();
|
|
54
54
|
var ui = useFlexibleUiOptionContext();
|
|
55
|
-
var isRovoChatActionAvailable = fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.RovoChatAction])
|
|
55
|
+
var isRovoChatActionAvailable = fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.RovoChatAction]) !== undefined : undefined;
|
|
56
56
|
var _useState = useState(),
|
|
57
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
58
58
|
message = _useState2[0],
|
|
@@ -92,7 +92,7 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
92
|
var _context$actions;
|
|
93
93
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
94
94
|
var context = useFlexibleUiContext();
|
|
95
|
-
if (
|
|
95
|
+
if (context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[InternalActionName.RovoChatAction]) {
|
|
96
96
|
return /*#__PURE__*/React.createElement("span", {
|
|
97
97
|
"data-smart-element": name,
|
|
98
98
|
"data-smart-element-badge": true,
|
|
@@ -47,7 +47,8 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
47
47
|
var resolve = useResolve();
|
|
48
48
|
var _useSmartLinkContext = useSmartLinkContext(),
|
|
49
49
|
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
50
|
-
openPreviewPanel = _useSmartLinkContext.openPreviewPanel
|
|
50
|
+
openPreviewPanel = _useSmartLinkContext.openPreviewPanel,
|
|
51
|
+
product = _useSmartLinkContext.product;
|
|
51
52
|
var rovoConfig = fg('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
52
53
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
53
54
|
useRovoConfig() : undefined;
|
|
@@ -76,6 +77,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
76
77
|
renderers: renderers,
|
|
77
78
|
resolve: resolve
|
|
78
79
|
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
80
|
+
product: product,
|
|
79
81
|
rovoConfig: rovoConfig
|
|
80
82
|
} : undefined), {}, {
|
|
81
83
|
actionOptions: actionOptions,
|
|
@@ -84,7 +86,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
84
86
|
isPreviewPanelAvailable: isPreviewPanelAvailable,
|
|
85
87
|
openPreviewPanel: openPreviewPanel
|
|
86
88
|
}));
|
|
87
|
-
}, [aiSummaryConfig, appearance, actionOptions, details, id, isPreviewPanelAvailable, onAuthorize, onClick, openPreviewPanel, origin, placeholderCardState, placeHolderStatus, renderers, resolve, rovoConfig, status, url, fireEvent]);
|
|
89
|
+
}, [aiSummaryConfig, appearance, actionOptions, details, id, isPreviewPanelAvailable, onAuthorize, onClick, openPreviewPanel, origin, placeholderCardState, placeHolderStatus, product, renderers, resolve, rovoConfig, status, url, fireEvent]);
|
|
88
90
|
var flexibleCardContext = useMemo(function () {
|
|
89
91
|
return {
|
|
90
92
|
data: context,
|
|
@@ -39,7 +39,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
39
39
|
var isRovoSummaryEnabled = fg('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
40
40
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
41
41
|
useMemo(function () {
|
|
42
|
-
return (cardState === null || cardState === void 0 ? void 0 : cardState.details) && extractRovoChatAction(cardState.details, rovoConfig, actionOptions);
|
|
42
|
+
return (cardState === null || cardState === void 0 ? void 0 : cardState.details) && extractRovoChatAction(cardState.details, rovoConfig, actionOptions) !== undefined;
|
|
43
43
|
}, [actionOptions, cardState === null || cardState === void 0 ? void 0 : cardState.details, rovoConfig]) : false;
|
|
44
44
|
useEffect(function () {
|
|
45
45
|
// Since this hover view is only rendered on resolved status,
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "43.
|
|
18
|
+
packageVersion: "43.26.1",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
3
|
+
import type { RovoChatActionData } from '../../../state/flexible-ui-context/types';
|
|
2
4
|
import type { RovoConfig } from '../../../state/hooks/use-rovo-config';
|
|
3
5
|
import { type InternalCardActionOptions as CardActionOptions } from '../../../view/Card/types';
|
|
4
|
-
declare const extractRovoChatAction: (response: JsonLd.Response, rovoConfig?: RovoConfig, actionOptions?: CardActionOptions) =>
|
|
6
|
+
declare const extractRovoChatAction: (response: JsonLd.Response, rovoConfig?: RovoConfig, actionOptions?: CardActionOptions, product?: ProductType) => RovoChatActionData | undefined;
|
|
5
7
|
export default extractRovoChatAction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
2
3
|
import { type FireEventFunction } from '../../../common/analytics/types';
|
|
3
4
|
import { type FlexibleUiActions } from '../../../state/flexible-ui-context/types';
|
|
4
5
|
import { type AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
@@ -24,8 +25,9 @@ export type ExtractActionsParam = {
|
|
|
24
25
|
url: string;
|
|
25
26
|
}) => void;
|
|
26
27
|
origin?: AnalyticsOrigin;
|
|
28
|
+
product?: ProductType;
|
|
27
29
|
response: JsonLd.Response;
|
|
28
30
|
rovoConfig?: RovoConfig;
|
|
29
31
|
url?: string;
|
|
30
32
|
};
|
|
31
|
-
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, rovoConfig, url, isPreviewPanelAvailable, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
33
|
+
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, product, response, rovoConfig, url, isPreviewPanelAvailable, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, resolve, rovoConfig, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, openPreviewPanel, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, product, resolve, rovoConfig, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, openPreviewPanel, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type 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
|
|
3
|
+
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_plural' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_plural' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_button_suggest_improvement';
|
|
4
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | '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_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_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | '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' | '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' | RovoChatActionMessageKey;
|
|
4
5
|
type Messages = {
|
|
5
6
|
[K in MessageKey]: MessageDescriptor;
|
|
6
7
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
2
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
2
3
|
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
3
4
|
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
4
5
|
import { type RetryOptions } from '../../view/FlexibleCard/types';
|
|
@@ -293,7 +294,7 @@ export type FlexibleUiActions = {
|
|
|
293
294
|
[ActionName.FollowAction]?: ServerActionProp<boolean>;
|
|
294
295
|
[ActionName.PreviewAction]?: PreviewActionData;
|
|
295
296
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
296
|
-
[InternalActionName.RovoChatAction]?:
|
|
297
|
+
[InternalActionName.RovoChatAction]?: RovoChatActionData;
|
|
297
298
|
[InternalActionName.UnresolvedAction]?: UnresolvedActionData;
|
|
298
299
|
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
299
300
|
};
|
|
@@ -320,6 +321,10 @@ export type AutomationActionData = {
|
|
|
320
321
|
resourceType: string;
|
|
321
322
|
siteAri: any;
|
|
322
323
|
};
|
|
324
|
+
export type RovoChatActionData = {
|
|
325
|
+
product?: ProductType;
|
|
326
|
+
url?: string;
|
|
327
|
+
};
|
|
323
328
|
export type UnresolvedActionData = RetryOptions;
|
|
324
329
|
export type ViewRelatedLinksActionData = {
|
|
325
330
|
ari: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type LinkActionProps } from '../types';
|
|
3
3
|
export declare enum RovoChatPromptKey {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
RECOMMEND_OTHER_SOURCES = "recommend-other-sources",
|
|
5
|
+
SHOW_OTHER_MENTIONS = "show-other-mentions",
|
|
6
|
+
SUGGEST_IMPROVEMENT = "suggest-improvement"
|
|
6
7
|
}
|
|
7
8
|
type RovoChatActionProps = LinkActionProps & {
|
|
8
9
|
prompts?: RovoChatPromptKey[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type CardState } from '@atlaskit/linking-common';
|
|
3
|
+
import { type CardState, type ProductType } from '@atlaskit/linking-common';
|
|
4
4
|
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
5
5
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
6
6
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
@@ -188,6 +188,7 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appear
|
|
|
188
188
|
};
|
|
189
189
|
url: string;
|
|
190
190
|
}) => void;
|
|
191
|
+
product?: ProductType;
|
|
191
192
|
resolve?: ResolveFunction;
|
|
192
193
|
response?: SmartLinkResponse;
|
|
193
194
|
rovoConfig?: RovoConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CardState } from '@atlaskit/linking-common';
|
|
2
2
|
import type { ActionName } from '../../../../../constants';
|
|
3
3
|
import { type LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
4
|
-
import type { InternalCardActionOptions } from '../../../../Card/types
|
|
4
|
+
import type { InternalCardActionOptions } from '../../../../Card/types';
|
|
5
5
|
import { type HoverCardLoadingViewProps } from '../resolving/types';
|
|
6
6
|
export type HoverCardResolvedProps = {
|
|
7
7
|
actionOptions?: InternalCardActionOptions;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
3
|
+
import type { RovoChatActionData } from '../../../state/flexible-ui-context/types';
|
|
2
4
|
import type { RovoConfig } from '../../../state/hooks/use-rovo-config';
|
|
3
5
|
import { type InternalCardActionOptions as CardActionOptions } from '../../../view/Card/types';
|
|
4
|
-
declare const extractRovoChatAction: (response: JsonLd.Response, rovoConfig?: RovoConfig, actionOptions?: CardActionOptions) =>
|
|
6
|
+
declare const extractRovoChatAction: (response: JsonLd.Response, rovoConfig?: RovoConfig, actionOptions?: CardActionOptions, product?: ProductType) => RovoChatActionData | undefined;
|
|
5
7
|
export default extractRovoChatAction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JsonLd } from '@atlaskit/json-ld-types';
|
|
2
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
2
3
|
import { type FireEventFunction } from '../../../common/analytics/types';
|
|
3
4
|
import { type FlexibleUiActions } from '../../../state/flexible-ui-context/types';
|
|
4
5
|
import { type AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
@@ -24,8 +25,9 @@ export type ExtractActionsParam = {
|
|
|
24
25
|
url: string;
|
|
25
26
|
}) => void;
|
|
26
27
|
origin?: AnalyticsOrigin;
|
|
28
|
+
product?: ProductType;
|
|
27
29
|
response: JsonLd.Response;
|
|
28
30
|
rovoConfig?: RovoConfig;
|
|
29
31
|
url?: string;
|
|
30
32
|
};
|
|
31
|
-
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, rovoConfig, url, isPreviewPanelAvailable, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
33
|
+
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, product, response, rovoConfig, url, isPreviewPanelAvailable, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, resolve, rovoConfig, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, openPreviewPanel, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, product, resolve, rovoConfig, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, openPreviewPanel, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type 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
|
|
3
|
+
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_plural' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_plural' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_button_suggest_improvement';
|
|
4
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | '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_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_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | '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' | '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' | RovoChatActionMessageKey;
|
|
4
5
|
type Messages = {
|
|
5
6
|
[K in MessageKey]: MessageDescriptor;
|
|
6
7
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
2
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
2
3
|
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
3
4
|
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
4
5
|
import { type RetryOptions } from '../../view/FlexibleCard/types';
|
|
@@ -293,7 +294,7 @@ export type FlexibleUiActions = {
|
|
|
293
294
|
[ActionName.FollowAction]?: ServerActionProp<boolean>;
|
|
294
295
|
[ActionName.PreviewAction]?: PreviewActionData;
|
|
295
296
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
296
|
-
[InternalActionName.RovoChatAction]?:
|
|
297
|
+
[InternalActionName.RovoChatAction]?: RovoChatActionData;
|
|
297
298
|
[InternalActionName.UnresolvedAction]?: UnresolvedActionData;
|
|
298
299
|
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
299
300
|
};
|
|
@@ -320,6 +321,10 @@ export type AutomationActionData = {
|
|
|
320
321
|
resourceType: string;
|
|
321
322
|
siteAri: any;
|
|
322
323
|
};
|
|
324
|
+
export type RovoChatActionData = {
|
|
325
|
+
product?: ProductType;
|
|
326
|
+
url?: string;
|
|
327
|
+
};
|
|
323
328
|
export type UnresolvedActionData = RetryOptions;
|
|
324
329
|
export type ViewRelatedLinksActionData = {
|
|
325
330
|
ari: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type LinkActionProps } from '../types';
|
|
3
3
|
export declare enum RovoChatPromptKey {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
RECOMMEND_OTHER_SOURCES = "recommend-other-sources",
|
|
5
|
+
SHOW_OTHER_MENTIONS = "show-other-mentions",
|
|
6
|
+
SUGGEST_IMPROVEMENT = "suggest-improvement"
|
|
6
7
|
}
|
|
7
8
|
type RovoChatActionProps = LinkActionProps & {
|
|
8
9
|
prompts?: RovoChatPromptKey[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type CardState } from '@atlaskit/linking-common';
|
|
3
|
+
import { type CardState, type ProductType } from '@atlaskit/linking-common';
|
|
4
4
|
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
5
5
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
6
6
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
@@ -188,6 +188,7 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appear
|
|
|
188
188
|
};
|
|
189
189
|
url: string;
|
|
190
190
|
}) => void;
|
|
191
|
+
product?: ProductType;
|
|
191
192
|
resolve?: ResolveFunction;
|
|
192
193
|
response?: SmartLinkResponse;
|
|
193
194
|
rovoConfig?: RovoConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CardState } from '@atlaskit/linking-common';
|
|
2
2
|
import type { ActionName } from '../../../../../constants';
|
|
3
3
|
import { type LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
4
|
-
import type { InternalCardActionOptions } from '../../../../Card/types
|
|
4
|
+
import type { InternalCardActionOptions } from '../../../../Card/types';
|
|
5
5
|
import { type HoverCardLoadingViewProps } from '../resolving/types';
|
|
6
6
|
export type HoverCardResolvedProps = {
|
|
7
7
|
actionOptions?: InternalCardActionOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.26.
|
|
3
|
+
"version": "43.26.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/button": "^23.10.0",
|
|
38
38
|
"@atlaskit/checkbox": "^17.3.0",
|
|
39
39
|
"@atlaskit/css": "^0.19.0",
|
|
40
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
40
|
+
"@atlaskit/dropdown-menu": "^16.6.0",
|
|
41
41
|
"@atlaskit/embedded-confluence": "^4.5.0",
|
|
42
42
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
43
43
|
"@atlaskit/form": "^15.4.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@atlaskit/link-analytics": "^11.0.0",
|
|
53
53
|
"@atlaskit/link-client-extension": "^6.0.0",
|
|
54
54
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
55
|
-
"@atlaskit/link-test-helpers": "^9.
|
|
55
|
+
"@atlaskit/link-test-helpers": "^9.1.0",
|
|
56
56
|
"@atlaskit/linking-common": "^9.10.0",
|
|
57
57
|
"@atlaskit/linking-types": "^14.2.0",
|
|
58
58
|
"@atlaskit/logo": "^19.10.0",
|
|
59
|
-
"@atlaskit/lozenge": "^13.
|
|
59
|
+
"@atlaskit/lozenge": "^13.5.0",
|
|
60
60
|
"@atlaskit/menu": "^8.4.0",
|
|
61
61
|
"@atlaskit/modal-dialog": "^14.11.0",
|
|
62
62
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"@atlaskit/react-ufo": "^5.4.0",
|
|
68
68
|
"@atlaskit/rovo-triggers": "^5.22.0",
|
|
69
69
|
"@atlaskit/section-message": "^8.12.0",
|
|
70
|
-
"@atlaskit/select": "^21.
|
|
70
|
+
"@atlaskit/select": "^21.8.0",
|
|
71
71
|
"@atlaskit/spinner": "^19.0.0",
|
|
72
72
|
"@atlaskit/textarea": "^8.2.0",
|
|
73
73
|
"@atlaskit/textfield": "^8.2.0",
|
|
74
74
|
"@atlaskit/theme": "^22.0.0",
|
|
75
75
|
"@atlaskit/tile": "^1.0.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
77
|
-
"@atlaskit/tokens": "^11.
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^36.0.0",
|
|
77
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
78
78
|
"@atlaskit/tooltip": "^20.14.0",
|
|
79
79
|
"@atlaskit/ufo": "^0.4.0",
|
|
80
80
|
"@babel/runtime": "^7.0.0",
|