@atlaskit/smart-card 26.21.0 → 26.22.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 +6 -0
- package/dist/cjs/state/actions/index.js +16 -52
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +12 -11
- package/dist/cjs/state/hooks/use-invoke-client-action/index.js +78 -0
- package/dist/cjs/state/hooks/use-invoke-client-action/types.js +5 -0
- package/dist/cjs/utils/analytics/analytics.js +5 -9
- package/dist/cjs/utils/mocks.js +9 -4
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +6 -70
- package/dist/cjs/view/BlockCard/components/Action.js +1 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/actions/index.js +10 -38
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +12 -11
- package/dist/es2019/state/hooks/use-invoke-client-action/index.js +52 -0
- package/dist/es2019/state/hooks/use-invoke-client-action/types.js +1 -0
- package/dist/es2019/utils/analytics/analytics.js +5 -9
- package/dist/es2019/utils/mocks.js +9 -4
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +3 -44
- package/dist/es2019/view/BlockCard/components/Action.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/actions/index.js +16 -49
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +12 -11
- package/dist/esm/state/hooks/use-invoke-client-action/index.js +67 -0
- package/dist/esm/state/hooks/use-invoke-client-action/types.js +1 -0
- package/dist/esm/utils/analytics/analytics.js +5 -9
- package/dist/esm/utils/mocks.js +9 -4
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +8 -65
- package/dist/esm/view/BlockCard/components/Action.js +1 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +3 -3
- package/dist/types/state/flexible-ui-context/index.d.ts +6 -6
- package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +6 -0
- package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +30 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -3
- package/dist/types/utils/analytics/types.d.ts +3 -3
- package/dist/types/utils/mocks.d.ts +3 -3
- package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +0 -5
- package/dist/types/view/FlexibleCard/components/utils.d.ts +3 -3
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +3 -3
- package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +6 -6
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +6 -0
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/types.d.ts +30 -0
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +3 -3
- package/dist/types-ts4.5/utils/analytics/types.d.ts +3 -3
- package/dist/types-ts4.5/utils/mocks.d.ts +3 -3
- package/dist/types-ts4.5/view/BlockCard/actions/PreviewAction.d.ts +0 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +3 -3
- package/package.json +4 -3
- package/report.api.md +7 -7
- package/tmp/api-report-tmp.d.ts +6 -6
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
var PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.
|
|
14
|
+
packageVersion: "26.22.0",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|
|
@@ -93,7 +93,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
93
93
|
* @param invokeType Whether the action invoked made a call to a server.
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
96
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
97
97
|
/**
|
|
98
98
|
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
99
99
|
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
@@ -181,7 +181,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
181
181
|
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
182
182
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
183
183
|
*/
|
|
184
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
|
|
184
|
+
invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
|
|
185
185
|
/**
|
|
186
186
|
* This fires an event that represents an action being unsuccessfully invoked.
|
|
187
187
|
* @param id The unique ID for this Smart Link.
|
|
@@ -190,7 +190,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
190
190
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
191
191
|
* @param reason The reason the invocation failed.
|
|
192
192
|
*/
|
|
193
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
193
|
+
invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
194
194
|
/**
|
|
195
195
|
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
196
196
|
* @param id The unique ID for this Smart Link.
|
|
@@ -21,7 +21,7 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
|
|
|
21
21
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
22
22
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
23
23
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
24
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
24
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
25
25
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
26
26
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
27
27
|
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
@@ -37,8 +37,8 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
|
|
|
37
37
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
38
38
|
};
|
|
39
39
|
operational: {
|
|
40
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
41
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
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
42
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
43
43
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
44
44
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
|
|
@@ -80,7 +80,7 @@ export declare const useFlexibleUiAnalyticsContext: () => {
|
|
|
80
80
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
81
81
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
82
82
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
83
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
83
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
84
84
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
85
85
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
86
86
|
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
@@ -96,8 +96,8 @@ export declare const useFlexibleUiAnalyticsContext: () => {
|
|
|
96
96
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
97
97
|
};
|
|
98
98
|
operational: {
|
|
99
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
100
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
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
101
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
102
102
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
103
103
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InvokeClientActionProps, UseInvokeClientActionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Invoke client action such as preview, download and open link
|
|
4
|
+
*/
|
|
5
|
+
declare const useInvokeClientAction: ({ analytics }: UseInvokeClientActionProps) => ({ actionType, actionFn, extensionKey, display, }: InvokeClientActionProps) => Promise<void>;
|
|
6
|
+
export default useInvokeClientAction;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AnalyticsFacade } from '../../analytics';
|
|
2
|
+
import type { CardInnerAppearance } from '../../../view/Card/types';
|
|
3
|
+
export type UseInvokeClientActionProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Analytics object
|
|
6
|
+
*/
|
|
7
|
+
analytics?: AnalyticsFacade;
|
|
8
|
+
};
|
|
9
|
+
export type InvokeClientActionProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Invoke action to execute.
|
|
12
|
+
*/
|
|
13
|
+
actionFn: () => Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Invoke action type for analytics purposes.
|
|
16
|
+
*/
|
|
17
|
+
actionType: string;
|
|
18
|
+
/**
|
|
19
|
+
* Smart card display type
|
|
20
|
+
* This value should already be set in analytics context.
|
|
21
|
+
* However, we still need to set this value for ufo experience.
|
|
22
|
+
*/
|
|
23
|
+
display?: CardInnerAppearance;
|
|
24
|
+
/**
|
|
25
|
+
* Link provider extension key
|
|
26
|
+
* This value should have already been set in analytics object through
|
|
27
|
+
* useSmartLinkAnalytics() and/or into the analytic context.
|
|
28
|
+
*/
|
|
29
|
+
extensionKey?: string;
|
|
30
|
+
};
|
|
@@ -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, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
27
|
+
actionClickedEvent: ({ id: experienceId, 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, 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;
|
|
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;
|
|
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;
|
|
@@ -27,12 +27,12 @@ export type UnresolvedEventProps = CommonEventProps & {
|
|
|
27
27
|
export type InvokeSucceededEventProps = CommonEventProps & {
|
|
28
28
|
id: string;
|
|
29
29
|
actionType: string;
|
|
30
|
-
display
|
|
30
|
+
display?: CardInnerAppearance;
|
|
31
31
|
};
|
|
32
32
|
export type InvokeFailedEventProps = CommonEventProps & {
|
|
33
33
|
id: string;
|
|
34
34
|
actionType: string;
|
|
35
|
-
display
|
|
35
|
+
display?: CardInnerAppearance;
|
|
36
36
|
reason: string;
|
|
37
37
|
};
|
|
38
38
|
export type ConnectSucceededEventProps = CommonEventProps & {
|
|
@@ -70,7 +70,7 @@ export type UiIframeFocusedEventProps = CommonEventProps & {
|
|
|
70
70
|
};
|
|
71
71
|
export type UiActionClickedEventProps = CommonEventProps & {
|
|
72
72
|
id: string;
|
|
73
|
-
display
|
|
73
|
+
display?: CardInnerAppearance;
|
|
74
74
|
actionType: string;
|
|
75
75
|
invokeType?: InvokeType;
|
|
76
76
|
};
|
|
@@ -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, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
52
|
+
actionClickedEvent: ({ id: experienceId, 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, 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;
|
|
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;
|
|
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,14 +1,9 @@
|
|
|
1
1
|
import React, { ErrorInfo } from 'react';
|
|
2
2
|
import { AnalyticsFacade } from '../../../state/analytics';
|
|
3
|
-
import { EmbedModalProps } from '../../EmbedModal/types';
|
|
4
3
|
import { ActionProps } from '../components/Action';
|
|
5
4
|
import { IconProps } from '../../common/Icon';
|
|
6
5
|
import { MetadataProps } from '../../common/Metadata';
|
|
7
6
|
import { AnalyticsOrigin } from '../../../utils/types';
|
|
8
|
-
export interface PreviewFunctionArg extends EmbedModalProps {
|
|
9
|
-
popupMountPointId: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function previewFunction({ popupMountPointId, onClose, ...rest }: PreviewFunctionArg): Promise<void>;
|
|
12
7
|
type PreviewInfo = {
|
|
13
8
|
src?: string;
|
|
14
9
|
testId?: string;
|
|
@@ -28,7 +28,7 @@ export declare const openEmbedModalWithFlexibleUiIcon: ({ analytics, downloadUrl
|
|
|
28
28
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
29
29
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
30
30
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
31
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
31
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
32
32
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
33
33
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
34
34
|
modalClosedEvent: (data: Partial<import("../../..").AnalyticsPayload> & {
|
|
@@ -44,8 +44,8 @@ export declare const openEmbedModalWithFlexibleUiIcon: ({ analytics, downloadUrl
|
|
|
44
44
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
45
45
|
};
|
|
46
46
|
operational: {
|
|
47
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
48
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
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
49
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
50
50
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
51
51
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../../utils/analytics/types").InstrumentEventProps) => void;
|
|
@@ -93,7 +93,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
93
93
|
* @param invokeType Whether the action invoked made a call to a server.
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
96
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
97
97
|
/**
|
|
98
98
|
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
99
99
|
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
@@ -181,7 +181,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
181
181
|
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
182
182
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
183
183
|
*/
|
|
184
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
|
|
184
|
+
invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
|
|
185
185
|
/**
|
|
186
186
|
* This fires an event that represents an action being unsuccessfully invoked.
|
|
187
187
|
* @param id The unique ID for this Smart Link.
|
|
@@ -190,7 +190,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
190
190
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
191
191
|
* @param reason The reason the invocation failed.
|
|
192
192
|
*/
|
|
193
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
193
|
+
invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
194
194
|
/**
|
|
195
195
|
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
196
196
|
* @param id The unique ID for this Smart Link.
|
|
@@ -21,7 +21,7 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
|
|
|
21
21
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
22
22
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
23
23
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
24
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
24
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
25
25
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
26
26
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
27
27
|
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
@@ -37,8 +37,8 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
|
|
|
37
37
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
38
38
|
};
|
|
39
39
|
operational: {
|
|
40
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
41
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
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
42
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
43
43
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
44
44
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
|
|
@@ -80,7 +80,7 @@ export declare const useFlexibleUiAnalyticsContext: () => {
|
|
|
80
80
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
81
81
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
82
82
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
83
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
83
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
84
84
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
85
85
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
86
86
|
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
@@ -96,8 +96,8 @@ export declare const useFlexibleUiAnalyticsContext: () => {
|
|
|
96
96
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
97
97
|
};
|
|
98
98
|
operational: {
|
|
99
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
100
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
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
101
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
102
102
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
103
103
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InvokeClientActionProps, UseInvokeClientActionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Invoke client action such as preview, download and open link
|
|
4
|
+
*/
|
|
5
|
+
declare const useInvokeClientAction: ({ analytics }: UseInvokeClientActionProps) => ({ actionType, actionFn, extensionKey, display, }: InvokeClientActionProps) => Promise<void>;
|
|
6
|
+
export default useInvokeClientAction;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AnalyticsFacade } from '../../analytics';
|
|
2
|
+
import type { CardInnerAppearance } from '../../../view/Card/types';
|
|
3
|
+
export type UseInvokeClientActionProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Analytics object
|
|
6
|
+
*/
|
|
7
|
+
analytics?: AnalyticsFacade;
|
|
8
|
+
};
|
|
9
|
+
export type InvokeClientActionProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Invoke action to execute.
|
|
12
|
+
*/
|
|
13
|
+
actionFn: () => Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Invoke action type for analytics purposes.
|
|
16
|
+
*/
|
|
17
|
+
actionType: string;
|
|
18
|
+
/**
|
|
19
|
+
* Smart card display type
|
|
20
|
+
* This value should already be set in analytics context.
|
|
21
|
+
* However, we still need to set this value for ufo experience.
|
|
22
|
+
*/
|
|
23
|
+
display?: CardInnerAppearance;
|
|
24
|
+
/**
|
|
25
|
+
* Link provider extension key
|
|
26
|
+
* This value should have already been set in analytics object through
|
|
27
|
+
* useSmartLinkAnalytics() and/or into the analytic context.
|
|
28
|
+
*/
|
|
29
|
+
extensionKey?: string;
|
|
30
|
+
};
|
|
@@ -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, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
27
|
+
actionClickedEvent: ({ id: experienceId, 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, 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;
|
|
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;
|
|
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;
|
|
@@ -27,12 +27,12 @@ export type UnresolvedEventProps = CommonEventProps & {
|
|
|
27
27
|
export type InvokeSucceededEventProps = CommonEventProps & {
|
|
28
28
|
id: string;
|
|
29
29
|
actionType: string;
|
|
30
|
-
display
|
|
30
|
+
display?: CardInnerAppearance;
|
|
31
31
|
};
|
|
32
32
|
export type InvokeFailedEventProps = CommonEventProps & {
|
|
33
33
|
id: string;
|
|
34
34
|
actionType: string;
|
|
35
|
-
display
|
|
35
|
+
display?: CardInnerAppearance;
|
|
36
36
|
reason: string;
|
|
37
37
|
};
|
|
38
38
|
export type ConnectSucceededEventProps = CommonEventProps & {
|
|
@@ -70,7 +70,7 @@ export type UiIframeFocusedEventProps = CommonEventProps & {
|
|
|
70
70
|
};
|
|
71
71
|
export type UiActionClickedEventProps = CommonEventProps & {
|
|
72
72
|
id: string;
|
|
73
|
-
display
|
|
73
|
+
display?: CardInnerAppearance;
|
|
74
74
|
actionType: string;
|
|
75
75
|
invokeType?: InvokeType;
|
|
76
76
|
};
|
|
@@ -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, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
52
|
+
actionClickedEvent: ({ id: experienceId, 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, 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;
|
|
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;
|
|
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,14 +1,9 @@
|
|
|
1
1
|
import React, { ErrorInfo } from 'react';
|
|
2
2
|
import { AnalyticsFacade } from '../../../state/analytics';
|
|
3
|
-
import { EmbedModalProps } from '../../EmbedModal/types';
|
|
4
3
|
import { ActionProps } from '../components/Action';
|
|
5
4
|
import { IconProps } from '../../common/Icon';
|
|
6
5
|
import { MetadataProps } from '../../common/Metadata';
|
|
7
6
|
import { AnalyticsOrigin } from '../../../utils/types';
|
|
8
|
-
export interface PreviewFunctionArg extends EmbedModalProps {
|
|
9
|
-
popupMountPointId: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function previewFunction({ popupMountPointId, onClose, ...rest }: PreviewFunctionArg): Promise<void>;
|
|
12
7
|
type PreviewInfo = {
|
|
13
8
|
src?: string;
|
|
14
9
|
testId?: string;
|
|
@@ -28,7 +28,7 @@ export declare const openEmbedModalWithFlexibleUiIcon: ({ analytics, downloadUrl
|
|
|
28
28
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
29
29
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
30
30
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
31
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
31
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
32
32
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
33
33
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
34
34
|
modalClosedEvent: (data: Partial<import("../../..").AnalyticsPayload> & {
|
|
@@ -44,8 +44,8 @@ export declare const openEmbedModalWithFlexibleUiIcon: ({ analytics, downloadUrl
|
|
|
44
44
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
45
45
|
};
|
|
46
46
|
operational: {
|
|
47
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
48
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
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
49
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
50
50
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
51
51
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../../utils/analytics/types").InstrumentEventProps) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.22.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@atlaskit/avatar": "^21.3.0",
|
|
28
28
|
"@atlaskit/avatar-group": "^9.4.0",
|
|
29
29
|
"@atlaskit/badge": "^15.1.0",
|
|
30
|
-
"@atlaskit/button": "^16.
|
|
30
|
+
"@atlaskit/button": "^16.10.0",
|
|
31
31
|
"@atlaskit/dropdown-menu": "^11.13.0",
|
|
32
32
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
33
33
|
"@atlaskit/icon": "^21.12.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/popup": "^1.9.0",
|
|
49
49
|
"@atlaskit/spinner": "^15.5.0",
|
|
50
50
|
"@atlaskit/theme": "^12.6.0",
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
51
|
+
"@atlaskit/tokens": "^1.21.0",
|
|
52
52
|
"@atlaskit/tooltip": "^17.8.0",
|
|
53
53
|
"@atlaskit/ufo": "^0.2.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@af/visual-regression": "*",
|
|
75
|
+
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
75
76
|
"@atlaskit/avatar": "^21.3.0",
|
|
76
77
|
"@atlaskit/css-reset": "^6.5.0",
|
|
77
78
|
"@atlaskit/link-test-helpers": "^6.0.0",
|
package/report.api.md
CHANGED
|
@@ -637,7 +637,7 @@ type InstrumentEventProps = CommonEventProps & {
|
|
|
637
637
|
type InvokeFailedEventProps = CommonEventProps & {
|
|
638
638
|
id: string;
|
|
639
639
|
actionType: string;
|
|
640
|
-
display
|
|
640
|
+
display?: CardInnerAppearance;
|
|
641
641
|
reason: string;
|
|
642
642
|
};
|
|
643
643
|
|
|
@@ -645,7 +645,7 @@ type InvokeFailedEventProps = CommonEventProps & {
|
|
|
645
645
|
type InvokeSucceededEventProps = CommonEventProps & {
|
|
646
646
|
id: string;
|
|
647
647
|
actionType: string;
|
|
648
|
-
display
|
|
648
|
+
display?: CardInnerAppearance;
|
|
649
649
|
};
|
|
650
650
|
|
|
651
651
|
// @public (undocumented)
|
|
@@ -984,7 +984,7 @@ enum TrackQuickActionType {
|
|
|
984
984
|
// @public (undocumented)
|
|
985
985
|
type UiActionClickedEventProps = CommonEventProps & {
|
|
986
986
|
id: string;
|
|
987
|
-
display
|
|
987
|
+
display?: CardInnerAppearance;
|
|
988
988
|
actionType: string;
|
|
989
989
|
invokeType?: InvokeType;
|
|
990
990
|
};
|
|
@@ -1129,11 +1129,11 @@ export const useSmartLinkAnalytics: (
|
|
|
1129
1129
|
destinationSubproduct,
|
|
1130
1130
|
}: UiIframeFocusedEventProps) => void;
|
|
1131
1131
|
actionClickedEvent: ({
|
|
1132
|
-
id,
|
|
1132
|
+
id: experienceId,
|
|
1133
1133
|
actionType,
|
|
1134
1134
|
display,
|
|
1135
1135
|
invokeType,
|
|
1136
|
-
extensionKey,
|
|
1136
|
+
extensionKey: overrideExtensionKey,
|
|
1137
1137
|
definitionId,
|
|
1138
1138
|
resourceType,
|
|
1139
1139
|
destinationProduct,
|
|
@@ -1218,7 +1218,7 @@ export const useSmartLinkAnalytics: (
|
|
|
1218
1218
|
};
|
|
1219
1219
|
operational: {
|
|
1220
1220
|
invokeSucceededEvent: ({
|
|
1221
|
-
id,
|
|
1221
|
+
id: experienceId,
|
|
1222
1222
|
actionType,
|
|
1223
1223
|
display,
|
|
1224
1224
|
extensionKey,
|
|
@@ -1229,7 +1229,7 @@ export const useSmartLinkAnalytics: (
|
|
|
1229
1229
|
location,
|
|
1230
1230
|
}: InvokeSucceededEventProps) => void;
|
|
1231
1231
|
invokeFailedEvent: ({
|
|
1232
|
-
id,
|
|
1232
|
+
id: experienceId,
|
|
1233
1233
|
actionType,
|
|
1234
1234
|
display,
|
|
1235
1235
|
reason,
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -492,7 +492,7 @@ type InstrumentEventProps = CommonEventProps & {
|
|
|
492
492
|
type InvokeFailedEventProps = CommonEventProps & {
|
|
493
493
|
id: string;
|
|
494
494
|
actionType: string;
|
|
495
|
-
display
|
|
495
|
+
display?: CardInnerAppearance;
|
|
496
496
|
reason: string;
|
|
497
497
|
};
|
|
498
498
|
|
|
@@ -500,7 +500,7 @@ type InvokeFailedEventProps = CommonEventProps & {
|
|
|
500
500
|
type InvokeSucceededEventProps = CommonEventProps & {
|
|
501
501
|
id: string;
|
|
502
502
|
actionType: string;
|
|
503
|
-
display
|
|
503
|
+
display?: CardInnerAppearance;
|
|
504
504
|
};
|
|
505
505
|
|
|
506
506
|
// @public (undocumented)
|
|
@@ -833,7 +833,7 @@ enum TrackQuickActionType {
|
|
|
833
833
|
// @public (undocumented)
|
|
834
834
|
type UiActionClickedEventProps = CommonEventProps & {
|
|
835
835
|
id: string;
|
|
836
|
-
display
|
|
836
|
+
display?: CardInnerAppearance;
|
|
837
837
|
actionType: string;
|
|
838
838
|
invokeType?: InvokeType;
|
|
839
839
|
};
|
|
@@ -923,7 +923,7 @@ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: Analytics
|
|
|
923
923
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
|
|
924
924
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
|
|
925
925
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
|
|
926
|
-
actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
926
|
+
actionClickedEvent: ({ id: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
927
927
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
|
|
928
928
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
|
|
929
929
|
modalClosedEvent: (data: Partial<AnalyticsPayload> & {
|
|
@@ -939,8 +939,8 @@ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: Analytics
|
|
|
939
939
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
940
940
|
};
|
|
941
941
|
operational: {
|
|
942
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
|
|
943
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
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
944
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
|
|
945
945
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
|
|
946
946
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
|