@atlaskit/smart-card 32.7.7 → 32.7.8

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 (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/state/actions/index.js +13 -38
  3. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +54 -305
  4. package/dist/cjs/utils/analytics/analytics.js +27 -301
  5. package/dist/cjs/utils/analytics/index.js +0 -66
  6. package/dist/cjs/view/CardWithUrl/component.js +7 -22
  7. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  8. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  9. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  10. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +21 -53
  11. package/dist/cjs/view/LinkUrl/index.js +1 -1
  12. package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -9
  13. package/dist/es2019/state/actions/index.js +13 -38
  14. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -238
  15. package/dist/es2019/utils/analytics/analytics.js +2 -286
  16. package/dist/es2019/utils/analytics/index.js +1 -1
  17. package/dist/es2019/view/CardWithUrl/component.js +8 -23
  18. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  19. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  20. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  21. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +21 -53
  22. package/dist/es2019/view/LinkUrl/index.js +1 -1
  23. package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
  24. package/dist/esm/state/actions/index.js +13 -38
  25. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +55 -306
  26. package/dist/esm/utils/analytics/analytics.js +26 -300
  27. package/dist/esm/utils/analytics/index.js +1 -1
  28. package/dist/esm/view/CardWithUrl/component.js +8 -23
  29. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  30. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  31. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  32. package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -53
  33. package/dist/esm/view/LinkUrl/index.js +1 -1
  34. package/dist/esm/view/common/UnauthorisedViewContent.js +3 -9
  35. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
  36. package/dist/types/state/hooks/useSmartLink.d.ts +0 -12
  37. package/dist/types/utils/analytics/analytics.d.ts +1 -51
  38. package/dist/types/utils/analytics/index.d.ts +1 -1
  39. package/dist/types/utils/analytics/types.d.ts +0 -60
  40. package/dist/types/utils/mocks.d.ts +0 -12
  41. package/dist/types/view/common/UnauthorisedViewContent.d.ts +1 -1
  42. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
  43. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -12
  44. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -51
  45. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  46. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -60
  47. package/dist/types-ts4.5/utils/mocks.d.ts +0 -12
  48. package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +1 -1
  49. package/package.json +2 -5
@@ -1,4 +1,4 @@
1
- import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps } from '../../utils/analytics/types';
1
+ import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps } from '../../utils/analytics/types';
2
2
  import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
3
3
  /**
4
4
  * This hook provides usage of Smart Link analytics outside of the Card component.
@@ -11,26 +11,6 @@ import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
11
11
  */
