@atlaskit/smart-card 26.23.2 → 26.25.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 (134) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/constants.js +1 -0
  3. package/dist/cjs/extractors/block/index.js +1 -1
  4. package/dist/cjs/extractors/common/actions/extractActions.js +3 -31
  5. package/dist/cjs/extractors/flexible/actions/extract-follow-action.js +53 -0
  6. package/dist/cjs/extractors/flexible/index.js +3 -0
  7. package/dist/cjs/messages.js +10 -0
  8. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +7 -15
  9. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +20 -14
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -0
  12. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -45
  13. package/dist/cjs/view/BlockCard/views/flexible/styled.js +2 -2
  14. package/dist/cjs/view/EmbedCard/components/styled.js +2 -2
  15. package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +33 -1
  16. package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +41 -15
  17. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -4
  18. package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +33 -1
  19. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +43 -0
  20. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +40 -0
  21. package/dist/cjs/view/FlexibleCard/components/actions/index.js +10 -1
  22. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +2 -19
  23. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +8 -1
  24. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +22 -1
  25. package/dist/cjs/view/FlexibleCard/components/utils.js +9 -20
  26. package/dist/cjs/view/FlexibleCard/index.js +14 -1
  27. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -0
  28. package/dist/cjs/view/HoverCard/styled.js +2 -2
  29. package/dist/cjs/view/LinkUrl/index.js +1 -1
  30. package/dist/cjs/view/RedesignedInlineCard/Frame/styled.js +1 -1
  31. package/dist/cjs/view/RedesignedInlineCard/styled.js +1 -1
  32. package/dist/es2019/constants.js +1 -0
  33. package/dist/es2019/extractors/block/index.js +2 -2
  34. package/dist/es2019/extractors/common/actions/extractActions.js +2 -23
  35. package/dist/es2019/extractors/flexible/actions/extract-follow-action.js +45 -0
  36. package/dist/es2019/extractors/flexible/index.js +3 -0
  37. package/dist/es2019/messages.js +10 -0
  38. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -15
  39. package/dist/es2019/state/hooks/use-invoke-client-action/index.js +14 -8
  40. package/dist/es2019/utils/analytics/analytics.js +1 -1
  41. package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -0
  42. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +4 -42
  43. package/dist/es2019/view/BlockCard/views/flexible/styled.js +10 -1
  44. package/dist/es2019/view/EmbedCard/components/styled.js +2 -2
  45. package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +15 -1
  46. package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +18 -7
  47. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +1 -1
  48. package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +15 -1
  49. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +31 -0
  50. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +28 -0
  51. package/dist/es2019/view/FlexibleCard/components/actions/index.js +3 -0
  52. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +2 -17
  53. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +9 -2
  54. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +19 -1
  55. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -17
  56. package/dist/es2019/view/FlexibleCard/index.js +11 -1
  57. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -0
  58. package/dist/es2019/view/HoverCard/styled.js +3 -3
  59. package/dist/es2019/view/LinkUrl/index.js +1 -1
  60. package/dist/es2019/view/RedesignedInlineCard/Frame/styled.js +1 -1
  61. package/dist/es2019/view/RedesignedInlineCard/styled.js +1 -1
  62. package/dist/esm/constants.js +1 -0
  63. package/dist/esm/extractors/block/index.js +2 -2
  64. package/dist/esm/extractors/common/actions/extractActions.js +2 -30
  65. package/dist/esm/extractors/flexible/actions/extract-follow-action.js +45 -0
  66. package/dist/esm/extractors/flexible/index.js +3 -0
  67. package/dist/esm/messages.js +10 -0
  68. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +7 -15
  69. package/dist/esm/state/hooks/use-invoke-client-action/index.js +20 -14
  70. package/dist/esm/utils/analytics/analytics.js +1 -1
  71. package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -0
  72. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +4 -46
  73. package/dist/esm/view/BlockCard/views/flexible/styled.js +2 -2
  74. package/dist/esm/view/EmbedCard/components/styled.js +2 -2
  75. package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +33 -1
  76. package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +41 -15
  77. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -4
  78. package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +33 -1
  79. package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +32 -0
  80. package/dist/esm/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +32 -0
  81. package/dist/esm/view/FlexibleCard/components/actions/index.js +3 -0
  82. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +2 -19
  83. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +9 -2
  84. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +21 -1
  85. package/dist/esm/view/FlexibleCard/components/utils.js +9 -20
  86. package/dist/esm/view/FlexibleCard/index.js +14 -1
  87. package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -0
  88. package/dist/esm/view/HoverCard/styled.js +2 -2
  89. package/dist/esm/view/LinkUrl/index.js +1 -1
  90. package/dist/esm/view/RedesignedInlineCard/Frame/styled.js +1 -1
  91. package/dist/esm/view/RedesignedInlineCard/styled.js +1 -1
  92. package/dist/types/__fixtures__/atlas-project.d.ts +68 -0
  93. package/dist/types/constants.d.ts +1 -0
  94. package/dist/types/extractors/common/__mocks__/jsonld.d.ts +3 -1
  95. package/dist/types/extractors/common/actions/extractActions.d.ts +1 -1
  96. package/dist/types/extractors/flexible/actions/extract-follow-action.d.ts +5 -0
  97. package/dist/types/messages.d.ts +1 -1
  98. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -4
  99. package/dist/types/state/flexible-ui-context/index.d.ts +3 -119
  100. package/dist/types/state/flexible-ui-context/types.d.ts +17 -0
  101. package/dist/types/state/hooks/useSmartLink.d.ts +3 -3
  102. package/dist/types/utils/analytics/types.d.ts +3 -3
  103. package/dist/types/utils/mocks.d.ts +3 -3
  104. package/dist/types/view/Card/index.d.ts +1 -1
  105. package/dist/types/view/FlexibleCard/components/actions/follow-action/index.d.ts +4 -0
  106. package/dist/types/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.d.ts +4 -0
  107. package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
  108. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -1
  109. package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +3 -1
  110. package/dist/types/view/FlexibleCard/components/utils.d.ts +2 -63
  111. package/dist/types/view/FlexibleCard/types.d.ts +2 -3
  112. package/dist/types-ts4.5/__fixtures__/atlas-project.d.ts +68 -0
  113. package/dist/types-ts4.5/constants.d.ts +1 -0
  114. package/dist/types-ts4.5/extractors/common/__mocks__/jsonld.d.ts +3 -1
  115. package/dist/types-ts4.5/extractors/common/actions/extractActions.d.ts +1 -1
  116. package/dist/types-ts4.5/extractors/flexible/actions/extract-follow-action.d.ts +5 -0
  117. package/dist/types-ts4.5/messages.d.ts +1 -1
  118. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +4 -4
  119. package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +3 -119
  120. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +17 -0
  121. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +3 -3
  122. package/dist/types-ts4.5/utils/analytics/types.d.ts +3 -3
  123. package/dist/types-ts4.5/utils/mocks.d.ts +3 -3
  124. package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
  125. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/index.d.ts +4 -0
  126. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.d.ts +4 -0
  127. package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
  128. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -1
  129. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/utils.d.ts +3 -1
  130. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +2 -63
  131. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +2 -3
  132. package/package.json +2 -2
  133. package/report.api.md +9 -6
  134. package/tmp/api-report-tmp.d.ts +9 -7
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FlexibleUiDataContext } from './types';
2
+ import type { FlexibleAnalyticsContextType, FlexibleUiDataContext } from './types';
3
3
  import { FlexibleUiOptions } from '../../view/FlexibleCard/types';
