@atlaskit/smart-card 23.11.2 → 23.12.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 (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/messages.js +5 -0
  3. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +216 -146
  4. package/dist/cjs/utils/analytics/analytics.js +134 -74
  5. package/dist/cjs/utils/analytics/index.js +6 -0
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/cjs/view/CardWithUrl/component.js +27 -1
  8. package/dist/cjs/view/EmbedCard/components/Frame.js +110 -5
  9. package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +75 -0
  10. package/dist/cjs/view/EmbedCard/index.js +6 -2
  11. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +6 -2
  12. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +49 -2
  13. package/dist/es2019/messages.js +5 -0
  14. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +69 -1
  15. package/dist/es2019/utils/analytics/analytics.js +52 -0
  16. package/dist/es2019/utils/analytics/index.js +1 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/es2019/view/CardWithUrl/component.js +27 -1
  19. package/dist/es2019/view/EmbedCard/components/Frame.js +91 -6
  20. package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +57 -0
  21. package/dist/es2019/view/EmbedCard/index.js +6 -2
  22. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +6 -2
  23. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +13 -1
  24. package/dist/esm/messages.js +5 -0
  25. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +217 -147
  26. package/dist/esm/utils/analytics/analytics.js +127 -73
  27. package/dist/esm/utils/analytics/index.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/esm/view/CardWithUrl/component.js +27 -1
  30. package/dist/esm/view/EmbedCard/components/Frame.js +110 -6
  31. package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +62 -0
  32. package/dist/esm/view/EmbedCard/index.js +6 -2
  33. package/dist/esm/view/EmbedCard/views/ResolvedView.js +6 -2
  34. package/dist/esm/view/HoverCard/components/HoverCardContent.js +43 -1
  35. package/dist/types/messages.d.ts +1 -1
  36. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +27 -1
  37. package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
  38. package/dist/types/state/hooks/useSmartLink.d.ts +2 -0
  39. package/dist/types/utils/analytics/analytics.d.ts +3 -1
  40. package/dist/types/utils/analytics/index.d.ts +1 -1
  41. package/dist/types/utils/analytics/types.d.ts +12 -0
  42. package/dist/types/utils/mocks.d.ts +2 -0
  43. package/dist/types/utils/types.d.ts +2 -2
  44. package/dist/types/view/EmbedCard/components/Frame.d.ts +2 -0
  45. package/dist/types/view/EmbedCard/components/IframeDwellTracker.d.ts +8 -0
  46. package/dist/types/view/EmbedCard/types.d.ts +2 -0
  47. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +4 -0
  48. package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -0
  49. package/package.json +2 -2
  50. package/report.api.md +42 -1
  51. package/tmp/api-report-tmp.d.ts +20 -2
@@ -1,5 +1,5 @@
1
1
  import { AnalyticsHandler, AnalyticsName, AnalyticsPayload } from '../../utils/types';
2
- import { CommonEventProps, ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps } from '../../utils/analytics/types';
2
+ import { CommonEventProps, ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiIframeDwelledEventProps, UiIframeFocusedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps } from '../../utils/analytics/types';
3
3
  /**
4
4
  * This hook provides usage of Smart Link analytics outside of the Card component.
5
5
  * Can be provided to Card via the analyticsEvents prop to change the analytics events.
@@ -50,6 +50,32 @@ export declare const useSmartLinkAnalytics: (url: string, dispatchAnalytics: Ana
50
50
  * @returns
51
51
  */
52
52
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
53
+ /**
54
+ * This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
55
+ * @param id The unique ID for this Smart Link.
56
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
57
+ * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
58
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
59
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
60
+ * @param location Where the Smart Link is currently rendered.
61
+ * @param destinationProduct The product the Smart Link is linked to.
62
+ * @param dwellTime Total seconds that the user has dwelled on this iframe
63
+ * @param dwellPercentVisible Percentage element was visible at end of dwell
64
+ * @returns
65
+ */
66
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
67
+ /**
68
+ * This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
69
+ * @param id The unique ID for this Smart Link.
70
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
71
+ * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
72
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
73
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
74
+ * @param location Where the Smart Link is currently rendered.
75
+ * @param destinationProduct The product the Smart Link is linked to.
76
+ * @returns
77
+ */
78
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
53
79
  /**
54
80
  * This fires an event that represents when a user clicks on a Smart Link action.
55
81
  * Note: This also starts the UFO smart-link-action-invocation experience.
@@ -18,6 +18,8 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
18
18
  actionSubjectId: string;
19
19
  }) => void;
20
20
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
21
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
22
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
21
23
  actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
22
24
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
23
25
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
@@ -60,6 +62,8 @@ export declare const useFlexibleUiAnalyticsContext: () => {
60
62
  actionSubjectId: string;
61
63
  }) => void;
62
64
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
65
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
66
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
63
67
  actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
64
68
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
65
69
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
@@ -17,6 +17,8 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
17
17
  actionSubjectId: string;
18
18
  }) => void;
19
19
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
20
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
21
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
20
22
  actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
21
23
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
22
24
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
@@ -1,7 +1,7 @@
1
1
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import { AnalyticsPayload } from '../types';
3
3
  import { CardInnerAppearance } from '../../view/Card/types';
4
- import { CommonEventProps, ConnectFailedEventProps, ConnectSucceededEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ResolvedEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UnresolvedEventProps } from './types';
4
+ import { CommonEventProps, ConnectFailedEventProps, ConnectSucceededEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ResolvedEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiIframeDwelledEventProps, UiIframeFocusedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UnresolvedEventProps } from './types';
5
5
  export declare const ANALYTICS_CHANNEL = "media";
6
6
  export declare const context: {
7
7
  componentName: string;
@@ -26,6 +26,8 @@ export declare const trackLinkUpdated: ({ actionSubjectId, ...attributes }: Comm
26
26
  export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
27
27
  export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
28
28
  export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
29
+ export declare const uiIframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => AnalyticsPayload;
30
+ export declare const uiIframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => AnalyticsPayload;
29
31
  export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
30
32
  export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => AnalyticsPayload;
31
33
  export declare const screenAuthPopupEvent: ({ extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => AnalyticsPayload;
@@ -1,4 +1,4 @@
1
1
  import { AnalyticsPayload } from '../types';
2
2
  import { InstrumentEventProps } from './types';
3
- export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, } from './analytics';
3
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiIframeDwelledEvent, } from './analytics';
4
4
  export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;
@@ -54,6 +54,18 @@ export declare type UiCardClickedEventProps = CommonEventProps & {
54
54
  isModifierKeyPressed?: boolean;
55
55
  actionSubjectId?: string;
56
56
  };
57
+ export declare type UiIframeDwelledEventProps = CommonEventProps & {
58
+ id: string;
59
+ display: CardInnerAppearance;
60
+ status: CardType;
61
+ dwellTime: number;
62
+ dwellPercentVisible: number;
63
+ };
64
+ export declare type UiIframeFocusedEventProps = CommonEventProps & {
65
+ id: string;
66
+ display: CardInnerAppearance;
67
+ status: CardType;
68
+ };
57
69
  export declare type UiActionClickedEventProps = CommonEventProps & {
58
70
  id: string;
59
71
  display: CardInnerAppearance;
@@ -47,6 +47,8 @@ export declare const mockAnalytics: {
47
47
  actionSubjectId: string;
48
48
  }) => void;
49
49
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
50
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("./analytics/types").UiIframeDwelledEventProps) => void;
51
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("./analytics/types").UiIframeFocusedEventProps) => void;
50
52
  actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
51
53
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
52
54
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
@@ -1,7 +1,7 @@
1
1
  import { GasPayload } from '@atlaskit/analytics-gas-types';
2
2
  import { CardInnerAppearance } from '../view/Card/types';
3
- export declare type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connected' | 'connectFailed' | 'connectSucceeded' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'viewed' | 'unresolved' | 'updated' | 'chunkLoadFailed';
4
- export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard' | 'modal' | 'embedPreviewModal' | 'link';
3
+ export declare type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connected' | 'connectFailed' | 'connectSucceeded' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'viewed' | 'unresolved' | 'updated' | 'chunkLoadFailed' | 'dwelled' | 'focused';
4
+ export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard' | 'modal' | 'embedPreviewModal' | 'smartLinkIframe' | 'link';
5
5
  export declare type AnalyticsName = 'embedPreviewModal';
6
6
  export declare type AnalyticsOrigin = 'smartLinkCard' | 'smartLinkEmbed' | 'smartLinkInline' | 'smartLinkPreviewHoverCard';
7
7
  export declare type AnalyticsPayload = GasPayload & {
@@ -3,5 +3,7 @@ export interface FrameProps {
3
3
  url?: string;
4
4
  isTrusted?: boolean;
5
5
  testId?: string;
6
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
7
+ onIframeFocus?: () => void;
6
8
  }
7
9
  export declare const Frame: React.ForwardRefExoticComponent<FrameProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -0,0 +1,8 @@
1
+ export interface IframeDwellTrackerProps {
2
+ isIframeLoaded: boolean;
3
+ isMouseOver: boolean;
4
+ isWindowFocused: boolean;
5
+ iframePercentVisible: number;
6
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
7
+ }
8
+ export declare const IframeDwellTracker: ({ isIframeLoaded, isMouseOver, isWindowFocused, iframePercentVisible, onIframeDwell, }: IframeDwellTrackerProps) => null;
@@ -23,6 +23,8 @@ export declare type EmbedCardProps = {
23
23
  testId?: string;
24
24
  inheritDimensions?: boolean;
25
25
  showActions?: boolean;
26
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
27
+ onIframeFocus?: () => void;
26
28
  };
27
29
  export interface WithShowControlMethodProp {
28
30
  showControls?: () => void;
@@ -23,5 +23,9 @@ export interface EmbedCardResolvedViewProps {
23
23
  /** For testing purposes only. */
24
24
  testId?: string;
25
25
  inheritDimensions?: boolean;
26
+ /** Optional callback for when user dwells cursor over iframe - for analytics **/
27
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
28
+ /** Optional callback for when user navigates into an iframe - for analytics **/
29
+ onIframeFocus?: () => void;
26
30
  }
