@atlaskit/smart-card 44.3.24 → 44.4.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 (64) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/vrblock-card-resolved-rovo-actions--default.png +3 -0
  3. package/dist/cjs/messages.js +10 -0
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/BlockCard/views/ResolvedView.js +17 -11
  6. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +4 -0
  7. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +10 -1
  8. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -1
  9. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +1 -1
  10. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -1
  11. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +2 -2
  12. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +41 -26
  13. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +29 -11
  14. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -1
  15. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +25 -7
  16. package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +6 -2
  17. package/dist/cjs/view/LinkUrl/index.js +1 -1
  18. package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/vrblock-card-resolved-rovo-actions--default.png +3 -0
  19. package/dist/es2019/messages.js +10 -0
  20. package/dist/es2019/utils/analytics/analytics.js +1 -1
  21. package/dist/es2019/view/BlockCard/views/ResolvedView.js +29 -21
  22. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +4 -0
  23. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +12 -3
  24. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -1
  25. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +1 -1
  26. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -1
  27. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -2
  28. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +41 -28
  29. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +29 -12
  30. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -1
  31. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +22 -8
  32. package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +5 -2
  33. package/dist/es2019/view/LinkUrl/index.js +1 -1
  34. package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/vrblock-card-resolved-rovo-actions--default.png +3 -0
  35. package/dist/esm/messages.js +10 -0
  36. package/dist/esm/utils/analytics/analytics.js +1 -1
  37. package/dist/esm/view/BlockCard/views/ResolvedView.js +18 -12
  38. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +4 -0
  39. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +12 -3
  40. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -1
  41. package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +1 -1
  42. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -1
  43. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -2
  44. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +42 -27
  45. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +30 -12
  46. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -1
  47. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +26 -8
  48. package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +6 -2
  49. package/dist/esm/view/LinkUrl/index.js +1 -1
  50. package/dist/types/messages.d.ts +1 -1
  51. package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +6 -1
  52. package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -1
  53. package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +4 -0
  54. package/dist/types/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -0
  55. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -2
  56. package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +5 -0
  57. package/dist/types-ts4.5/messages.d.ts +1 -1
  58. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +6 -1
  59. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -1
  60. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/types.d.ts +4 -0
  61. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -0
  62. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +7 -2
  63. package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +5 -0
  64. package/package.json +5 -4
@@ -15,6 +15,10 @@ export type FooterBlockProps = {
15
15
  * Allows hiding of the resources provider
16
16
  */
17
17
  hideProvider?: boolean;
18
+ /**
19
+ * Used with RovoActions to determine if the preview block is visible or not
20
+ */
21
+ isPreviewBlockErrored?: boolean;
18
22
  /**
19
23
  * Function to be called when footer action dropdown open state is changed.
20
24
  */
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode, type Ref } from 'react';
2
2
  import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
3
- import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
3
+ import { type ActionName, type CardDisplay, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
4
4
  import { type ActionProps } from '../actions/action/types';
5
5
  import type { AssignedToGroupElementProps } from '../elements/assigned-to-group-element';
6
6
  import type { BaseAvatarGroupElementProps } from '../elements/common/base-avatar-group-element';
@@ -125,6 +125,11 @@ export type BaseActionItem = {
125
125
  * Used to represent an Action which self-hydrates with data when passing props into Flexible UI.
126
126
  */
127
127
  export type BaseDataActionItem = {
128
+ /**
129
+ * Used in block card 3P post-auth experiment to show different icons for Rovo actions
130
+ * Should be removed on clean up of platform_sl_3p_auth_rovo_block_card_kill_switch after finalizing which icons to use long term
131
+ */
132
+ cardAppearance?: CardDisplay;
128
133
  /**
129
134
  * Determines whether the action should hide the text content of the button.
130
135
  */
@@ -167,7 +172,7 @@ export type BaseDataActionItem = {
167
172
  */
168
173
  export type NamedDataActionItem = BaseDataActionItem & {
169
174
  name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction | ActionName.CopyLinkAction | ActionName.RovoChatAction;
170
- };
175
+ } & Pick<ActionProps, 'iconSize'>;
171
176
  /**
172
177
  * This represents an action that does not fetch data where Icon and Content are provided implicitly.
173
178
  * @example DeleteAction - by default will contain a cross icon with the
@@ -24,6 +24,11 @@ export type BaseBadgeElementProps = ElementProps & {
24
24
  * the image will be rendered directly.
25
25
  */
26
26
  hideIconLoadingSkeleton?: boolean;
27
+ /**
28
+ * Determines whether the badge label should be hidden. When set to true,
29
+ * the badge will be displayed without the label, showing only the icon.
30
+ */
31
+ hideLabel?: boolean;
27
32
  /**
28
33
  * The Atlaskit Icon to display next to the label. If this is not supplied,
29
34
  * then the badge icon will fallback to the URL provided.
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
- export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions';
3
+ export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights';
4
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' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey;
5
5
  type Messages = {
6
6
  [K in MessageKey]: MessageDescriptor;
@@ -2,7 +2,7 @@ import type { ReactChild, ReactNode } from 'react';
2
2
  import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  import type { Appearance } from '@atlaskit/button/types';
4
4
  import type { Space } from '@atlaskit/primitives/compiled';
5
- import type { SmartLinkSize } from '../../../../../constants';
5
+ import type { CardDisplay, SmartLinkSize } from '../../../../../constants';
6
6
  export type ActionMessageAppearance = 'error';
7
7
  export type ActionMessage = {
8
8
  appearance?: ActionMessageAppearance;
@@ -27,6 +27,11 @@ export type ActionProps = {
27
27
  * Used to determine whether the Action is in a Dropdown.
28
28
  */
29
29
  asDropDownItem?: boolean;
30
+ /**
31
+ * Used in block card 3P post-auth experiment to show different icons for Rovo actions
32
+ * Should be removed on clean up of platform_sl_3p_auth_rovo_block_card_kill_switch after finalizing which icons to use long term
33
+ */
34
+ cardAppearance?: CardDisplay;
30
35
  /**
31
36
  * For compiled css
32
37
  */
@@ -6,5 +6,5 @@ import { type ActionGroupProps } from './types';
6
6
  * @param {ActionGroupProps} ActionGroupProps
7
7
  * @see Action
8
8
  */
9
- declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, }: ActionGroupProps) => JSX.Element | null;
9
+ declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, containerWidth, }: ActionGroupProps) => JSX.Element | null;
10
10
  export default ActionGroup;