4
4
  /**
5
5
  * This provides the data that will be used by Smart Links Flexible UI to populate it's
@@ -11,124 +11,8 @@ export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefin
11
11
  * This provides the data that will be used by Smart Links Flexible UI to populate it's
12
12
  * underlying elements.
13
13
  */
14
- export declare const FlexibleUiAnalyticsContext: import("react").Context<{
15
- ui: {
16
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthEventProps) => void;
17
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthAlternateAccountEventProps) => void;
18
- buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
19
- actionSubjectId: string;
20
- }) => void;
21
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
22
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
23
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
24
- actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
25
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
26
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
27
- modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
28
- actionSubjectId: string;
29
- }) => void;
30
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
31
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
32
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
33
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
34
- learnMoreClickedEvent: () => void;
35
- smartLinkLozengeActionClickedEvent: () => void;
36
- smartLinkLozengeActionListItemClickedEvent: () => void;
37
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
38
- };
39
- operational: {
40
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
41
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
42
- connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
43
- connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
44
- instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
45
- chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
46
- };
47
- track: {
48
- appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
49
- appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
50
- linkUpdated: (props: import("../../utils/analytics/types").CommonEventProps & {
51
- [key: string]: any;
52
- }) => void;
53
- smartLinkQuickActionStarted: (props: {
54
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
55
- }) => void;
56
- smartLinkQuickActionSuccess: (props: {
57
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
58
- }) => void;
59
- smartLinkQuickActionFailed: (props: {
60
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
61
- reason?: import("../../utils/analytics/analytics").TrackQuickActionFailureReason | undefined;
62
- step?: string | undefined;
63
- }) => void;
64
- hoverCardResolutionStarted: () => void;
65
- };
66
- screen: {
67
- authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
68
- modalViewedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
69
- name: "embedPreviewModal";
70
- }) => void;
71
- };
72
- } | undefined>;
73
- export declare const useFlexibleUiAnalyticsContext: () => {
74
- ui: {
75
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthEventProps) => void;
76
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthAlternateAccountEventProps) => void;
77
- buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
78
- actionSubjectId: string;
79
- }) => void;
80
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
81
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
82
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
83
- actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
84
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
85
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
86
- modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
87
- actionSubjectId: string;
88
- }) => void;
89
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
90
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
91
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
92
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
93
- learnMoreClickedEvent: () => void;
94
- smartLinkLozengeActionClickedEvent: () => void;
95
- smartLinkLozengeActionListItemClickedEvent: () => void;
96
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
97
- };
98
- operational: {
99
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
100
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
101
- connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
102
- connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
103
- instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
104
- chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
105
- };
106
- track: {
107
- appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
108
- appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
109
- linkUpdated: (props: import("../../utils/analytics/types").CommonEventProps & {
110
- [key: string]: any;
111
- }) => void;
112
- smartLinkQuickActionStarted: (props: {
113
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
114
- }) => void;
115
- smartLinkQuickActionSuccess: (props: {
116
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
117
- }) => void;
118
- smartLinkQuickActionFailed: (props: {
119
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
120
- reason?: import("../../utils/analytics/analytics").TrackQuickActionFailureReason | undefined;
121
- step?: string | undefined;
122
- }) => void;
123
- hoverCardResolutionStarted: () => void;
124
- };
125
- screen: {
126
- authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
127
- modalViewedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
128
- name: "embedPreviewModal";
129
- }) => void;
130
- };
131
- } | undefined;
14
+ export declare const FlexibleUiAnalyticsContext: import("react").Context<FlexibleAnalyticsContextType | undefined>;
15
+ export declare const useFlexibleUiAnalyticsContext: () => FlexibleAnalyticsContextType | undefined;
132
16
  /**
133
17
  * This provides the ui options that will be used by Smart Links Flexible UI
134
18
  * to render its underlying elements.
@@ -1,6 +1,9 @@
1
1
  import { LinkLozenge } from '../../extractors/common/lozenge/types';
2
2
  import { LinkPerson } from '@atlaskit/link-extractors';
3
3
  import { IconType, MediaType } from '../../constants';
4
+ import { InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
5
+ import type { CardInnerAppearance } from '../../view/Card/types';
6
+ import type { AnalyticsFacade } from '../analytics';
4
7
  /**
5
8
  * This provides the data that will be used by Smart Links Flexible UI to populate it's
6
9
  * underlying elements.
@@ -45,6 +48,12 @@ export type FlexibleUiDataContext = {
45
48
  * @see DueOn
46
49
  */
