@atlaskit/smart-card 26.56.5 → 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.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/constants.js +5 -1
- package/dist/cjs/extractors/flexible/actions/extract-ai-summary-action.js +20 -0
- package/dist/cjs/extractors/flexible/actions/index.js +3 -2
- package/dist/cjs/extractors/flexible/index.js +3 -2
- package/dist/cjs/messages.js +10 -0
- package/dist/cjs/state/hooks/use-ai-summary-config/index.js +19 -0
- package/dist/cjs/state/hooks/use-ai-summary-config/types.js +5 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/get-is-ai-summary-enabled.js +13 -0
- package/dist/cjs/view/Card/types.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +60 -0
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/index.js +19 -0
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/index.js +4 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/cjs/view/HoverCard/utils.js +1 -7
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/constants.js +4 -1
- package/dist/es2019/extractors/flexible/actions/extract-ai-summary-action.js +14 -0
- package/dist/es2019/extractors/flexible/actions/index.js +5 -3
- package/dist/es2019/extractors/flexible/index.js +3 -2
- package/dist/es2019/messages.js +10 -0
- package/dist/es2019/state/flexible-ui-context/types.js +1 -1
- package/dist/es2019/state/hooks/use-ai-summary-config/index.js +12 -0
- package/dist/es2019/state/hooks/use-ai-summary-config/types.js +1 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/get-is-ai-summary-enabled.js +5 -0
- package/dist/es2019/view/Card/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +51 -0
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/index.js +12 -0
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/index.js +4 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/es2019/view/HoverCard/utils.js +0 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/constants.js +4 -1
- package/dist/esm/extractors/flexible/actions/extract-ai-summary-action.js +14 -0
- package/dist/esm/extractors/flexible/actions/index.js +4 -3
- package/dist/esm/extractors/flexible/index.js +3 -2
- package/dist/esm/messages.js +10 -0
- package/dist/esm/state/flexible-ui-context/types.js +1 -1
- package/dist/esm/state/hooks/use-ai-summary-config/index.js +13 -0
- package/dist/esm/state/hooks/use-ai-summary-config/types.js +1 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/get-is-ai-summary-enabled.js +7 -0
- package/dist/esm/view/Card/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +50 -0
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/index.js +12 -0
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/index.js +4 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/esm/view/HoverCard/utils.js +0 -6
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/constants.d.ts +4 -0
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +2 -0
- package/dist/types/extractors/flexible/actions/extract-ai-summary-action.d.ts +5 -0
- package/dist/types/extractors/flexible/actions/index.d.ts +2 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +8 -1
- package/dist/types/state/hooks/use-ai-summary-config/index.d.ts +2 -0
- package/dist/types/state/hooks/use-ai-summary-config/types.d.ts +5 -0
- package/dist/types/utils/get-is-ai-summary-enabled.d.ts +2 -0
- package/dist/types/view/Card/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/types.d.ts +2 -0
- package/dist/types/view/HoverCard/utils.d.ts +0 -1
- package/dist/types-ts4.5/constants.d.ts +4 -0
- package/dist/types-ts4.5/extractors/common/__mocks__/jsonld.d.ts +2 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-ai-summary-action.d.ts +5 -0
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +2 -1
- package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +8 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary-config/index.d.ts +2 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary-config/types.d.ts +5 -0
- package/dist/types-ts4.5/utils/get-is-ai-summary-enabled.d.ts +2 -0
- package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +2 -0
- package/dist/types-ts4.5/view/HoverCard/utils.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Space } from '@atlaskit/primitives';
|
|
2
|
-
import type { ActionName } from '../../../../../constants';
|
|
3
2
|
import type { BlockProps } from '../types';
|
|
3
|
+
import { FlexibleUiActionName } from '../../../../../constants';
|
|
4
4
|
export type ActionBlockProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Callback once action is executed.
|
|
7
7
|
*/
|
|
8
|
-
onClick?: (name:
|
|
8
|
+
onClick?: (name: FlexibleUiActionName) => void;
|
|
9
9
|
/**
|
|
10
10
|
* Used to add space along the inline axis (typically horizontal).
|
|
11
11
|
*/
|
|
@@ -7,6 +7,7 @@ import { SmartLinkSize, SmartLinkStatus, SmartLinkTheme } from '../../constants'
|
|
|
7
7
|
import type { CardInnerAppearance, OnResolveCallback, CardActionOptions } from '../Card/types';
|
|
8
8
|
import { OnErrorCallback } from '../types';
|
|
9
9
|
import { AnalyticsFacade } from '../../state/analytics';
|
|
10
|
+
import { AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
10
11
|
export type FlexibleCardProps = {
|
|
11
12
|
/**
|
|
12
13
|
* @internal A unique ID for a Smart Link.
|
|
@@ -145,6 +146,7 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'id' |
|
|
|
145
146
|
status?: SmartLinkStatus;
|
|
146
147
|
response?: JsonLd.Response;
|
|
147
148
|
featureFlags?: Partial<LinkingPlatformFeatureFlags>;
|
|
149
|
+
aiSummaryConfig?: AISummaryConfig;
|
|
148
150
|
};
|
|
149
151
|
/**
|
|
150
152
|
* Mark a specific props in the type as optional.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { JsonLd } from 'json-ld-types';
|
|
2
2
|
export declare const getSimulatedMetadata: (extensionKey: string | undefined, data: JsonLd.Data.BaseData) => JsonLd.Primitives.Property<any>;
|
|
3
3
|
export declare const getSimulatedBetterMetadata: (extensionKey: string | undefined, data: JsonLd.Data.BaseData) => JsonLd.Primitives.Property<any>;
|
|
4
|
-
export declare const getIsAISummaryEnabled: (isAdminHubAIEnabled?: boolean, response?: JsonLd.Response) => boolean;
|
|
@@ -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, 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' | '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';
|
|
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
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
2
|
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
3
|
-
import { ActionName, IconType, MediaType } from '../../constants';
|
|
3
|
+
import { ActionName, IconType, InternalActionName, MediaType } from '../../constants';
|
|
4
4
|
import { InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
5
5
|
import type { CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import type { AnalyticsFacade } from '../analytics';
|
|
7
|
+
import type { ProductType } from '@atlaskit/linking-common';
|
|
7
8
|
/**
|
|
8
9
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
9
10
|
* underlying elements.
|
|
@@ -245,6 +246,7 @@ export type FlexibleUiActions = {
|
|
|
245
246
|
[ActionName.DownloadAction]?: DownloadActionData;
|
|
246
247
|
[ActionName.FollowAction]?: ServerActionProp<boolean>;
|
|
247
248
|
[ActionName.CopyLinkAction]?: CopyLinkActionData;
|
|
249
|
+
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
248
250
|
};
|
|
249
251
|
export type PreviewActionData = {
|
|
250
252
|
downloadUrl?: string;
|
|
@@ -264,6 +266,11 @@ export type DownloadActionData = {
|
|
|
264
266
|
export type CopyLinkActionData = {
|
|
265
267
|
url: string;
|
|
266
268
|
};
|
|
269
|
+
export type AISummaryActionData = {
|
|
270
|
+
ari?: string;
|
|
271
|
+
product: ProductType;
|
|
272
|
+
url: string;
|
|
273
|
+
};
|
|
267
274
|
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
268
275
|
display?: CardInnerAppearance;
|
|
269
276
|
extensionKey?: string;
|
|
@@ -20,7 +20,8 @@ export declare enum CardAction {
|
|
|
20
20
|
ViewAction = "ViewAction",
|
|
21
21
|
ChangeStatusAction = "ChangeStatusAction",
|
|
22
22
|
FollowAction = "FollowAction",
|
|
23
|
-
CopyLinkAction = "CopyLinkAction"
|
|
23
|
+
CopyLinkAction = "CopyLinkAction",
|
|
24
|
+
AISummaryAction = "AISummaryAction"
|
|
24
25
|
}
|
|
25
26
|
export type CardActionOptions = {
|
|
26
27
|
hide: true;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AISummaryActionData } from '../../../../../state/flexible-ui-context/types';
|
|
3
|
+
import { AISummaryActionProps } from './types';
|
|
4
|
+
export declare const AISummaryActionComponent: ({ onClick: onClickCallback, url, ari, product, ...props }: AISummaryActionProps & AISummaryActionData) => JSX.Element | null;
|
|
@@ -5,3 +5,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
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
|
+
export { default as AISummaryAction } from './ai-summary-action';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { ActionBlockProps } from './types';
|
|
3
|
-
declare const ActionBlock:
|
|
3
|
+
declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, testId, }: ActionBlockProps) => JSX.Element | null;
|
|
4
4
|
export default ActionBlock;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Space } from '@atlaskit/primitives';
|
|
2
|
-
import type { ActionName } from '../../../../../constants';
|
|
3
2
|
import type { BlockProps } from '../types';
|
|
3
|
+
import { FlexibleUiActionName } from '../../../../../constants';
|
|
4
4
|
export type ActionBlockProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Callback once action is executed.
|
|
7
7
|
*/
|
|
8
|
-
onClick?: (name:
|
|
8
|
+
onClick?: (name: FlexibleUiActionName) => void;
|
|
9
9
|
/**
|
|
10
10
|
* Used to add space along the inline axis (typically horizontal).
|
|
11
11
|
*/
|
|
@@ -7,6 +7,7 @@ import { SmartLinkSize, SmartLinkStatus, SmartLinkTheme } from '../../constants'
|
|
|
7
7
|
import type { CardInnerAppearance, OnResolveCallback, CardActionOptions } from '../Card/types';
|
|
8
8
|
import { OnErrorCallback } from '../types';
|
|
9
9
|
import { AnalyticsFacade } from '../../state/analytics';
|
|
10
|
+
import { AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
10
11
|
export type FlexibleCardProps = {
|
|
11
12
|
/**
|
|
12
13
|
* @internal A unique ID for a Smart Link.
|
|
@@ -145,6 +146,7 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'id' |
|
|
|
145
146
|
status?: SmartLinkStatus;
|
|
146
147
|
response?: JsonLd.Response;
|
|
147
148
|
featureFlags?: Partial<LinkingPlatformFeatureFlags>;
|
|
149
|
+
aiSummaryConfig?: AISummaryConfig;
|
|
148
150
|
};
|
|
149
151
|
/**
|
|
150
152
|
* Mark a specific props in the type as optional.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { JsonLd } from 'json-ld-types';
|
|
2
2
|
export declare const getSimulatedMetadata: (extensionKey: string | undefined, data: JsonLd.Data.BaseData) => JsonLd.Primitives.Property<any>;
|
|
3
3
|
export declare const getSimulatedBetterMetadata: (extensionKey: string | undefined, data: JsonLd.Data.BaseData) => JsonLd.Primitives.Property<any>;
|
|
4
|
-
export declare const getIsAISummaryEnabled: (isAdminHubAIEnabled?: boolean, response?: JsonLd.Response) => boolean;
|