@atlaskit/smart-card 30.3.0 → 30.3.1
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 +12 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +146 -216
- package/dist/cjs/utils/analytics/analytics.js +78 -140
- package/dist/cjs/utils/analytics/index.js +0 -6
- package/dist/cjs/view/BlockCard/components/Name.js +1 -3
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +1 -2
- package/dist/cjs/view/CardWithUrl/component.js +14 -41
- package/dist/cjs/view/EmbedCard/components/styled.js +4 -11
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +2 -2
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -1
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -6
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +1 -69
- package/dist/es2019/utils/analytics/analytics.js +1 -63
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/view/BlockCard/components/Name.js +1 -3
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +1 -2
- package/dist/es2019/view/CardWithUrl/component.js +14 -41
- package/dist/es2019/view/EmbedCard/components/styled.js +4 -11
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +2 -2
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/styled.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +147 -217
- package/dist/esm/utils/analytics/analytics.js +77 -139
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/view/BlockCard/components/Name.js +1 -3
- package/dist/esm/view/BlockCard/views/ResolvingView.js +1 -2
- package/dist/esm/view/CardWithUrl/component.js +14 -41
- package/dist/esm/view/EmbedCard/components/styled.js +4 -11
- package/dist/esm/view/EmbedCard/views/ErroredView.js +2 -2
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +2 -3
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -6
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -4
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -29
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -2
- package/dist/types/utils/analytics/analytics.d.ts +1 -9
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -12
- package/dist/types/utils/mocks.d.ts +0 -2
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -29
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -2
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -9
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -12
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -2
- package/package.json +2 -5
|
@@ -57,18 +57,6 @@ export type UiCardClickedEventProps = CommonEventProps & {
|
|
|
57
57
|
isModifierKeyPressed?: boolean;
|
|
58
58
|
actionSubjectId?: string;
|
|
59
59
|
};
|
|
60
|
-
export type UiIframeDwelledEventProps = CommonEventProps & {
|
|
61
|
-
id: string;
|
|
62
|
-
display: CardInnerAppearance;
|
|
63
|
-
status: CardType;
|
|
64
|
-
dwellTime: number;
|
|
65
|
-
dwellPercentVisible: number;
|
|
66
|
-
};
|
|
67
|
-
export type UiIframeFocusedEventProps = CommonEventProps & {
|
|
68
|
-
id: string;
|
|
69
|
-
display: CardInnerAppearance;
|
|
70
|
-
status: CardType;
|
|
71
|
-
};
|
|
72
60
|
export type UiActionClickedEventProps = CommonEventProps & {
|
|
73
61
|
id?: string;
|
|
74
62
|
display?: CardInnerAppearance;
|
|
@@ -97,8 +97,6 @@ export declare const mockAnalytics: {
|
|
|
97
97
|
actionSubjectId: string;
|
|
98
98
|
}) => void;
|
|
99
99
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
|
|
100
|
-
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("./analytics/types").UiIframeDwelledEventProps) => void;
|
|
101
|
-
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("./analytics/types").UiIframeFocusedEventProps) => void;
|
|
102
100
|
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
103
101
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
104
102
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SmartLinkActionType } from '@atlaskit/linking-types';
|
|
2
2
|
import { type TrackQuickActionFailureReason, type TrackQuickActionType } from '../../utils/analytics/analytics';
|
|
3
|
-
import { type ConnectFailedEventProps, type ConnectSucceededEventProps, type InstrumentEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type
|
|
3
|
+
import { type ConnectFailedEventProps, type ConnectSucceededEventProps, type InstrumentEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, 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';
|
|
4
4
|
import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
|
|
5
5
|
/**
|
|
6
6
|
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
@@ -52,34 +52,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
52
52
|
* @returns
|
|
53
53
|
*/
|
|
54
54
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
|
|
55
|
-
/**
|
|
56
|
-
* This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
|
|
57
|
-
* @param id The unique ID for this Smart Link.
|
|
58
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
59
|
-
* @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
|
|
60
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
61
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
62
|
-
* @param location Where the Smart Link is currently rendered.
|
|
63
|
-
* @param destinationProduct The product the Smart Link is linked to.
|
|
64
|
-
* @param dwellTime Total seconds that the user has dwelled on this iframe
|
|
65
|
-
* @param dwellPercentVisible Percentage element was visible at end of dwell
|
|
66
|
-
* @returns
|
|
67
|
-
* @deprecated
|
|
68
|
-
*/
|
|
69
|
-
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
|
|
70
|
-
/**
|
|
71
|
-
* This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
|
|
72
|
-
* @param id The unique ID for this Smart Link.
|
|
73
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
74
|
-
* @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
|
|
75
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
76
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
77
|
-
* @param location Where the Smart Link is currently rendered.
|
|
78
|
-
* @param destinationProduct The product the Smart Link is linked to.
|
|
79
|
-
* @returns
|
|
80
|
-
* @deprecated
|
|
81
|
-
*/
|
|
82
|
-
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
|
|
83
55
|
/**
|
|
84
56
|
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
85
57
|
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
@@ -16,8 +16,6 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
16
16
|
actionSubjectId: string;
|
|
17
17
|
}) => void;
|
|
18
18
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
19
|
-
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
20
|
-
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
21
19
|
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
22
20
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
23
21
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
@@ -2,7 +2,7 @@ import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import { SmartLinkActionType } from '@atlaskit/linking-types';
|
|
3
3
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
4
4
|
import { type AnalyticsPayload } from '../types';
|
|
5
|
-
import { type CommonEventProps, type ConnectFailedEventProps, type ConnectSucceededEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ResolvedEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type
|
|
5
|
+
import { type CommonEventProps, type ConnectFailedEventProps, type ConnectSucceededEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ResolvedEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps, type UnresolvedEventProps } from './types';
|
|
6
6
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
7
7
|
export declare const context: {
|
|
8
8
|
componentName: string;
|
|
@@ -62,14 +62,6 @@ export declare const trackHoverCardResolutionStarted: ({ display, ...attributes
|
|
|
62
62
|
export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
|
|
63
63
|
export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
|
|
64
64
|
export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
|
|
65
|
-
/**
|
|
66
|
-
* @deprecated
|
|
67
|
-
*/
|
|
68
|
-
export declare const uiIframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => AnalyticsPayload;
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated
|
|
71
|
-
*/
|
|
72
|
-
export declare const uiIframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => AnalyticsPayload;
|
|
73
65
|
export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
|
|
74
66
|
export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => AnalyticsPayload;
|
|
75
67
|
export declare const screenAuthPopupEvent: ({ extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => AnalyticsPayload;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type AnalyticsPayload } from '../types';
|
|
2
2
|
import { type InstrumentEventProps } from './types';
|
|
3
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent,
|
|
3
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
|
|
4
4
|
export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;
|
|
@@ -57,18 +57,6 @@ export type UiCardClickedEventProps = CommonEventProps & {
|
|
|
57
57
|
isModifierKeyPressed?: boolean;
|
|
58
58
|
actionSubjectId?: string;
|
|
59
59
|
};
|
|
60
|
-
export type UiIframeDwelledEventProps = CommonEventProps & {
|
|
61
|
-
id: string;
|
|
62
|
-
display: CardInnerAppearance;
|
|
63
|
-
status: CardType;
|
|
64
|
-
dwellTime: number;
|
|
65
|
-
dwellPercentVisible: number;
|
|
66
|
-
};
|
|
67
|
-
export type UiIframeFocusedEventProps = CommonEventProps & {
|
|
68
|
-
id: string;
|
|
69
|
-
display: CardInnerAppearance;
|
|
70
|
-
status: CardType;
|
|
71
|
-
};
|
|
72
60
|
export type UiActionClickedEventProps = CommonEventProps & {
|
|
73
61
|
id?: string;
|
|
74
62
|
display?: CardInnerAppearance;
|
|
@@ -97,8 +97,6 @@ export declare const mockAnalytics: {
|
|
|
97
97
|
actionSubjectId: string;
|
|
98
98
|
}) => void;
|
|
99
99
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
|
|
100
|
-
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("./analytics/types").UiIframeDwelledEventProps) => void;
|
|
101
|
-
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("./analytics/types").UiIframeFocusedEventProps) => void;
|
|
102
100
|
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
103
101
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
104
102
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "30.3.
|
|
3
|
+
"version": "30.3.1",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/textarea": "^5.6.0",
|
|
61
61
|
"@atlaskit/textfield": "^6.5.0",
|
|
62
62
|
"@atlaskit/theme": "^14.0.0",
|
|
63
|
-
"@atlaskit/tokens": "^2.
|
|
63
|
+
"@atlaskit/tokens": "^2.3.0",
|
|
64
64
|
"@atlaskit/tooltip": "^18.9.0",
|
|
65
65
|
"@atlaskit/ufo": "^0.3.0",
|
|
66
66
|
"@babel/runtime": "^7.0.0",
|
|
@@ -175,9 +175,6 @@
|
|
|
175
175
|
"smart_links_for_plans_platform": {
|
|
176
176
|
"type": "boolean"
|
|
177
177
|
},
|
|
178
|
-
"smart-card-migrate-smartlinkiframe-analytics": {
|
|
179
|
-
"type": "boolean"
|
|
180
|
-
},
|
|
181
178
|
"smart-card-migrate-track-analytics": {
|
|
182
179
|
"type": "boolean"
|
|
183
180
|
}
|