47
50
  dueOn?: string;
51
+ /**
52
+ * Contains data needed to perform follow action.
53
+ * @type PreviewActionData
54
+ * @see FollowAction
55
+ */
56
+ followAction?: ServerActionProp<boolean>;
48
57
  /**
49
58
  * Contains the number of views of the linked resource.
50
59
  * @type number
@@ -254,3 +263,11 @@ export type ViewActionData = {
254
263
  export type DownloadActionData = {
255
264
  downloadUrl?: string;
256
265
  };
266
+ export type FlexibleAnalyticsContextType = AnalyticsFacade & {
267
+ display?: CardInnerAppearance;
268
+ extensionKey?: string;
269
+ };
270
+ export type ServerActionProp<TValue> = {
271
+ action: InvokeRequestWithCardDetails;
272
+ value?: TValue;
273
+ };
@@ -24,7 +24,7 @@ dispatchAnalytics?: AnalyticsHandler): {
24
24
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
25
25
  iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
26
26
  iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
27
- actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
27
+ actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
28
28
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
29
29
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
30
30
  modalClosedEvent: (data: Partial<import("../../utils/types").AnalyticsPayload> & {
@@ -40,8 +40,8 @@ dispatchAnalytics?: AnalyticsHandler): {
40
40
  smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
41
41
  };
42
42
  operational: {
43
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
44
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
43
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
44
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
45
45
  connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
46
46
  connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
47
47
  instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
@@ -25,12 +25,12 @@ export type UnresolvedEventProps = CommonEventProps & {
25
25
  error?: APIError;
26
26
  };
27
27
  export type InvokeSucceededEventProps = CommonEventProps & {
28
- id: string;
28
+ id?: string;
29
29
  actionType: string;
30
30
  display?: CardInnerAppearance;
31
31
  };
32
32
  export type InvokeFailedEventProps = CommonEventProps & {
33
- id: string;
33
+ id?: string;
34
34
  actionType: string;
35
35
  display?: CardInnerAppearance;
36
36
  reason: string;
@@ -69,7 +69,7 @@ export type UiIframeFocusedEventProps = CommonEventProps & {
69
69
  status: CardType;
70
70
  };
71
71
  export type UiActionClickedEventProps = CommonEventProps & {
72
- id: string;
72
+ id?: string;
73
73
  display?: CardInnerAppearance;
74
74
  actionType: string;
75
75
  invokeType?: InvokeType;
@@ -49,7 +49,7 @@ export declare const mockAnalytics: {
49
49
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
50
50
  iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("./analytics/types").UiIframeDwelledEventProps) => void;
51
51
  iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("./analytics/types").UiIframeFocusedEventProps) => void;
52
- actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
52
+ actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
53
53
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
54
54
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
55
55
  modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
@@ -65,8 +65,8 @@ export declare const mockAnalytics: {
65
65
  smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
66
66
  };
67
67
  operational: {
68
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
69
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
68
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
69
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
70
70
  connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").ConnectSucceededEventProps) => void;
71
71
  connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").ConnectFailedEventProps) => void;
72
72
  instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("./analytics/types").InstrumentEventProps) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { CardAppearance, CardPlatform, CardProps } from './types';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
- export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "showActions" | "showHoverPreview" | "showServerActions" | "showAuthTooltip" | "onResolve" | "ui" | "platform" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "fallbackComponent" | "embedIframeUrlType" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
4
+ export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "showServerActions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isFrameVisible" | "frameStyle" | "importer" | "container" | "showActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
5
5
  export type { CardAppearance, CardProps, CardPlatform };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ActionProps } from '../action/types';
3
+ declare const FollowAction: React.FC<ActionProps>;
4
+ export default FollowAction;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { type IconProps } from '@atlaskit/icon';
3
+ declare const UnfollowIcon: (props: IconProps) => JSX.Element;
4
+ export default UnfollowIcon;
@@ -3,6 +3,7 @@ import { ActionProps } from './action/types';
3
3
  import { PreviewActionProps } from './action/preview-action/types';
4
4
  import { ViewActionProps } from './action/view-action/types';
5
5
  import { DownloadActionProps } from './action/download-action/types';
6
+ export { default as FollowAction } from './follow-action';
6
7
  /**
7
8
  * Creates a DeleteAction component. Accepts default ActionProps, but defaults
8
9
  * the icon to a cross icon.
@@ -145,7 +145,7 @@ export type BaseDataActionItem = {
145
145
  * renders a preview modal when clicked.
146
146
  */
