@atlaskit/smart-card 44.3.1 → 44.3.3

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 (51) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/analytics.spec.yaml +9 -0
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -0
  4. package/dist/cjs/messages.js +0 -10
  5. package/dist/cjs/ssr.js +28 -1
  6. package/dist/cjs/state/hooks/use-intersection-observer/index.js +49 -0
  7. package/dist/cjs/view/CardWithUrl/card-error-boundary/index.js +28 -0
  8. package/dist/cjs/view/CardWithUrl/card-intersection-observer/index.js +46 -0
  9. package/dist/cjs/view/CardWithUrl/card-loader-wrapper/index.js +23 -0
  10. package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +43 -3
  11. package/dist/cjs/view/CardWithUrl/component.js +34 -2
  12. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +3 -2
  13. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -0
  14. package/dist/es2019/messages.js +0 -10
  15. package/dist/es2019/ssr.js +28 -2
  16. package/dist/es2019/state/hooks/use-intersection-observer/index.js +41 -0
  17. package/dist/es2019/view/CardWithUrl/card-error-boundary/index.js +20 -0
  18. package/dist/es2019/view/CardWithUrl/card-intersection-observer/index.js +25 -0
  19. package/dist/es2019/view/CardWithUrl/card-loader-wrapper/index.js +16 -0
  20. package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +39 -2
  21. package/dist/es2019/view/CardWithUrl/component.js +34 -2
  22. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +3 -2
  23. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -0
  24. package/dist/esm/messages.js +0 -10
  25. package/dist/esm/ssr.js +29 -2
  26. package/dist/esm/state/hooks/use-intersection-observer/index.js +44 -0
  27. package/dist/esm/view/CardWithUrl/card-error-boundary/index.js +21 -0
  28. package/dist/esm/view/CardWithUrl/card-intersection-observer/index.js +37 -0
  29. package/dist/esm/view/CardWithUrl/card-loader-wrapper/index.js +15 -0
  30. package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +42 -2
  31. package/dist/esm/view/CardWithUrl/component.js +34 -2
  32. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +3 -2
  33. package/dist/types/common/analytics/generated/analytics.types.d.ts +7 -1
  34. package/dist/types/messages.d.ts +1 -1
  35. package/dist/types/state/hooks/use-intersection-observer/index.d.ts +6 -0
  36. package/dist/types/view/CardWithUrl/card-error-boundary/index.d.ts +5 -0
  37. package/dist/types/view/CardWithUrl/card-intersection-observer/index.d.ts +7 -0
  38. package/dist/types/view/CardWithUrl/card-loader-wrapper/index.d.ts +7 -0
  39. package/dist/types/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +1 -1
  40. package/dist/types/view/CardWithUrl/component.d.ts +1 -0
  41. package/dist/types/view/CardWithUrl/types.d.ts +1 -0
  42. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +7 -1
  43. package/dist/types-ts4.5/messages.d.ts +1 -1
  44. package/dist/types-ts4.5/state/hooks/use-intersection-observer/index.d.ts +6 -0
  45. package/dist/types-ts4.5/view/CardWithUrl/card-error-boundary/index.d.ts +5 -0
  46. package/dist/types-ts4.5/view/CardWithUrl/card-intersection-observer/index.d.ts +7 -0
  47. package/dist/types-ts4.5/view/CardWithUrl/card-loader-wrapper/index.d.ts +7 -0
  48. package/dist/types-ts4.5/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +1 -1
  49. package/dist/types-ts4.5/view/CardWithUrl/component.d.ts +1 -0
  50. package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
  51. package/package.json +7 -4
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::1c5f802d8b5609627e5ffbebf73bad6e>>
6
+ * @codegen <<SignedSource::4d978bf4946aee0ad737d8305df7a6a0>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -263,6 +263,9 @@ export type SmartLinkRenderFailedAttributesType = {
263
263
  id: string | null;
264
264
  };
265
265
  export type ButtonClickedDismissAttributesType = {};
266
+ export type SmartLinkSeenAttributesType = {
267
+ display: 'inline' | 'block' | 'embed' | 'flexible';
268
+ };
266
269
  export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
267
270
  thirdPartyARI: string;
268
271
  eventName: string;