27
31
  export declare const EmbedCardResolvedView: React.ForwardRefExoticComponent<EmbedCardResolvedViewProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -4,5 +4,6 @@ import { ActionItem } from '../../FlexibleCard/components/blocks/types';
4
4
  import { HoverCardContentProps } from '../types';
5
5
  export declare const hoverCardClassName = "smart-links-hover-preview";
6
6
  export declare const getOpenAction: (url: string, analytics: AnalyticsFacade, onActionClick?: ((actionId: string) => void) | undefined) => ActionItem;
7
+ export declare const getCopyAction: (url: string) => ActionItem;
7
8
  declare const HoverCardContent: React.FC<HoverCardContentProps>;
8
9
  export default HoverCardContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.11.2",
3
+ "version": "23.12.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/icon-object": "^6.2.0",
34
34
  "@atlaskit/icon-priority": "^6.3.0",
35
35
  "@atlaskit/in-product-testing": "^0.1.0",
36
- "@atlaskit/linking-common": "^1.16.0",
36
+ "@atlaskit/linking-common": "^1.19.0",
37
37
  "@atlaskit/logo": "^13.10.0",
38
38
  "@atlaskit/lozenge": "^11.3.0",
39
39
  "@atlaskit/media-common": "^2.18.0",
package/report.api.md CHANGED
@@ -94,6 +94,8 @@ export type AnalyticsAction =
94
94
  | 'connected'