147
147
  export type NamedDataActionItem = BaseDataActionItem & {
148
- name: ActionName.PreviewAction | ActionName.DownloadAction | ActionName.ViewAction;
148
+ name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.ViewAction;
149
149
  };
150
150
  /**
151
151
  * This represents an action that does not fetch data where Icon and Content are provided implicitly.
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
2
  import { SerializedStyles } from '@emotion/react';
3
- import { ElementItem } from './types';
3
+ import { ActionItem, ElementItem } from './types';
4
4
  import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../constants';
5
+ import type { FlexibleUiDataContext } from '../../../../state/flexible-ui-context/types';
5
6
  export type ElementDisplaySchemaType = 'inline' | 'block';
6
7
  export declare const ElementDisplaySchema: Record<ElementName, ElementDisplaySchemaType[]>;
7
8
  export declare const getGapSize: (size: SmartLinkSize) => number;
8
9
  export declare const getBaseStyles: (direction: SmartLinkDirection, size: SmartLinkSize) => SerializedStyles;
9
10
  export declare const highlightRemoveStyles: SerializedStyles;
10
11
  export declare const isJSXElementNull: (children: JSX.Element) => boolean;
12
+ export declare const filterActionItems: (items?: ActionItem[], context?: FlexibleUiDataContext) => ActionItem[];
11
13
  export declare const renderChildren: (children: React.ReactNode, size: SmartLinkSize) => React.ReactNode;
12
14
  export declare const renderElementItems: (items?: ElementItem[], display?: ElementDisplaySchemaType) => React.ReactNode | undefined;
@@ -3,9 +3,9 @@ import { SerializedStyles } from '@emotion/react';
3
3
  import { Spacing } from '@atlaskit/button';
4
4
  import { SmartLinkSize } from '../../../constants';
5
5
  import { MessageProps } from './types';
6
- import { AnalyticsFacade } from '../../../state/analytics';
7
6
  import { PreviewActionData } from '../../../state/flexible-ui-context/types';
8
7
  import { IntlShape, MessageDescriptor } from 'react-intl-next';
8
+ import { EmbedModalProps } from '../../EmbedModal/types';
9
9
  export declare const sizeToButtonSpacing: Record<SmartLinkSize, Spacing>;
10
10
  export declare const getFormattedMessage: (message?: MessageProps) => JSX.Element | undefined;
11
11
  export declare const getFormattedMessageAsString: (intl: IntlShape, message: MessageDescriptor, context?: string) => string;
@@ -17,65 +17,4 @@ export declare const getMaxLineHeight: (size: SmartLinkSize) => 1.5 | 1.75;
17
17
  export declare const getMaxLines: (value: number, defaultValue: number, max: number, min: number) => number;
18
18
  export declare const getTruncateStyles: (maxLines: number, lineHeight?: string, wordBreak?: 'break-word' | 'break-all') => SerializedStyles;
19
19
  export declare const hasWhiteSpace: (str: string) => boolean;
20
- export declare const openEmbedModalWithFlexibleUiIcon: ({ analytics, downloadUrl, linkIcon, onClose, providerName, src, title, url, isSupportTheming, }: PreviewActionData & {
21
- analytics?: {
22
- ui: {
23
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiAuthEventProps) => void;
24
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiAuthAlternateAccountEventProps) => void;
25
- buttonClickedEvent: (data: Partial<import("../../..").AnalyticsPayload> & {
26
- actionSubjectId: string;
27
- }) => void;
28
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../../utils/analytics/types").UiCardClickedEventProps) => void;
29
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../../utils/analytics/types").UiIframeDwelledEventProps) => void;
30
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../../utils/analytics/types").UiIframeFocusedEventProps) => void;
31
- actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiActionClickedEventProps) => void;
32
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
33
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiClosedAuthEventProps) => void;
34
- modalClosedEvent: (data: Partial<import("../../..").AnalyticsPayload> & {
35
- actionSubjectId: string;
36
- }) => void;
37
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiRenderSuccessEventProps) => void;
38
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiRenderFailedEventProps) => void;
39
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
40
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
41
- learnMoreClickedEvent: () => void;
42
- smartLinkLozengeActionClickedEvent: () => void;
43
- smartLinkLozengeActionListItemClickedEvent: () => void;
44
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
45
- };
46
- operational: {
47
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").InvokeSucceededEventProps) => void;
48
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").InvokeFailedEventProps) => void;
49
- connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").ConnectSucceededEventProps) => void;
50
- connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").ConnectFailedEventProps) => void;
51
- instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../../utils/analytics/types").InstrumentEventProps) => void;
52
- chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiRenderFailedEventProps) => void;
53
- };
54
- track: {
55
- appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").CommonEventProps) => void;
56
- appAccountAuthStarted: ({ extensionKey, location, }: import("../../../utils/analytics/types").CommonEventProps) => void;
57
- linkUpdated: (props: import("../../../utils/analytics/types").CommonEventProps & {
58
- [key: string]: any;
59
- }) => void;
60
- smartLinkQuickActionStarted: (props: {
61
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../../utils/analytics/analytics").TrackQuickActionType;
62
- }) => void;
63
- smartLinkQuickActionSuccess: (props: {
64
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../../utils/analytics/analytics").TrackQuickActionType;
65
- }) => void;
66
- smartLinkQuickActionFailed: (props: {
67
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../../utils/analytics/analytics").TrackQuickActionType;
68
- reason?: import("../../../utils/analytics/analytics").TrackQuickActionFailureReason | undefined;
69
- step?: string | undefined;
70
- }) => void;
71
- hoverCardResolutionStarted: () => void;
72
- };
73
- screen: {
74
- authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").CommonEventProps) => void;
75
- modalViewedEvent: (data: Partial<import("../../..").AnalyticsPayload> & {
76
- name: "embedPreviewModal";
77
- }) => void;
78
- };
79
- } | undefined;
80
- onClose?: (() => void) | undefined;
81
- }) => Promise<void>;
20
+ export declare const openEmbedModalWithFlexibleUiIcon: ({ linkIcon, ...props }: Partial<EmbedModalProps> & Pick<PreviewActionData, 'linkIcon'>) => Promise<void>;
@@ -4,8 +4,7 @@ import type { JsonLd } from 'json-ld-types';
4
4
  import { CardState, LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
5
5
  import { CardProviderRenderers } from '@atlaskit/link-provider';
6
6
  import { SmartLinkSize, SmartLinkStatus, SmartLinkTheme } from '../../constants';
7
- import { CardAppearance } from '../../view/Card';
8
- import { OnResolveCallback } from '../Card/types';
7
+ import { CardInnerAppearance, OnResolveCallback } from '../Card/types';
9
8
  import { OnErrorCallback } from '../types';
10
9
  import { AnalyticsFacade } from '../../state/analytics';
11
10
  export type FlexibleCardProps = {
@@ -22,7 +21,7 @@ export type FlexibleCardProps = {
22
21
  * Determines the appearance of the Smart Link.
23
22
  * @internal
24
23
  */