@@ -6,6 +6,10 @@ export type ActionGroupProps = {
6
6
  * Determines the default appearance of the Action Group.
7
7
  */
8
8
  appearance?: Appearance;
9
+ /**
10
+ * The measured width of the stable footer container (from FooterBlockResolvedView).
11
+ */
12
+ containerWidth?: number;
9
13
  /**
10
14
  * Determines the direction that the actions are rendered. Can be vertical
11
15
  * or horizontal.
@@ -15,6 +15,10 @@ export type FooterBlockProps = {
15
15
  * Allows hiding of the resources provider
16
16
  */
17
17
  hideProvider?: boolean;
18
+ /**
19
+ * Used with RovoActions to determine if the preview block is visible or not
20
+ */
21
+ isPreviewBlockErrored?: boolean;
18
22
  /**
19
23
  * Function to be called when footer action dropdown open state is changed.
20
24
  */
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode, type Ref } from 'react';
2
2
  import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
3
- import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
3
+ import { type ActionName, type CardDisplay, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
4
4
  import { type ActionProps } from '../actions/action/types';
5
5
  import type { AssignedToGroupElementProps } from '../elements/assigned-to-group-element';
6
6
  import type { BaseAvatarGroupElementProps } from '../elements/common/base-avatar-group-element';
@@ -125,6 +125,11 @@ export type BaseActionItem = {
125
125
  * Used to represent an Action which self-hydrates with data when passing props into Flexible UI.
126
126
  */
127
127
  export type BaseDataActionItem = {
128
+ /**
129
+ * Used in block card 3P post-auth experiment to show different icons for Rovo actions
130
+ * Should be removed on clean up of platform_sl_3p_auth_rovo_block_card_kill_switch after finalizing which icons to use long term
131
+ */
132
+ cardAppearance?: CardDisplay;
128
133
  /**
129
134
  * Determines whether the action should hide the text content of the button.
130
135
  */
@@ -167,7 +172,7 @@ export type BaseDataActionItem = {
167
172
  */
168
173
  export type NamedDataActionItem = BaseDataActionItem & {
169
174
  name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction | ActionName.CopyLinkAction | ActionName.RovoChatAction;
170
- };
175
+ } & Pick<ActionProps, 'iconSize'>;
171
176
  /**
172
177
  * This represents an action that does not fetch data where Icon and Content are provided implicitly.
173
178
  * @example DeleteAction - by default will contain a cross icon with the
@@ -24,6 +24,11 @@ export type BaseBadgeElementProps = ElementProps & {
24
24
  * the image will be rendered directly.
25
25
  */
26
26
  hideIconLoadingSkeleton?: boolean;
27
+ /**
28
+ * Determines whether the badge label should be hidden. When set to true,
29
+ * the badge will be displayed without the label, showing only the icon.
30
+ */
31
+ hideLabel?: boolean;
27
32
  /**
28
33
  * The Atlaskit Icon to display next to the label. If this is not supplied,
29
34
  * then the badge icon will fallback to the URL provided.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "44.3.24",
3
+ "version": "44.4.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/lozenge": "^13.8.0",
69
69
  "@atlaskit/menu": "^8.5.0",
70
70
  "@atlaskit/modal-dialog": "^14.18.0",
71
- "@atlaskit/motion": "^6.1.0",
71
+ "@atlaskit/motion": "^6.2.0",
72
72
  "@atlaskit/object": "^1.0.0",
73
73
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
74
74
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -80,15 +80,16 @@
80
80
  "@atlaskit/section-message": "^8.12.0",
81
81
  "@atlaskit/select": "^21.10.0",
82
82
  "@atlaskit/spinner": "^19.1.0",
83
- "@atlaskit/tag": "^14.12.0",
83
+ "@atlaskit/tag": "^14.13.0",
84
84
  "@atlaskit/textarea": "^8.3.0",
85
85
  "@atlaskit/textfield": "^8.3.0",
86
86
  "@atlaskit/theme": "^23.2.0",
87
87
  "@atlaskit/tile": "^1.1.0",
88
- "@atlaskit/tmp-editor-statsig": "^74.0.0",
88
+ "@atlaskit/tmp-editor-statsig": "^74.1.0",
89
89
  "@atlaskit/tokens": "^13.0.0",
90
90
  "@atlaskit/tooltip": "^21.2.0",
91
91
  "@atlaskit/ufo": "^0.4.0",
92
+ "@atlaskit/width-detector": "^5.1.0",
92
93
  "@babel/runtime": "^7.0.0",
93
94
  "@compiled/react": "^0.20.0",
94
95
  "@formatjs/intl-utils": "^3.8.4",