12
12
  export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLocation?: string) => {
13
13
  ui: {
14
- /**
15
- * This fires an event that represents when a user clicks on the authentication
16
- * call to action with no current authenticated account. (i.e. Connect to Preview).
17
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
18
- * @param definitionId The definitionId of the Smart Link resolver invoked.
19
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
20
- * @returns
21
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
22
- */
23
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
24
- /**
25
- * This fires an event that represents when a user clicks on the authentication
26
- * call to action with a forbidden authenticated account. (i.e. Try another account).
27
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
28
- * @param definitionId The definitionId of the Smart Link resolver invoked.
29
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
30
- * @returns
31
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
32
- */
33
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
34
14
  /**
35
15
  * This fires an event that represents when a user
36
16
  * click a button.
@@ -39,20 +19,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
39
19
  buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
40
20
  actionSubjectId: Required<string>;
41
21
  }) => void;
42
- /**
43
- * This fires an event that represents when a user clicks on a Smart Link.
44
- * @param id The unique ID for this Smart Link.
45
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
46
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
47
- * @param definitionId The definitionId of the Smart Link resolver invoked.
48
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
49
- * @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
50
- * @param location Where the Smart Link is currently rendered.
51
- * @param destinationProduct The product the Smart Link is linked to.
52
- * @returns
53
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
54
- */
55
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
56
22
  /**
57
23
  * This fires an event that represents when a user clicks on a Smart Link action.
58
24
  * Note: This also starts the UFO smart-link-action-invocation experience.
@@ -63,25 +29,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
63
29
  * @returns
64
30
  */
65
31
  actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
66
- /**
67
- * This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
68
- * https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
69
- * @param previewDisplay What format the preview is in.
70
- * @param definitionId The definitionId of the Smart Link resolver invoked.
71
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
72
- * @param previewInvokeMethod How the preview was triggered.
73
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
74
- */
75
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
76
- /**
77
- * This fires an event that represents when a user closed the authentication window without authenticating after opening it.
78
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
79
- * @param definitionId The definitionId of the Smart Link resolver invoked.
80
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
81
- * @returns
82
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
83
- */
84
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
85
32
  /**
86
33
  * This fires an event that represents when a user close a modal.
87
34
  * @param data A partial analytics event payload
@@ -107,53 +54,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
107
54
  * @param errorInfo: Additional details about the error including the stack trace.
108
55
  */
109
56
  renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
110
- /**
111
- * This fires an event that represents a hover preview being opened.
112
- * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
113
- * @param definitionId The definitionId of the Smart Link resolver invoked.
114
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
115
- * @param previewInvokeMethod How the preview was triggered.
116
- * @returns
117
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
118
- */
119
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
120
- /**
121
- * This fires an event that represents a hover preview being dismissed.
122
- * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
123
- * @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
124
- * @param definitionId The definitionId of the Smart Link resolver invoked.
125
- * @param extensionKey The extensionKey of the Smart Link resolver invoked.
126
- * @param previewInvokeMethod How the preview was triggered.
127
- * @returns
128
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
129
- */
130
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
131
- /**
132
- * Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
133
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
134
- * @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
135
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
136
- */
137
- learnMoreClickedEvent: () => void;
138
- /**
139
- * Fires an event that represent a click was performed on a Status Lozenge
140
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
141
- */
142
- smartLinkLozengeActionClickedEvent: () => void;
143
- /**
144
- * Fires an event that represent a click was performed on a Status Lozenge's dropdown item
145
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
146
- */
147
- smartLinkLozengeActionListItemClickedEvent: () => void;
148
- /**
149
- * Fires an event that represent a click was performed on a Status Lozenge open preview button
150
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
151
- */
152
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
153
- /**
154
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
155
- */
156
- smartLinkServerActionClickedEvent: (props: UiServerActionClickedEventProps) => void;
157
57
  };
158
58
  operational: {
159
59
  /**
@@ -10,27 +10,15 @@ export declare function useSmartLink(id: string, url: string): {
10
10
  config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
11
11
  analytics: {
12
12
  ui: {
13
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthEventProps) => void;
14
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthAlternateAccountEventProps) => void;
15
13
  buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
16
14
  actionSubjectId: string;
17
15
  }) => void;
18
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
19
16
  actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
20
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
21
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
22
17
  modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
23
18
  actionSubjectId: string;
24
19
  }) => void;
25
20
  renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
26
21
  renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
27
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
28
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
29
- learnMoreClickedEvent: () => void;
30
- smartLinkLozengeActionClickedEvent: () => void;
31
- smartLinkLozengeActionListItemClickedEvent: () => void;
32
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
33
- smartLinkServerActionClickedEvent: (props: import("../../utils/analytics/types").UiServerActionClickedEventProps) => void;
34
22
  };
35
23
  operational: {
36
24
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
@@ -1,7 +1,7 @@
1
1
  import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import { type CardInnerAppearance } from '../../view/Card/types';
3
3
  import { type AnalyticsPayload } from '../types';
4
- import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps } from './types';
4
+ import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps } from './types';
5
5
  export declare const ANALYTICS_CHANNEL = "media";
6
6
  export declare const context: {
7
7
  componentName: string;
@@ -16,62 +16,12 @@ export declare enum TrackQuickActionFailureReason {
16
16
  ValidationError = "ValidationError",
17
17
  UnknownError = "UnknownError"
18
18
  }
19
- export declare const SmartLinkActionTypeTrackingEventMapper: Record<string, string>;
20
- export declare const SmartLinkActionTypeUiEventMapper: Record<string, string>;
21
19
  export declare class SmartLinkEvents {
22
20
  insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
23
21
  }
24
22
  export declare const fireSmartLinkEvent: (payload: AnalyticsPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent) => void;
25
23
  export declare const invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => AnalyticsPayload;
26
24
  export declare const invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => AnalyticsPayload;
27
- /**
28
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
29
- */
30
- export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
31
- /**
32
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
33
- */
34
- export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
35
- /**
36
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
37
- */
38
- export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
39
25
  export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
40
- /**
41
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
42
- */
43
- export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => AnalyticsPayload;
44
26
  export declare const uiRenderSuccessEvent: ({ display, status, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, canBeDatasource, }: UiRenderSuccessEventProps) => AnalyticsPayload;
45
27
  export declare const uiRenderFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
46
- /**
47
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
48
- */
49
- export declare const uiHoverCardViewedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, status, }: UiHoverCardViewedEventProps) => AnalyticsPayload;
50
- /**
51
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
52
- */
53
- export declare const uiHoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, status, }: UiHoverCardDismissedEventProps) => AnalyticsPayload;
54
- /**
55
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
56
- */
57
- export declare const uiHoverCardOpenLinkClickedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => AnalyticsPayload;
58
- /**
59
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
60
- */
61
- export declare const uiLearnMoreLinkClickedEvent: () => AnalyticsPayload;
62
- /**
63
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
64
- */
65
- export declare const uiSmartLinkStatusLozengeButtonClicked: () => AnalyticsPayload;
66
- /**
67
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
68
- */
69
- export declare const uiSmartLinkStatusListItemButtonClicked: () => AnalyticsPayload;
70
- /**
71
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
72
- */
73
- export declare const uiSmartLinkStatusOpenPreviewButtonClicked: () => AnalyticsPayload;
74
- /**
75
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
76
- */
77
- export declare const uiServerActionClicked: ({ smartLinkActionType, }: UiServerActionClickedEventProps) => AnalyticsPayload;
@@ -1 +1 @@
1
- export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, invokeSucceededEvent, invokeFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
1
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, invokeSucceededEvent, invokeFailedEvent, uiActionClickedEvent, uiRenderSuccessEvent, uiRenderFailedEvent, } from './analytics';
@@ -1,9 +1,7 @@
1
1
  import { type ErrorInfo } from 'react';