25
- appearance?: CardAppearance;
24
+ appearance?: CardInnerAppearance;
26
25
  /**
27
26
  * Determines the status and data of the Smart Link.
28
27
  * @internal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.23.2",
3
+ "version": "26.25.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/analytics-listeners": "^8.7.0",
76
76
  "@atlaskit/avatar": "^21.3.0",
77
77
  "@atlaskit/css-reset": "^6.5.0",
78
- "@atlaskit/link-test-helpers": "^6.0.0",
78
+ "@atlaskit/link-test-helpers": "^6.1.0",
79
79
  "@atlaskit/lozenge": "^11.4.0",
80
80
  "@atlaskit/media-test-helpers": "^33.0.0",
81
81
  "@atlaskit/visual-regression": "*",
package/report.api.md CHANGED
@@ -67,6 +67,8 @@ export enum ActionName {
67
67
  // (undocumented)
68
68
  EditAction = 'EditAction',
69
69
  // (undocumented)
70
+ FollowAction = 'FollowAction',
71
+ // (undocumented)
70
72
  PreviewAction = 'PreviewAction',
71
73
  // (undocumented)
72
74
  ViewAction = 'ViewAction',
@@ -635,7 +637,7 @@ type InstrumentEventProps = CommonEventProps & {
635
637
 
636
638
  // @public (undocumented)
637
639
  type InvokeFailedEventProps = CommonEventProps & {
638
- id: string;
640
+ id?: string;
639
641
  actionType: string;
640
642
  display?: CardInnerAppearance;
641
643
  reason: string;
@@ -643,7 +645,7 @@ type InvokeFailedEventProps = CommonEventProps & {
643
645
 
644
646
  // @public (undocumented)
645
647
  type InvokeSucceededEventProps = CommonEventProps & {
646
- id: string;
648
+ id?: string;
647
649
  actionType: string;
648
650
  display?: CardInnerAppearance;
649
651
  };
@@ -710,6 +712,7 @@ type NamedActionItem = BaseActionItem & {
710
712
  type NamedDataActionItem = BaseDataActionItem & {
711
713
  name:
712
714
  | ActionName.DownloadAction
715
+ | ActionName.FollowAction
713
716
  | ActionName.PreviewAction
714
717
  | ActionName.ViewAction;
715
718
  };
@@ -983,7 +986,7 @@ enum TrackQuickActionType {
983
986
 
984
987
  // @public (undocumented)
985
988
  type UiActionClickedEventProps = CommonEventProps & {
986
- id: string;
989
+ id?: string;
987
990
  display?: CardInnerAppearance;
988
991
  actionType: string;
989
992
  invokeType?: InvokeType;
@@ -1129,7 +1132,7 @@ export const useSmartLinkAnalytics: (
1129
1132
  destinationSubproduct,
1130
1133
  }: UiIframeFocusedEventProps) => void;
1131
1134
  actionClickedEvent: ({
1132
- id: experienceId,
1135
+ id,
1133
1136
  actionType,
1134
1137
  display,
1135
1138
  invokeType,
@@ -1218,7 +1221,7 @@ export const useSmartLinkAnalytics: (
1218
1221
  };
1219
1222
  operational: {
1220
1223
  invokeSucceededEvent: ({
1221
- id: experienceId,
1224
+ id,
1222
1225
  actionType,
1223
1226
  display,
1224
1227
  extensionKey,
@@ -1229,7 +1232,7 @@ export const useSmartLinkAnalytics: (
1229
1232
  location,
1230
1233
  }: InvokeSucceededEventProps) => void;
1231
1234
  invokeFailedEvent: ({
1232
- id: experienceId,
1235
+ id,
1233
1236
  actionType,
1234
1237
  display,
1235
1238
  reason,
@@ -53,6 +53,8 @@ export enum ActionName {
53
53
  // (undocumented)
54
54
  EditAction = "EditAction",
55
55
  // (undocumented)
56
+ FollowAction = "FollowAction",
57
+ // (undocumented)
56
58
  PreviewAction = "PreviewAction",
57
59
  // (undocumented)
58
60
  ViewAction = "ViewAction"
@@ -490,7 +492,7 @@ type InstrumentEventProps = CommonEventProps & {
490
492
 
491
493
  // @public (undocumented)
492
494
  type InvokeFailedEventProps = CommonEventProps & {
493
- id: string;
495
+ id?: string;
494
496
  actionType: string;
495
497
  display?: CardInnerAppearance;
496
498
  reason: string;
@@ -498,7 +500,7 @@ type InvokeFailedEventProps = CommonEventProps & {
498
500
 
499
501
  // @public (undocumented)
500
502
  type InvokeSucceededEventProps = CommonEventProps & {
501
- id: string;
503
+ id?: string;
502
504
  actionType: string;
503
505
  display?: CardInnerAppearance;
504
506
  };
@@ -563,7 +565,7 @@ type NamedActionItem = BaseActionItem & {
563
565
 
564
566
  // @public
565
567
  type NamedDataActionItem = BaseDataActionItem & {
566
- name: ActionName.DownloadAction | ActionName.PreviewAction | ActionName.ViewAction;
568
+ name: ActionName.DownloadAction | ActionName.FollowAction | ActionName.PreviewAction | ActionName.ViewAction;
567
569
  };
568
570
 
569
571
  // @public (undocumented)
@@ -832,7 +834,7 @@ enum TrackQuickActionType {
832
834
 
833
835
  // @public (undocumented)
834
836
  type UiActionClickedEventProps = CommonEventProps & {
835
- id: string;
837
+ id?: string;
836
838
  display?: CardInnerAppearance;
837
839
  actionType: string;
838
840
  invokeType?: InvokeType;
@@ -923,7 +925,7 @@ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: Analytics
923
925
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
924
926
  iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
925
927
  iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
926
- actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
928
+ actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
927
929
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
928
930
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
929
931
  modalClosedEvent: (data: Partial<AnalyticsPayload> & {
@@ -939,8 +941,8 @@ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: Analytics
939
941
  smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
940
942
  };
941
943
  operational: {
942
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
943
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
944
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
945
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
944
946
  connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
945
947
  connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
946
948
  instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;