@@ -439,6 +442,9 @@ export type AnalyticsEventAttributes = {
439
442
  /**
440
443
  * fires an event that represents when a Smart Link renders unsuccessfully. */
441
444
  'ui.smartLink.renderFailed': SmartLinkRenderFailedAttributesType;
445
+ /**
446
+ * fires an event that represents when a rendered Smart Link is visible in the viewport for the first time */
447
+ 'ui.smartLink.seen': SmartLinkSeenAttributesType;
442
448
  /**
443
449
  * fires an event that represents when a user clicks on a Smart Link to track analytics for the 3P Workflows team */
444
450
  'ui.smartLink.clicked.smartlinkClickAnalyticsWorkflows': SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType;
@@ -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_key_highlights' | 'rovo_prompt_message_key_highlights' | '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';
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' | RovoChatActionMessageKey;
5
5
  type Messages = {
6
6
  [K in MessageKey]: MessageDescriptor;
@@ -0,0 +1,6 @@
1
+ type UseIntersectionObserverProps = {
2
+ onIntersecting?: () => void;
3
+ onIntersection?: (isIntersecting: boolean) => void;
4
+ };
5
+ declare const useIntersectionObserver: ({ onIntersecting: onIntersectingCallback, onIntersection: onIntersectionCallback, }: UseIntersectionObserverProps) => import("react").MutableRefObject<HTMLDivElement | null>;
6
+ export default useIntersectionObserver;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { CardProps } from '../../Card';
3
+ type CardErrorBoundaryProps = CardProps & Required<Pick<CardProps, 'id' | 'url'>>;
4
+ declare const CardErrorBoundary: ({ children, ...props }: React.PropsWithChildren<CardErrorBoundaryProps>) => React.JSX.Element;
5
+ export default CardErrorBoundary;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { CardProps } from '../../Card';
3
+ type WithCardIntersectionObserverProps = {
4
+ appearance: CardProps['appearance'];
5
+ };
6
+ declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => (props: T) => React.JSX.Element;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { CardProps } from '../../Card';
3
+ type CardLoaderWrapperProps = Pick<CardProps, 'appearance'>;
4
+ declare const CardLoaderWrapper: React.ForwardRefExoticComponent<CardLoaderWrapperProps & {
5
+ children?: React.ReactNode | undefined;
6
+ } & React.RefAttributes<HTMLDivElement>>;
7
+ export default CardLoaderWrapper;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type CardWithUrlContentProps } from '../types';
3
- export declare function LazyIntersectionObserverCard(props: CardWithUrlContentProps): React.JSX.Element;
3
+ export declare const LazyIntersectionObserverCard: React.FC<CardWithUrlContentProps>;
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type CardWithUrlContentProps } from './types';
3
3
  export declare const CardWithUrlContent: (props: CardWithUrlContentProps) => React.JSX.Element;
4
+ export declare const CardWithUrl: (props: CardWithUrlContentProps) => React.JSX.Element;
@@ -24,6 +24,7 @@ export type CardWithUrlContentProps = {
24
24
  inheritDimensions?: boolean;
25
25
  inlinePreloaderStyle?: InlinePreloaderStyle;
26
26
  isHovered?: boolean;
27
+ isIntersected?: boolean;
27
28
  isSelected?: boolean;
28
29
  onClick?: EventHandler<MouseEvent | KeyboardEvent>;
29
30
  onError?: OnErrorCallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "44.3.1",
3
+ "version": "44.3.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.6.0",
40
40
  "@atlaskit/analytics-gas-types": "^5.1.0",
41
41
  "@atlaskit/analytics-next": "^11.2.0",
42
- "@atlaskit/avatar": "^25.12.0",
42
+ "@atlaskit/avatar": "^25.13.0",
43
43
  "@atlaskit/avatar-group": "^12.7.0",
44
44
  "@atlaskit/badge": "^18.6.0",
45
45
  "@atlaskit/browser-apis": "^0.0.1",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/link-analytics": "^11.0.0",
63
63
  "@atlaskit/link-client-extension": "^6.0.0",
64
64
  "@atlaskit/link-extractors": "^2.4.0",
65
- "@atlaskit/link-test-helpers": "^10.1.0",
65
+ "@atlaskit/link-test-helpers": "^10.2.0",
66
66
  "@atlaskit/linking-common": "^9.11.0",
67
67
  "@atlaskit/linking-types": "^14.2.0",
68
68
  "@atlaskit/logo": "^20.0.0",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/popup": "^4.16.0",
76
76
  "@atlaskit/primitives": "^19.0.0",
77
77
  "@atlaskit/react-ufo": "^5.16.0",
78
- "@atlaskit/rovo-triggers": "^5.42.0",
78
+ "@atlaskit/rovo-triggers": "^5.43.0",
79
79
  "@atlaskit/section-message": "^8.12.0",
80
80
  "@atlaskit/select": "^21.10.0",
81
81
  "@atlaskit/spinner": "^19.1.0",
@@ -220,6 +220,9 @@
220
220
  "platform_sl_3p_auth_rovo_action_kill_switch": {
221
221
  "type": "boolean"
222
222
  },
223
+ "platform_sl_event_ui_seen": {
224
+ "type": "boolean"
225
+ },
223
226
  "jpx-1074-smart-links-iframe": {
224
227
  "type": "boolean"
225
228
  },