2
2
  import { type APIError, type CardType } from '@atlaskit/linking-common';
3
- import { type SmartLinkActionType } from '@atlaskit/linking-types';
4
3
  import { type InvokeType } from '../../model/invoke-opts';
5
4
  import { type CardInnerAppearance } from '../../view/Card/types';
6
- import { type PreviewDisplay, type PreviewInvokeMethod } from '../../view/HoverCard/types';
7
5
  export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
8
6
  export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
9
7
  export interface CommonEventProps {
@@ -36,46 +34,12 @@ export type InvokeFailedEventProps = CommonEventProps & {
36
34
  display?: CardInnerAppearance;
37
35
  reason: string;
38
36
  };
39
- /**
40
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
41
- */
42
- export type UiAuthEventProps = CommonEventProps & {
43
- display: CardInnerAppearance;
44
- };
45
- /**
46
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
47
- */
48
- export type UiAuthAlternateAccountEventProps = CommonEventProps & {
49
- display: CardInnerAppearance;
50
- };
51
- /**
52
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
53
- */
54
- export type UiCardClickedEventProps = CommonEventProps & {
55
- id: string;
56
- display: CardInnerAppearance;
57
- status: CardType;
58
- isModifierKeyPressed?: boolean;
59
- actionSubjectId?: string;
60
- };
61
37
  export type UiActionClickedEventProps = CommonEventProps & {
62
38
  id?: string;
63
39
  display?: CardInnerAppearance;
64
40
  actionType: string;
65
41
  invokeType?: InvokeType;
66
42
  };
67
- /**
68
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
69
- */
70
- export type UiServerActionClickedEventProps = CommonEventProps & {
71
- smartLinkActionType: SmartLinkActionType;
72
- };
73
- /**
74
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
75
- */
76
- export type UiClosedAuthEventProps = CommonEventProps & {
77
- display: CardInnerAppearance;
78
- };
79
43
  export type UiRenderSuccessEventProps = CommonEventProps & {
80
44
  display: CardInnerAppearance;
81
45
  status: CardType;
@@ -86,30 +50,6 @@ export type UiRenderFailedEventProps = CommonEventProps & {
86
50
  error: Error;
87
51
  errorInfo: ErrorInfo;
88
52
  };
89
- /**
90
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
91
- */
92
- export type UiHoverCardViewedEventProps = CommonEventProps & {
93
- previewDisplay: PreviewDisplay;
94
- previewInvokeMethod?: PreviewInvokeMethod;
95
- status: CardType;
96
- };
97
- /**
98
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
99
- */
100
- export type UiHoverCardDismissedEventProps = CommonEventProps & {
101
- previewDisplay: PreviewDisplay;
102
- hoverTime: number;
103
- previewInvokeMethod?: PreviewInvokeMethod;
104
- status: CardType;
105
- };
106
- /**
107
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
108
- */
109
- export type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
110
- previewDisplay: PreviewDisplay;
111
- previewInvokeMethod?: PreviewInvokeMethod;
112
- };
113
53
  export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
114
54
  export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
115
55
  export type UiLinkClickedEventProps = {
@@ -91,27 +91,15 @@ export declare const fakeFactory: any;
91
91
  export declare const waitFor: (time?: number) => Promise<unknown>;
92
92
  export declare const mockAnalytics: {
93
93
  ui: {
94
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiAuthEventProps) => void;
95
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiAuthAlternateAccountEventProps) => void;
96
94
  buttonClickedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
97
95
  actionSubjectId: string;
98
96
  }) => void;