95
95
  | 'created'
96
96
  | 'dismissed'
97
+ | 'dwelled'
98
+ | 'focused'
97
99
  | 'inserted'
98
100
  | 'renderFailed'
99
101
  | 'renderSuccess'
@@ -113,7 +115,8 @@ export type AnalyticsActionSubject =
113
115
  | 'link'
114
116
  | 'modal'
115
117
  | 'smartLink'
116
- | 'smartLinkAction';
118
+ | 'smartLinkAction'
119
+ | 'smartLinkIframe';
117
120
 
118
121
  // @public (undocumented)
119
122
  type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
@@ -905,6 +908,22 @@ type UiHoverCardViewedEventProps = CommonEventProps & {
905
908
  status: CardType;
906
909
  };
907
910
 
911
+ // @public (undocumented)
912
+ type UiIframeDwelledEventProps = CommonEventProps & {
913
+ id: string;
914
+ display: CardInnerAppearance;
915
+ status: CardType;
916
+ dwellTime: number;
917
+ dwellPercentVisible: number;
918
+ };
919
+
920
+ // @public (undocumented)
921
+ type UiIframeFocusedEventProps = CommonEventProps & {
922
+ id: string;
923
+ display: CardInnerAppearance;
924
+ status: CardType;
925
+ };
926
+
908
927
  // @public (undocumented)
