@atlaskit/smart-card 32.5.0 → 32.6.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.
- package/CHANGELOG.md +26 -0
- package/analytics.spec.yaml +163 -0
- package/dist/cjs/state/actions/index.js +53 -49
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +14 -128
- package/dist/cjs/utils/analytics/analytics.js +150 -234
- package/dist/cjs/utils/analytics/index.js +1 -89
- package/dist/cjs/view/CardWithUrl/component.js +37 -40
- package/dist/cjs/view/CardWithUrl/loader.js +7 -16
- package/dist/cjs/view/EmbedCard/index.js +19 -44
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +64 -20
- package/dist/cjs/view/LinkUrl/index.js +12 -5
- package/dist/cjs/view/common/Metadata.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +10 -2
- package/dist/es2019/state/actions/index.js +53 -49
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +15 -136
- package/dist/es2019/utils/analytics/analytics.js +43 -133
- package/dist/es2019/utils/analytics/index.js +1 -61
- package/dist/es2019/view/CardWithUrl/component.js +37 -40
- package/dist/es2019/view/CardWithUrl/loader.js +7 -16
- package/dist/es2019/view/EmbedCard/index.js +20 -45
- package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +11 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +63 -20
- package/dist/es2019/view/LinkUrl/index.js +9 -3
- package/dist/es2019/view/common/Metadata.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +11 -2
- package/dist/esm/state/actions/index.js +53 -49
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +15 -129
- package/dist/esm/utils/analytics/analytics.js +149 -233
- package/dist/esm/utils/analytics/index.js +1 -59
- package/dist/esm/view/CardWithUrl/component.js +37 -40
- package/dist/esm/view/CardWithUrl/loader.js +7 -16
- package/dist/esm/view/EmbedCard/index.js +19 -44
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +65 -21
- package/dist/esm/view/LinkUrl/index.js +11 -4
- package/dist/esm/view/common/Metadata.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +10 -2
- package/dist/types/common/analytics/generated/analytics.types.d.ts +83 -1
- package/dist/types/state/analytics/useLinkClicked.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +15 -38
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -4
- package/dist/types/utils/analytics/analytics.d.ts +32 -16
- package/dist/types/utils/analytics/click.d.ts +3 -8
- package/dist/types/utils/analytics/index.d.ts +1 -7
- package/dist/types/utils/analytics/types.d.ts +22 -22
- package/dist/types/utils/mocks.d.ts +0 -4
- package/dist/types/view/LinkUrl/index.d.ts +4 -0
- package/dist/types/view/LinkUrl/types.d.ts +1 -0
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +83 -1
- package/dist/types-ts4.5/state/analytics/useLinkClicked.d.ts +1 -1
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +15 -38
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -4
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +32 -16
- package/dist/types-ts4.5/utils/analytics/click.d.ts +3 -8
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -7
- package/dist/types-ts4.5/utils/analytics/types.d.ts +22 -22
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -4
- package/dist/types-ts4.5/view/LinkUrl/index.d.ts +4 -0
- package/dist/types-ts4.5/view/LinkUrl/types.d.ts +1 -0
- package/package.json +14 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
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';
|
|
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.
|
|
@@ -18,6 +18,7 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
18
18
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
19
19
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
20
20
|
* @returns
|
|
21
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
21
22
|
*/
|
|
22
23
|
authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
|
|
23
24
|
/**
|
|
@@ -27,6 +28,7 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
27
28
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
28
29
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
29
30
|
* @returns
|
|
31
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
30
32
|
*/
|
|
31
33
|
authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
|
|
32
34
|
/**
|
|
@@ -48,6 +50,7 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
48
50
|
* @param location Where the Smart Link is currently rendered.
|
|
49
51
|
* @param destinationProduct The product the Smart Link is linked to.
|
|
50
52
|
* @returns
|
|
53
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
51
54
|
*/
|
|
52
55
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
|
|
53
56
|
/**
|
|
@@ -67,6 +70,7 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
67
70
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
68
71
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
69
72
|
* @param previewInvokeMethod How the preview was triggered.
|
|
73
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
70
74
|
*/
|
|
71
75
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
|
|
72
76
|
/**
|
|
@@ -75,6 +79,7 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
75
79
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
76
80
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
77
81
|
* @returns
|
|
82
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
78
83
|
*/
|
|
79
84
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
|
|
80
85
|
/**
|
|
@@ -109,6 +114,7 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
109
114
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
110
115
|
* @param previewInvokeMethod How the preview was triggered.
|
|
111
116
|
* @returns
|
|
117
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
112
118
|
*/
|
|
113
119
|
hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
|
|
114
120
|
/**
|
|
@@ -119,26 +125,34 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
119
125
|
* @param extensionKey The extensionKey of the Smart Link resolver invoked.
|
|
120
126
|
* @param previewInvokeMethod How the preview was triggered.
|
|
121
127
|
* @returns
|
|
128
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
122
129
|
*/
|
|
123
130
|
hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
|
|
124
131
|
/**
|
|
125
132
|
* Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
|
|
126
133
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
127
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
|
|
128
136
|
*/
|
|
129
137
|
learnMoreClickedEvent: () => void;
|
|
130
138
|
/**
|
|
131
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
|
|
132
141
|
*/
|
|
133
142
|
smartLinkLozengeActionClickedEvent: () => void;
|
|
134
143
|
/**
|
|
135
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
|
|
136
146
|
*/
|
|
137
147
|
smartLinkLozengeActionListItemClickedEvent: () => void;
|
|
138
148
|
/**
|
|
139
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
|
|
140
151
|
*/
|
|
141
152
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
153
|
+
/**
|
|
154
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
155
|
+
*/
|
|
142
156
|
smartLinkServerActionClickedEvent: (props: UiServerActionClickedEventProps) => void;
|
|
143
157
|
};
|
|
144
158
|
operational: {
|
|
@@ -159,43 +173,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
159
173
|
* @param reason The reason the invocation failed.
|
|
160
174
|
*/
|
|
161
175
|
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
162
|
-
/**
|
|
163
|
-
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
164
|
-
* @param id The unique ID for this Smart Link.
|
|
165
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
166
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
167
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
168
|
-
*/
|
|
169
|
-
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
|
|
170
|
-
/**
|
|
171
|
-
* This fires an event that represents an account unsuccessfully being connected.
|
|
172
|
-
* @param id The unique ID for this Smart Link.
|
|
173
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
174
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
175
|
-
* @param reason The reason why the Smart Link connect account failed.
|
|
176
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
177
|
-
*/
|
|
178
|
-
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
|
|
179
|
-
/**
|
|
180
|
-
* This fires an event which represents a Smart Link request succeeding or failing based on the status.
|
|
181
|
-
* @param id The unique ID for this Smart Link.
|
|
182
|
-
* @param status The status of the Smart Link.
|
|
183
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
184
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
185
|
-
* @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
|
|
186
|
-
* @param error An error representing why the Smart Link request failed.
|
|
187
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
188
|
-
*/
|
|
189
|
-
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
|
|
190
|
-
/**
|
|
191
|
-
* This fires an event that represents when a Smart Link renders unsuccessfully.
|
|
192
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
193
|
-
* @param id The unique ID for this Smart Link.
|
|
194
|
-
* @param error: An error representing why the Smart Link render failed.
|
|
195
|
-
* @param errorInfo: Additional details about the error including the stack trace.
|
|
196
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
197
|
-
*/
|
|
198
|
-
chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
|
|
199
176
|
};
|
|
200
177
|
screen: {
|
|
201
178
|
/**
|
|
@@ -35,10 +35,6 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
35
35
|
operational: {
|
|
36
36
|
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
37
37
|
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
38
|
-
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
39
|
-
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
40
|
-
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
|
|
41
|
-
chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
|
|
42
38
|
};
|
|
43
39
|
screen: {
|
|
44
40
|
modalViewedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
@@ -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
|
|
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';
|
|
5
5
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
6
6
|
export declare const context: {
|
|
7
7
|
componentName: string;
|
|
@@ -22,40 +22,56 @@ export declare class SmartLinkEvents {
|
|
|
22
22
|
insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
|
|
23
23
|
}
|
|
24
24
|
export declare const fireSmartLinkEvent: (payload: AnalyticsPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent) => void;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
27
|
-
*/
|
|
28
|
-
export declare const resolvedEvent: (props: ResolvedEventProps) => AnalyticsPayload;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
31
|
-
*/
|
|
32
|
-
export declare const unresolvedEvent: ({ id, definitionId, extensionKey, resourceType, destinationSubproduct, destinationProduct, error, status, location, }: UnresolvedEventProps) => AnalyticsPayload;
|
|
33
25
|
export declare const invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => AnalyticsPayload;
|
|
34
26
|
export declare const invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => AnalyticsPayload;
|
|
35
27
|
/**
|
|
36
|
-
* @deprecated
|
|
28
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
37
29
|
*/
|
|
38
|
-
export declare const
|
|
30
|
+
export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
|
|
39
31
|
/**
|
|
40
|
-
* @deprecated
|
|
32
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
41
33
|
*/
|
|
42
|
-
export declare const connectFailedEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, reason, }: ConnectFailedEventProps) => AnalyticsPayload;
|
|
43
|
-
export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
|
|
44
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
|
+
*/
|
|
45
38
|
export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
|
|
46
39
|
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
|
+
*/
|
|
47
43
|
export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => AnalyticsPayload;
|
|
48
44
|
export declare const uiRenderSuccessEvent: ({ display, status, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, canBeDatasource, }: UiRenderSuccessEventProps) => AnalyticsPayload;
|
|
49
45
|
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
|
+
*/
|
|
50
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
|
+
*/
|
|
51
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
|
+
*/
|
|
52
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
|
+
*/
|
|
53
61
|
export declare const uiLearnMoreLinkClickedEvent: () => AnalyticsPayload;
|
|
54
62
|
/**
|
|
55
|
-
* @deprecated
|
|
63
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
56
64
|
*/
|
|
57
|
-
export declare const chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
|
|
58
65
|
export declare const uiSmartLinkStatusLozengeButtonClicked: () => AnalyticsPayload;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
68
|
+
*/
|
|
59
69
|
export declare const uiSmartLinkStatusListItemButtonClicked: () => AnalyticsPayload;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
72
|
+
*/
|
|
60
73
|
export declare const uiSmartLinkStatusOpenPreviewButtonClicked: () => AnalyticsPayload;
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
76
|
+
*/
|
|
61
77
|
export declare const uiServerActionClicked: ({ smartLinkActionType, }: UiServerActionClickedEventProps) => AnalyticsPayload;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type GasPayload } from '@atlaskit/analytics-gas-types';
|
|
3
3
|
import { type AnalyticsEventPayload, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import { type LinkProps } from '@atlaskit/link';
|
|
4
5
|
import { type AnalyticsPayload } from '../types';
|
|
5
6
|
import { type ClickOutcome, type ClickType, type UiLinkClickedEventProps } from './types';
|
|
6
7
|
export declare const buttonMap: Map<number | undefined, "left" | "right" | "none" | "middle">;
|
|
@@ -13,14 +14,8 @@ type DeepPartial<T> = T extends object ? {
|
|
|
13
14
|
export declare const fireLinkClickedEvent: (createAnalyticsEvent: (payload: AnalyticsEventPayload) => UIAnalyticsEvent) => (event: React.MouseEvent, overrides?: DeepPartial<Omit<GasPayload, 'attributes'> & {
|
|
14
15
|
attributes: UiLinkClickedEventProps;
|
|
15
16
|
}>) => void;
|
|
16
|
-
export declare function withLinkClickedEvent<Component extends React.ElementType<{
|
|
17
|
-
|
|
18
|
-
onMouseDown?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
19
|
-
}>>(WrappedComponent: Component): {
|
|
20
|
-
(props: React.ComponentProps<Component>): React.ReactElement<{
|
|
21
|
-
onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
22
|
-
onMouseDown?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
23
|
-
}, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
export declare function withLinkClickedEvent<Component extends Extract<React.ElementType, 'a'> | React.ComponentType<LinkProps>>(WrappedComponent: Component): {
|
|
18
|
+
(props: LinkProps): React.ReactElement<LinkProps, string | React.JSXElementConstructor<any>>;
|
|
24
19
|
displayName: string;
|
|
25
20
|
};
|
|
26
21
|
export {};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { type InstrumentEventProps } from './types';
|
|
3
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
6
|
-
*/
|
|
7
|
-
export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;
|
|
1
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, invokeSucceededEvent, invokeFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
|
|
@@ -37,24 +37,20 @@ export type InvokeFailedEventProps = CommonEventProps & {
|
|
|
37
37
|
reason: string;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* @deprecated
|
|
40
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
41
41
|
*/
|
|
42
|
-
export type ConnectSucceededEventProps = CommonEventProps & {
|
|
43
|
-
id?: string;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
47
|
-
*/
|
|
48
|
-
export type ConnectFailedEventProps = CommonEventProps & {
|
|
49
|
-
id?: string;
|
|
50
|
-
reason?: string;
|
|
51
|
-
};
|
|
52
42
|
export type UiAuthEventProps = CommonEventProps & {
|
|
53
43
|
display: CardInnerAppearance;
|
|
54
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
47
|
+
*/
|
|
55
48
|
export type UiAuthAlternateAccountEventProps = CommonEventProps & {
|
|
56
49
|
display: CardInnerAppearance;
|
|
57
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
53
|
+
*/
|
|
58
54
|
export type UiCardClickedEventProps = CommonEventProps & {
|
|
59
55
|
id: string;
|
|
60
56
|
display: CardInnerAppearance;
|
|
@@ -68,9 +64,15 @@ export type UiActionClickedEventProps = CommonEventProps & {
|
|
|
68
64
|
actionType: string;
|
|
69
65
|
invokeType?: InvokeType;
|
|
70
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
69
|
+
*/
|
|
71
70
|
export type UiServerActionClickedEventProps = CommonEventProps & {
|
|
72
71
|
smartLinkActionType: SmartLinkActionType;
|
|
73
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
75
|
+
*/
|
|
74
76
|
export type UiClosedAuthEventProps = CommonEventProps & {
|
|
75
77
|
display: CardInnerAppearance;
|
|
76
78
|
};
|
|
@@ -79,37 +81,35 @@ export type UiRenderSuccessEventProps = CommonEventProps & {
|
|
|
79
81
|
status: CardType;
|
|
80
82
|
canBeDatasource?: boolean;
|
|
81
83
|
};
|
|
82
|
-
/**
|
|
83
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
84
|
-
*/
|
|
85
84
|
export type UiRenderFailedEventProps = CommonEventProps & {
|
|
86
85
|
display: CardInnerAppearance;
|
|
87
86
|
error: Error;
|
|
88
87
|
errorInfo: ErrorInfo;
|
|
89
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
91
|
+
*/
|
|
90
92
|
export type UiHoverCardViewedEventProps = CommonEventProps & {
|
|
91
93
|
previewDisplay: PreviewDisplay;
|
|
92
94
|
previewInvokeMethod?: PreviewInvokeMethod;
|
|
93
95
|
status: CardType;
|
|
94
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
99
|
+
*/
|
|
95
100
|
export type UiHoverCardDismissedEventProps = CommonEventProps & {
|
|
96
101
|
previewDisplay: PreviewDisplay;
|
|
97
102
|
hoverTime: number;
|
|
98
103
|
previewInvokeMethod?: PreviewInvokeMethod;
|
|
99
104
|
status: CardType;
|
|
100
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
108
|
+
*/
|
|
101
109
|
export type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
|
|
102
110
|
previewDisplay: PreviewDisplay;
|
|
103
111
|
previewInvokeMethod?: PreviewInvokeMethod;
|
|
104
112
|
};
|
|
105
|
-
/**
|
|
106
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
107
|
-
*/
|
|
108
|
-
export type InstrumentEventProps = CommonEventProps & {
|
|
109
|
-
error?: APIError;
|
|
110
|
-
status: CardType;
|
|
111
|
-
id: string;
|
|
112
|
-
};
|
|
113
113
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
114
114
|
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
|
|
115
115
|
export type UiLinkClickedEventProps = {
|
|
@@ -116,10 +116,6 @@ export declare const mockAnalytics: {
|
|
|
116
116
|
operational: {
|
|
117
117
|
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
|
|
118
118
|
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
|
|
119
|
-
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").ConnectSucceededEventProps) => void;
|
|
120
|
-
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").ConnectFailedEventProps) => void;
|
|
121
|
-
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("./analytics/types").InstrumentEventProps) => void;
|
|
122
|
-
chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
|
|
123
119
|
};
|
|
124
120
|
screen: {
|
|
125
121
|
modalViewedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type LinkUrlProps } from './types';
|
|
3
|
+
export declare const LinkComponent: {
|
|
4
|
+
(props: import("@atlaskit/link").LinkProps): React.ReactElement<import("@atlaskit/link").LinkProps, string | React.JSXElementConstructor<any>>;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
3
7
|
declare const _default: React.ForwardRefExoticComponent<LinkUrlProps & import("@atlaskit/analytics-next").WithContextProps & React.RefAttributes<any>>;
|
|
4
8
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.6.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
29
29
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
30
30
|
"@atlaskit/avatar": "^21.17.0",
|
|
31
|
-
"@atlaskit/avatar-group": "^10.
|
|
31
|
+
"@atlaskit/avatar-group": "^10.1.0",
|
|
32
32
|
"@atlaskit/badge": "^16.4.0",
|
|
33
33
|
"@atlaskit/button": "^20.3.0",
|
|
34
34
|
"@atlaskit/checkbox": "^15.2.0",
|
|
@@ -36,17 +36,18 @@
|
|
|
36
36
|
"@atlaskit/form": "^10.6.0",
|
|
37
37
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
38
38
|
"@atlaskit/heading": "^4.0.0",
|
|
39
|
-
"@atlaskit/icon": "^23.
|
|
39
|
+
"@atlaskit/icon": "^23.1.0",
|
|
40
40
|
"@atlaskit/icon-file-type": "^6.8.0",
|
|
41
41
|
"@atlaskit/icon-object": "^6.9.0",
|
|
42
42
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
43
43
|
"@atlaskit/legacy-custom-icons": "^0.20.0",
|
|
44
|
-
"@atlaskit/link
|
|
44
|
+
"@atlaskit/link": "^1.2.1",
|
|
45
|
+
"@atlaskit/link-analytics": "^8.6.0",
|
|
45
46
|
"@atlaskit/link-client-extension": "^3.0.0",
|
|
46
47
|
"@atlaskit/link-extractors": "^1.9.0",
|
|
47
48
|
"@atlaskit/linking-common": "^6.0.0",
|
|
48
49
|
"@atlaskit/linking-types": "^9.5.0",
|
|
49
|
-
"@atlaskit/logo": "^15.
|
|
50
|
+
"@atlaskit/logo": "^15.1.0",
|
|
50
51
|
"@atlaskit/lozenge": "^11.12.0",
|
|
51
52
|
"@atlaskit/menu": "^2.13.0",
|
|
52
53
|
"@atlaskit/modal-dialog": "^12.18.0",
|
|
@@ -55,10 +56,10 @@
|
|
|
55
56
|
"@atlaskit/popup": "^1.30.0",
|
|
56
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
57
58
|
"@atlaskit/section-message": "^6.8.0",
|
|
58
|
-
"@atlaskit/select": "^18.
|
|
59
|
+
"@atlaskit/select": "^18.8.0",
|
|
59
60
|
"@atlaskit/spinner": "^16.3.0",
|
|
60
|
-
"@atlaskit/textarea": "^5.
|
|
61
|
-
"@atlaskit/textfield": "^6.
|
|
61
|
+
"@atlaskit/textarea": "^5.7.0",
|
|
62
|
+
"@atlaskit/textfield": "^6.7.0",
|
|
62
63
|
"@atlaskit/theme": "^14.0.0",
|
|
63
64
|
"@atlaskit/tokens": "^2.4.0",
|
|
64
65
|
"@atlaskit/tooltip": "^18.9.0",
|
|
@@ -90,9 +91,8 @@
|
|
|
90
91
|
"@af/visual-regression": "*",
|
|
91
92
|
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
92
93
|
"@atlaskit/css-reset": "^6.11.0",
|
|
93
|
-
"@atlaskit/link": "^1.2.1",
|
|
94
94
|
"@atlaskit/link-test-helpers": "^7.5.0",
|
|
95
|
-
"@atlaskit/media-test-helpers": "^34.
|
|
95
|
+
"@atlaskit/media-test-helpers": "^34.7.0",
|
|
96
96
|
"@atlaskit/ssr": "*",
|
|
97
97
|
"@atlaskit/visual-regression": "*",
|
|
98
98
|
"@atlassian/analytics-tooling": "*",
|
|
@@ -165,6 +165,9 @@
|
|
|
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
|
+
},
|
|
168
171
|
"platform-visual-refresh-icons": {
|
|
169
172
|
"type": "boolean"
|
|
170
173
|
},
|
|
@@ -174,10 +177,7 @@
|
|
|
174
177
|
"smart_links_for_plans_platform": {
|
|
175
178
|
"type": "boolean"
|
|
176
179
|
},
|
|
177
|
-
"
|
|
178
|
-
"type": "boolean"
|
|
179
|
-
},
|
|
180
|
-
"smart-card-remove-block-card-from-embed": {
|
|
180
|
+
"platform_editor_hyperlink_underline": {
|
|
181
181
|
"type": "boolean"
|
|
182
182
|
}
|
|
183
183
|
}
|