99
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
100
97
  actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
101
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
102
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
103
98
  modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
104
99
  actionSubjectId: string;
105
100
  }) => void;
106
101
  renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("./analytics/types").UiRenderSuccessEventProps) => void;
107
102
  renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
108
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("./analytics/types").UiHoverCardViewedEventProps) => void;
109
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("./analytics/types").UiHoverCardDismissedEventProps) => void;
110
- learnMoreClickedEvent: () => void;
111
- smartLinkLozengeActionClickedEvent: () => void;
112
- smartLinkLozengeActionListItemClickedEvent: () => void;
113
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
114
- smartLinkServerActionClickedEvent: (props: import("./analytics/types").UiServerActionClickedEventProps) => void;
115
103
  };
116
104
  operational: {
117
105
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
@@ -27,5 +27,5 @@ type UnauthorisedViewContentProps = {
27
27
  * This component is used in unauthorized views of a smart link.
28
28
  * It represents the main text that provides a user with information on how to connect their account
29
29
  */
30
- declare const UnauthorisedViewContent: ({ providerName, isProductIntegrationSupported, testId, analytics, }: UnauthorisedViewContentProps) => JSX.Element;
30
+ declare const UnauthorisedViewContent: ({ providerName, isProductIntegrationSupported, testId, }: UnauthorisedViewContentProps) => JSX.Element;
31
31
  export default UnauthorisedViewContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "32.7.7",
3
+ "version": "32.7.8",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/popup": "^1.30.0",
57
57
  "@atlaskit/primitives": "^13.3.0",
58
58
  "@atlaskit/section-message": "^6.8.0",
59
- "@atlaskit/select": "^18.8.0",
59
+ "@atlaskit/select": "^18.9.0",
60
60
  "@atlaskit/spinner": "^16.3.0",
61
61
  "@atlaskit/textarea": "^5.7.0",
62
62
  "@atlaskit/textfield": "^6.7.0",
@@ -165,9 +165,6 @@
165
165
  "send-smart-link-rendered-ufo-event-half-time": {
166
166
  "type": "boolean"
167
167
  },
168
- "platform_migrate-some-ui-events-smart-card": {
169
- "type": "boolean"
170
- },
171
168
  "platform-visual-refresh-icons": {
172
169
  "type": "boolean"
173
170
  },