909
928
  type UiRenderFailedEventProps = CommonEventProps & {
910
929
  display: CardInnerAppearance;
@@ -961,6 +980,28 @@ export const useSmartLinkAnalytics: (
961
980
  destinationSubproduct,
962
981
  actionSubjectId,
963
982
  }: UiCardClickedEventProps) => void;
983
+ iframeDwelledEvent: ({
984
+ id,
985
+ display,
986
+ status,
987
+ definitionId,
988
+ extensionKey,
989
+ location,
990
+ destinationProduct,
991
+ destinationSubproduct,
992
+ dwellTime,
993
+ dwellPercentVisible,
994
+ }: UiIframeDwelledEventProps) => void;
995
+ iframeFocusedEvent: ({
996
+ id,
997
+ display,
998
+ status,
999
+ definitionId,
1000
+ extensionKey,
1001
+ location,
1002
+ destinationProduct,
1003
+ destinationSubproduct,
1004
+ }: UiIframeFocusedEventProps) => void;
964
1005
  actionClickedEvent: ({
965
1006
  id,
966
1007
  actionType,
@@ -70,10 +70,10 @@ type ActionProps = {
70
70
  };
71
71
 
72
72
  // @public (undocumented)
73
- export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'updated' | 'viewed';
73
+ export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'dwelled' | 'focused' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'updated' | 'viewed';
74
74
 
75
75
  // @public (undocumented)
76
- export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'link' | 'modal' | 'smartLink' | 'smartLinkAction';
76
+ export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'link' | 'modal' | 'smartLink' | 'smartLinkAction' | 'smartLinkIframe';
77
77
 
78
78
  // @public (undocumented)
79
79
  type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
@@ -775,6 +775,22 @@ type UiHoverCardViewedEventProps = CommonEventProps & {
775
775
  status: CardType;
776
776
  };
777
777
 
778
+ // @public (undocumented)
779
+ type UiIframeDwelledEventProps = CommonEventProps & {
780
+ id: string;
781
+ display: CardInnerAppearance;
782
+ status: CardType;
783
+ dwellTime: number;
784
+ dwellPercentVisible: number;
785
+ };
786
+
787
+ // @public (undocumented)
788
+ type UiIframeFocusedEventProps = CommonEventProps & {
789
+ id: string;
790
+ display: CardInnerAppearance;
791
+ status: CardType;
792
+ };
793
+
778
794
  // @public (undocumented)
779
795
  type UiRenderFailedEventProps = CommonEventProps & {
780
796
  display: CardInnerAppearance;
@@ -797,6 +813,8 @@ export const useSmartLinkAnalytics: (url: string, dispatchAnalytics: AnalyticsHa
797
813
  actionSubjectId: Required<string>;
798
814
  }) => void;
799
815
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
816
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
817
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
800
818
  actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
801
819
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
802
820
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;