@atlaskit/smart-card 19.1.13 → 19.1.14
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 +55 -0
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +255 -34
- package/dist/cjs/state/hooks/useSmartLink.js +1 -1
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +1 -1
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -1
- package/dist/cjs/state/index.js +9 -1
- package/dist/cjs/utils/analytics/analytics.js +14 -9
- package/dist/cjs/utils/analytics/types.js +5 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithData/loader.js +2 -0
- package/dist/cjs/view/CardWithUrl/component.js +12 -8
- package/dist/cjs/view/CardWithUrl/loader.js +5 -3
- package/dist/cjs/view/HoverCard/index.js +3 -1
- package/dist/cjs/view/HoverCard/utils.js +3 -1
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/cjs/view/InlineCard/index.js +3 -1
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +196 -30
- package/dist/es2019/state/hooks/useSmartLink.js +1 -1
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +1 -1
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +1 -1
- package/dist/es2019/state/index.js +2 -1
- package/dist/es2019/utils/analytics/analytics.js +14 -9
- package/dist/es2019/utils/analytics/types.js +1 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithData/loader.js +2 -0
- package/dist/es2019/view/CardWithUrl/component.js +12 -8
- package/dist/es2019/view/CardWithUrl/loader.js +5 -3
- package/dist/es2019/view/HoverCard/index.js +3 -1
- package/dist/es2019/view/HoverCard/utils.js +1 -1
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +254 -35
- package/dist/esm/state/hooks/useSmartLink.js +1 -1
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +1 -1
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -1
- package/dist/esm/state/index.js +2 -1
- package/dist/esm/utils/analytics/analytics.js +14 -9
- package/dist/esm/utils/analytics/types.js +1 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithData/loader.js +2 -0
- package/dist/esm/view/CardWithUrl/component.js +12 -8
- package/dist/esm/view/CardWithUrl/loader.js +5 -3
- package/dist/esm/view/HoverCard/index.js +3 -1
- package/dist/esm/view/HoverCard/utils.js +3 -1
- package/dist/esm/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/esm/view/InlineCard/index.js +3 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +144 -11
- package/dist/types/state/helpers.d.ts +2 -2
- package/dist/types/state/hooks/useSmartLink.d.ts +8 -10
- package/dist/types/state/index.d.ts +1 -0
- package/dist/types/utils/analytics/analytics.d.ts +6 -6
- package/dist/types/utils/analytics/types.d.ts +1 -0
- package/dist/types/utils/performance.d.ts +1 -1
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +1 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +3 -0
- package/dist/types/view/CardWithData/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +2 -0
- package/dist/types/view/EmbedCard/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/types.d.ts +4 -0
- package/dist/types/view/HoverCard/index.d.ts +1 -1
- package/dist/types/view/HoverCard/types.d.ts +1 -0
- package/dist/types/view/HoverCard/utils.d.ts +1 -1
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types/view/InlineCard/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -82,7 +82,7 @@ export var unresolvedEvent = function unresolvedEvent(id, status, definitionId,
|
|
|
82
82
|
})
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
export var invokeSucceededEvent = function invokeSucceededEvent(id,
|
|
85
|
+
export var invokeSucceededEvent = function invokeSucceededEvent(id, actionType, display, extensionKey) {
|
|
86
86
|
var measure = getMeasure(id, 'resolved') || {
|
|
87
87
|
duration: undefined
|
|
88
88
|
};
|
|
@@ -94,12 +94,12 @@ export var invokeSucceededEvent = function invokeSucceededEvent(id, extensionKey
|
|
|
94
94
|
id: id,
|
|
95
95
|
actionType: actionType,
|
|
96
96
|
display: display,
|
|
97
|
-
extensionKey: extensionKey,
|
|
97
|
+
extensionKey: extensionKey || '',
|
|
98
98
|
duration: measure.duration
|
|
99
99
|
})
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
-
export var invokeFailedEvent = function invokeFailedEvent(id,
|
|
102
|
+
export var invokeFailedEvent = function invokeFailedEvent(id, actionType, display, reason, extensionKey) {
|
|
103
103
|
var measure = getMeasure(id, 'errored') || {
|
|
104
104
|
duration: undefined
|
|
105
105
|
};
|
|
@@ -111,7 +111,7 @@ export var invokeFailedEvent = function invokeFailedEvent(id, extensionKey, acti
|
|
|
111
111
|
id: id,
|
|
112
112
|
actionType: actionType,
|
|
113
113
|
display: display,
|
|
114
|
-
extensionKey: extensionKey,
|
|
114
|
+
extensionKey: extensionKey || '',
|
|
115
115
|
duration: measure.duration,
|
|
116
116
|
reason: reason
|
|
117
117
|
})
|
|
@@ -182,27 +182,31 @@ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(di
|
|
|
182
182
|
})
|
|
183
183
|
};
|
|
184
184
|
};
|
|
185
|
-
export var uiCardClickedEvent = function uiCardClickedEvent(display, definitionId, extensionKey, isModifierKeyPressed) {
|
|
185
|
+
export var uiCardClickedEvent = function uiCardClickedEvent(id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct) {
|
|
186
186
|
return {
|
|
187
187
|
action: 'clicked',
|
|
188
188
|
actionSubject: 'smartLink',
|
|
189
189
|
eventType: 'ui',
|
|
190
190
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
191
|
+
id: id,
|
|
192
|
+
status: status,
|
|
191
193
|
definitionId: definitionId || '',
|
|
192
194
|
extensionKey: extensionKey || '',
|
|
193
195
|
display: display,
|
|
194
|
-
isModifierKeyPressed: isModifierKeyPressed
|
|
196
|
+
isModifierKeyPressed: isModifierKeyPressed,
|
|
197
|
+
location: location,
|
|
198
|
+
destinationProduct: destinationProduct
|
|
195
199
|
})
|
|
196
200
|
};
|
|
197
201
|
};
|
|
198
|
-
export var uiActionClickedEvent = function uiActionClickedEvent(
|
|
202
|
+
export var uiActionClickedEvent = function uiActionClickedEvent(actionType, extensionKey, display) {
|
|
199
203
|
return {
|
|
200
204
|
action: 'clicked',
|
|
201
205
|
actionSubject: 'smartLinkAction',
|
|
202
206
|
eventType: 'ui',
|
|
203
207
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
204
208
|
display: display,
|
|
205
|
-
extensionKey: extensionKey,
|
|
209
|
+
extensionKey: extensionKey || '',
|
|
206
210
|
actionType: actionType
|
|
207
211
|
})
|
|
208
212
|
};
|
|
@@ -229,12 +233,13 @@ export var screenAuthPopupEvent = function screenAuthPopupEvent(definitionId, ex
|
|
|
229
233
|
})
|
|
230
234
|
};
|
|
231
235
|
};
|
|
232
|
-
export var uiRenderSuccessEvent = function uiRenderSuccessEvent(display, definitionId, extensionKey) {
|
|
236
|
+
export var uiRenderSuccessEvent = function uiRenderSuccessEvent(display, status, definitionId, extensionKey) {
|
|
233
237
|
return {
|
|
234
238
|
action: 'renderSuccess',
|
|
235
239
|
actionSubject: 'smartLink',
|
|
236
240
|
eventType: 'ui',
|
|
237
241
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
242
|
+
status: status,
|
|
238
243
|
definitionId: definitionId || '',
|
|
239
244
|
extensionKey: extensionKey || '',
|
|
240
245
|
display: display
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/version.json
CHANGED
|
@@ -32,6 +32,7 @@ export var CardWithDataRenderer = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
32
32
|
key: "render",
|
|
33
33
|
value: function render() {
|
|
34
34
|
var _this$props = this.props,
|
|
35
|
+
id = _this$props.id,
|
|
35
36
|
appearance = _this$props.appearance,
|
|
36
37
|
data = _this$props.data,
|
|
37
38
|
isSelected = _this$props.isSelected,
|
|
@@ -47,6 +48,7 @@ export var CardWithDataRenderer = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
47
48
|
|
|
48
49
|
if (CardWithDataRenderer.CardContent) {
|
|
49
50
|
return /*#__PURE__*/React.createElement(CardWithDataRenderer.CardContent, {
|
|
51
|
+
id: id,
|
|
50
52
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
51
53
|
appearance: appearance,
|
|
52
54
|
data: data,
|
|
@@ -26,17 +26,19 @@ export function CardWithUrlContent(_ref) {
|
|
|
26
26
|
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
27
27
|
ui = _ref.ui,
|
|
28
28
|
children = _ref.children,
|
|
29
|
-
showHoverPreview = _ref.showHoverPreview
|
|
29
|
+
showHoverPreview = _ref.showHoverPreview,
|
|
30
|
+
analyticsEvents = _ref.analyticsEvents;
|
|
30
31
|
|
|
31
32
|
// Get state, actions for this card.
|
|
32
33
|
var _useSmartLink = useSmartLink(id, url, dispatchAnalytics),
|
|
33
34
|
state = _useSmartLink.state,
|
|
34
35
|
actions = _useSmartLink.actions,
|
|
36
|
+
defaultAnalytics = _useSmartLink.analytics,
|
|
35
37
|
config = _useSmartLink.config,
|
|
36
|
-
analytics = _useSmartLink.analytics,
|
|
37
38
|
renderers = _useSmartLink.renderers,
|
|
38
39
|
error = _useSmartLink.error;
|
|
39
40
|
|
|
41
|
+
var analytics = analyticsEvents || defaultAnalytics;
|
|
40
42
|
var definitionId = getDefinitionId(state.details);
|
|
41
43
|
var extensionKey = getExtensionKey(state.details);
|
|
42
44
|
var resourceType = getResourceType(state.details);
|
|
@@ -50,17 +52,15 @@ export function CardWithUrlContent(_ref) {
|
|
|
50
52
|
isSpecialEvent(event) ? window.open(clickUrl, '_blank') : window.open(clickUrl, '_self');
|
|
51
53
|
}, [state.details, url]);
|
|
52
54
|
var handleClickWrapper = useCallback(function (event) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
analytics.ui.cardClickedEvent(isFlexibleUi ? 'flexible' : appearance, definitionId, extensionKey, isModifierKeyPressed);
|
|
56
|
-
}
|
|
55
|
+
var isModifierKeyPressed = isSpecialEvent(event);
|
|
56
|
+
analytics.ui.cardClickedEvent(id, isFlexibleUi ? 'flexible' : appearance, state.status, definitionId, extensionKey, isModifierKeyPressed);
|
|
57
57
|
|
|
58
58
|
if (onClick) {
|
|
59
59
|
onClick(event);
|
|
60
60
|
} else if (!isFlexibleUi) {
|
|
61
61
|
handleClick(event);
|
|
62
62
|
}
|
|
63
|
-
}, [state.status, analytics.ui, appearance, definitionId, extensionKey, onClick, handleClick, isFlexibleUi]);
|
|
63
|
+
}, [id, state.status, analytics.ui, appearance, definitionId, extensionKey, onClick, handleClick, isFlexibleUi]);
|
|
64
64
|
var handleAuthorize = useCallback(function () {
|
|
65
65
|
return actions.authorize(appearance);
|
|
66
66
|
}, [actions, appearance]);
|
|
@@ -86,7 +86,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
86
86
|
|
|
87
87
|
useEffect(function () {
|
|
88
88
|
if (isFinalState(state.status)) {
|
|
89
|
-
analytics.ui.renderSuccessEvent(appearance, id, definitionId, extensionKey);
|
|
89
|
+
analytics.ui.renderSuccessEvent(appearance, state.status, id, definitionId, extensionKey);
|
|
90
90
|
}
|
|
91
91
|
}, [appearance, state.details, state.status, url, definitionId, extensionKey, analytics.ui, id]);
|
|
92
92
|
|
|
@@ -104,6 +104,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
107
|
+
id: id,
|
|
107
108
|
cardState: cardState,
|
|
108
109
|
onAuthorize: services.length && handleAuthorize || undefined,
|
|
109
110
|
onClick: handleClickWrapper,
|
|
@@ -123,6 +124,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
123
124
|
switch (appearance) {
|
|
124
125
|
case 'inline':
|
|
125
126
|
return /*#__PURE__*/React.createElement(InlineCard, {
|
|
127
|
+
id: id,
|
|
126
128
|
url: url,
|
|
127
129
|
renderers: renderers,
|
|
128
130
|
cardState: state,
|
|
@@ -137,6 +139,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
137
139
|
|
|
138
140
|
case 'block':
|
|
139
141
|
return /*#__PURE__*/React.createElement(BlockCard, {
|
|
142
|
+
id: id,
|
|
140
143
|
url: url,
|
|
141
144
|
renderers: renderers,
|
|
142
145
|
authFlow: config && config.authFlow,
|
|
@@ -155,6 +158,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
155
158
|
|
|
156
159
|
case 'embed':
|
|
157
160
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|
|
161
|
+
id: id,
|
|
158
162
|
url: url,
|
|
159
163
|
cardState: state,
|
|
160
164
|
handleAuthorize: services.length && handleAuthorize || undefined,
|
|
@@ -13,7 +13,7 @@ var LazyCardWithUrlContent = /*#__PURE__*/lazy(function () {
|
|
|
13
13
|
});
|
|
14
14
|
export function CardWithURLRenderer(props) {
|
|
15
15
|
var _useState = useState(function () {
|
|
16
|
-
return uuid();
|
|
16
|
+
return props.id ? props.id : uuid();
|
|
17
17
|
}),
|
|
18
18
|
_useState2 = _slicedToArray(_useState, 1),
|
|
19
19
|
id = _useState2[0];
|
|
@@ -41,7 +41,8 @@ export function CardWithURLRenderer(props) {
|
|
|
41
41
|
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
42
42
|
children = props.children,
|
|
43
43
|
ui = props.ui,
|
|
44
|
-
showHoverPreview = props.showHoverPreview
|
|
44
|
+
showHoverPreview = props.showHoverPreview,
|
|
45
|
+
analyticsEvents = props.analyticsEvents; // Wrapper around analytics.
|
|
45
46
|
|
|
46
47
|
var dispatchAnalytics = useCallback(function (analyticsPayload) {
|
|
47
48
|
if (analyticsPayload && analyticsPayload.attributes) {
|
|
@@ -98,7 +99,8 @@ export function CardWithURLRenderer(props) {
|
|
|
98
99
|
embedIframeRef: embedIframeRef,
|
|
99
100
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
100
101
|
ui: ui,
|
|
101
|
-
showHoverPreview: showHoverPreview
|
|
102
|
+
showHoverPreview: showHoverPreview,
|
|
103
|
+
analyticsEvents: analyticsEvents
|
|
102
104
|
};
|
|
103
105
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
104
106
|
FallbackComponent: ErrorFallback,
|
|
@@ -21,6 +21,7 @@ import { getSimulatedMetadata } from './utils';
|
|
|
21
21
|
import extractPreview from '../../extractors/flexible/extract-preview';
|
|
22
22
|
export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
23
23
|
var children = _ref.children,
|
|
24
|
+
id = _ref.id,
|
|
24
25
|
url = _ref.url,
|
|
25
26
|
createAnalyticsEvent = _ref.createAnalyticsEvent;
|
|
26
27
|
var analyticsHandler = useCallback(function (analyticsPayload) {
|
|
@@ -37,7 +38,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
37
38
|
var fadeInTimeoutId = useRef();
|
|
38
39
|
var cardOpenTime = useRef();
|
|
39
40
|
var linkState = useLinkState(url);
|
|
40
|
-
var analytics = useSmartLinkAnalytics(analyticsHandler);
|
|
41
|
+
var analytics = useSmartLinkAnalytics(url, analyticsHandler, id);
|
|
41
42
|
var extensionKey = useMemo(function () {
|
|
42
43
|
return getExtensionKey(linkState.details);
|
|
43
44
|
}, [linkState]);
|
|
@@ -120,6 +121,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
120
121
|
onMouseLeave: initHideCard,
|
|
121
122
|
css: HoverCardContainer
|
|
122
123
|
}, jsx(Card, {
|
|
124
|
+
id: id,
|
|
123
125
|
appearance: "block",
|
|
124
126
|
url: url,
|
|
125
127
|
ui: {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export var getSimulatedMetadata = function getSimulatedMetadata(
|
|
1
|
+
export var getSimulatedMetadata = function getSimulatedMetadata() {
|
|
2
|
+
var extensionKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
3
|
+
|
|
2
4
|
switch (extensionKey) {
|
|
3
5
|
case 'confluence-object-provider':
|
|
4
6
|
return {
|
|
@@ -43,6 +43,7 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
43
43
|
key: "render",
|
|
44
44
|
value: function render() {
|
|
45
45
|
var _this$props = this.props,
|
|
46
|
+
id = _this$props.id,
|
|
46
47
|
_this$props$title = _this$props.title,
|
|
47
48
|
title = _this$props$title === void 0 ? '' : _this$props$title,
|
|
48
49
|
isSelected = _this$props.isSelected,
|
|
@@ -69,6 +70,7 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
69
70
|
|
|
70
71
|
if (showHoverPreview && link) {
|
|
71
72
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
73
|
+
id: id,
|
|
72
74
|
url: link
|
|
73
75
|
}, inlineCardResolvedView);
|
|
74
76
|
}
|
|
@@ -13,7 +13,8 @@ export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView,
|
|
|
13
13
|
export var InlineCard = function InlineCard(_ref) {
|
|
14
14
|
var _details$meta;
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var id = _ref.id,
|
|
17
|
+
url = _ref.url,
|
|
17
18
|
cardState = _ref.cardState,
|
|
18
19
|
handleAuthorize = _ref.handleAuthorize,
|
|
19
20
|
handleFrameClick = _ref.handleFrameClick,
|
|
@@ -50,6 +51,7 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
return /*#__PURE__*/React.createElement(InlineCardResolvedView, _extends({}, resolvedProps, {
|
|
54
|
+
id: id,
|
|
53
55
|
showHoverPreview: showHoverPreview,
|
|
54
56
|
link: url,
|
|
55
57
|
isSelected: isSelected,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
export declare type ResolveResponse = JsonLd.Response;
|
|
3
|
-
export { SmartCardProvider as Provider, SmartCardContext } from './state';
|
|
3
|
+
export { SmartCardProvider as Provider, SmartCardContext, useSmartLinkAnalytics, } from './state';
|
|
4
4
|
export type { ProviderProps, CardType } from './state';
|
|
5
5
|
export { EditorCardProvider, editorCardProvider, } from '@atlaskit/link-provider';
|
|
6
6
|
export type { CardAdf, InlineCardAdf, BlockCardAdf, EmbedCardAdf, } from '@atlaskit/linking-common';
|
|
@@ -3,31 +3,164 @@ import { AnalyticsHandler } from '../../utils/types';
|
|
|
3
3
|
import { CardInnerAppearance } from '../../view/Card/types';
|
|
4
4
|
import { PreviewDisplay, PreviewInvokeMethod } from '../../view/HoverCard/types';
|
|
5
5
|
import { InvokeType } from '../../model/invoke-opts';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
8
|
+
* Can be provided to Card via the analyticsEvents prop to change the analytics events.
|
|
9
|
+
* @param url URL of the link
|
|
10
|
+
* @param dispatchAnalytics dispatchAnalytics function
|
|
11
|
+
* @param id fallback id of the events sent if no id is available
|
|
12
|
+
* @param defaultLocation location attribute to be used
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const useSmartLinkAnalytics: (url: string, dispatchAnalytics: AnalyticsHandler, id?: string | undefined, defaultLocation?: string | undefined) => {
|
|
7
16
|
ui: {
|
|
17
|
+
/**
|
|
18
|
+
* This fires an event that represents when a user clicks on the authentication
|
|
19
|
+
* call to action with no current authenticated account. (i.e. Connect to Preview).
|
|
20
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
21
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
22
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
8
25
|
authEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
26
|
+
/**
|
|
27
|
+
* This fires an event that represents when a user clicks on the authentication
|
|
28
|
+
* call to action with a forbidden authenticated account. (i.e. Try another account).
|
|
29
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
30
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
31
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
9
34
|
authAlternateAccountEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
10
|
-
|
|
11
|
-
|
|
35
|
+
/**
|
|
36
|
+
* This fires an event that represents when a user clicks on a Smart Link.
|
|
37
|
+
* @param id The unique ID for this Smart Link.
|
|
38
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
39
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
40
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
41
|
+
* @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
|
|
42
|
+
* @param location Where the Smart Link is currently rendered.
|
|
43
|
+
* @param destinationProduct The product the Smart Link is linked to.
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
cardClickedEvent: (id: string | undefined, display: CardInnerAppearance, status: CardType, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined, location?: string | undefined, destinationProduct?: string | undefined) => void;
|
|
47
|
+
/**
|
|
48
|
+
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
49
|
+
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
50
|
+
* @param id The unique ID for this Smart Link.
|
|
51
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
52
|
+
* @param actionType The type of the action that was clicked, e.g. PreviewAction
|
|
53
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
54
|
+
* @param invokeType Whether the action invoked made a call to a server.
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
actionClickedEvent: (id: string | undefined, extensionKey: string | undefined, actionType: string, display: CardInnerAppearance, invokeType: InvokeType) => void;
|
|
58
|
+
/**
|
|
59
|
+
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
60
|
+
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
61
|
+
* @param previewDisplay What format the preview is in.
|
|
62
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
63
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
64
|
+
* @param previewInvokeMethod How the preview was triggered.
|
|
65
|
+
*/
|
|
12
66
|
hoverCardOpenLinkClickedEvent: (previewDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
67
|
+
/**
|
|
68
|
+
* This fires an event that represents when a user closed the authentication window without authenticating after opening it.
|
|
69
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
70
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
71
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
13
74
|
closedAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
14
|
-
|
|
75
|
+
/**
|
|
76
|
+
* This fires an event that represents when a Smart Link was rendered successfully.
|
|
77
|
+
* Note: this fires even if the Smart Link request errored out.
|
|
78
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
79
|
+
* @param id The unique ID for this Smart Link.
|
|
80
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
81
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
82
|
+
*/
|
|
83
|
+
renderSuccessEvent: (display: CardInnerAppearance, status: CardType, id?: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
84
|
+
/**
|
|
85
|
+
* This fires an event that represents a hover preview being opened.
|
|
86
|
+
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
87
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
88
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
89
|
+
* @param previewInvokeMethod How the preview was triggered.
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
15
92
|
hoverCardViewedEvent: (hoverDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
93
|
+
/**
|
|
94
|
+
* This fires an event that represents a hover preview being dismissed.
|
|
95
|
+
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
96
|
+
* @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
|
|
97
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
98
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
99
|
+
* @param previewInvokeMethod How the preview was triggered.
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
16
102
|
hoverCardDismissedEvent: (hoverDisplay: PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
17
103
|
};
|
|
18
104
|
operational: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
105
|
+
/**
|
|
106
|
+
* This fires an event that represents an action being successfully invoked.
|
|
107
|
+
* @param id The unique ID for this Smart Link.
|
|
108
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
109
|
+
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
110
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
111
|
+
*/
|
|
112
|
+
invokeSucceededEvent: (id: string | undefined, extensionKey: string | undefined, actionType: string, display: CardInnerAppearance) => void;
|
|
113
|
+
/**
|
|
114
|
+
* This fires an event that represents an action being unsuccessfully invoked.
|
|
115
|
+
* @param id The unique ID for this Smart Link.
|
|
116
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
117
|
+
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
118
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
119
|
+
* @param reason The reason the invocation failed.
|
|
120
|
+
*/
|
|
121
|
+
invokeFailedEvent: (id: string | undefined, providerKey: string | undefined, actionType: string, display: CardInnerAppearance, reason: string) => void;
|
|
122
|
+
/**
|
|
123
|
+
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
124
|
+
* @param id The unique ID for this Smart Link.
|
|
125
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
126
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
127
|
+
*/
|
|
128
|
+
connectSucceededEvent: (id?: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
129
|
+
/**
|
|
130
|
+
* This fires an event that represents an account unsuccessfully being connected.
|
|
131
|
+
* @param id The unique ID for this Smart Link.
|
|
132
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
133
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
134
|
+
* @param reason The reason why the Smart Link connect account failed.
|
|
135
|
+
*/
|
|
136
|
+
connectFailedEvent: (id?: string, definitionId?: string | undefined, extensionKey?: string | undefined, reason?: string | undefined) => void;
|
|
137
|
+
/**
|
|
138
|
+
* This fires an event which represents a Smart Link request succeeding or failing based on the status.
|
|
139
|
+
* @param id The unique ID for this Smart Link.
|
|
140
|
+
* @param status The status of the Smart Link.
|
|
141
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
142
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
143
|
+
* @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
|
|
144
|
+
* @param error An error representing why the Smart Link request failed.
|
|
145
|
+
*/
|
|
146
|
+
instrument: (id: string | undefined, status: CardType, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined, error?: APIError | undefined) => void;
|
|
26
147
|
};
|
|
27
148
|
track: {
|
|
149
|
+
/**
|
|
150
|
+
* This fires an event which represents a user starting the Smart Link connect account process.
|
|
151
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
152
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
153
|
+
* @returns
|
|
154
|
+
*/
|
|
28
155
|
appAccountConnected: (definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
29
156
|
};
|
|
30
157
|
screen: {
|
|
158
|
+
/**
|
|
159
|
+
* This fires an event which represents the connect account page being opened.
|
|
160
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
161
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
162
|
+
* @returns
|
|
163
|
+
*/
|
|
31
164
|
authPopupEvent: (definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
32
165
|
};
|
|
33
166
|
};
|
|
@@ -2,8 +2,8 @@ import { JsonLd } from 'json-ld-types';
|
|
|
2
2
|
import { CardType, CardStore } from '@atlaskit/linking-common';
|
|
3
3
|
export declare const getByDefinitionId: (definitionId: string | undefined, store: CardStore) => string[];
|
|
4
4
|
export declare const getClickUrl: (url: string, jsonLd?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string;
|
|
5
|
-
export declare const getDefinitionId: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) =>
|
|
6
|
-
export declare const getExtensionKey: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) =>
|
|
5
|
+
export declare const getDefinitionId: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string | undefined;
|
|
6
|
+
export declare const getExtensionKey: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string | undefined;
|
|
7
7
|
export declare const getResourceType: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => string | undefined;
|
|
8
8
|
export declare const getServices: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => JsonLd.Primitives.AuthService[];
|
|
9
9
|
export declare const hasResolved: (details?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => boolean | undefined;
|
|
@@ -12,22 +12,20 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
|
|
|
12
12
|
ui: {
|
|
13
13
|
authEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
14
14
|
authAlternateAccountEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
15
|
-
cardClickedEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined) => void;
|
|
16
|
-
actionClickedEvent: (id: string, extensionKey: string, actionType: string, display: import("../../view/Card/types").CardInnerAppearance, invokeType: import("../../model/invoke-opts").InvokeType) => void;
|
|
15
|
+
cardClickedEvent: (id: string | undefined, display: import("../../view/Card/types").CardInnerAppearance, status: import("@atlaskit/linking-common/types").CardType, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined, location?: string | undefined, destinationProduct?: string | undefined) => void;
|
|
16
|
+
actionClickedEvent: (id: string | undefined, extensionKey: string | undefined, actionType: string, display: import("../../view/Card/types").CardInnerAppearance, invokeType: import("../../model/invoke-opts").InvokeType) => void;
|
|
17
17
|
hoverCardOpenLinkClickedEvent: (previewDisplay: import("../../view/HoverCard/types").PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
18
18
|
closedAuthEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
19
|
-
renderSuccessEvent: (display: import("../../view/Card/types").CardInnerAppearance,
|
|
19
|
+
renderSuccessEvent: (display: import("../../view/Card/types").CardInnerAppearance, status: import("@atlaskit/linking-common/types").CardType, id?: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
20
20
|
hoverCardViewedEvent: (hoverDisplay: import("../../view/HoverCard/types").PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
21
21
|
hoverCardDismissedEvent: (hoverDisplay: import("../../view/HoverCard/types").PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
22
22
|
};
|
|
23
23
|
operational: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
connectFailedEvent: (id: string, definitionId?: string | undefined, extensionKey?: string | undefined, status?: string | undefined) => void;
|
|
30
|
-
instrument: (id: string, status: import("@atlaskit/linking-common/types").CardType, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined, error?: import("@atlaskit/linking-common").APIError | undefined) => void;
|
|
24
|
+
invokeSucceededEvent: (id: string | undefined, extensionKey: string | undefined, actionType: string, display: import("../../view/Card/types").CardInnerAppearance) => void;
|
|
25
|
+
invokeFailedEvent: (id: string | undefined, providerKey: string | undefined, actionType: string, display: import("../../view/Card/types").CardInnerAppearance, reason: string) => void;
|
|
26
|
+
connectSucceededEvent: (id?: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
27
|
+
connectFailedEvent: (id?: string, definitionId?: string | undefined, extensionKey?: string | undefined, reason?: string | undefined) => void;
|
|
28
|
+
instrument: (id: string | undefined, status: import("@atlaskit/linking-common/types").CardType, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined, error?: import("@atlaskit/linking-common").APIError | undefined) => void;
|
|
31
29
|
};
|
|
32
30
|
track: {
|
|
33
31
|
appAccountConnected: (definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
@@ -2,3 +2,4 @@ export { SmartCardContext, SmartCardProvider, useSmartLinkContext, } from '@atla
|
|
|
2
2
|
export type { CardContext, ProviderProps } from '@atlaskit/link-provider';
|
|
3
3
|
export type { CardType } from '@atlaskit/linking-common';
|
|
4
4
|
export { useSmartLink, usePrefetch } from './hooks';
|
|
5
|
+
export { useSmartLinkAnalytics } from './analytics';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { APIError } from '@atlaskit/linking-common';
|
|
2
|
+
import { APIError, CardType } from '@atlaskit/linking-common';
|
|
3
3
|
import { AnalyticsPayload } from '../types';
|
|
4
4
|
import { ErrorInfo } from 'react';
|
|
5
5
|
import { CardInnerAppearance } from '../../view/Card/types';
|
|
@@ -16,18 +16,18 @@ export declare class SmartLinkEvents {
|
|
|
16
16
|
export declare const fireSmartLinkEvent: (payload: AnalyticsPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined) => void;
|
|
17
17
|
export declare const resolvedEvent: (id: string, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined) => AnalyticsPayload;
|
|
18
18
|
export declare const unresolvedEvent: (id: string, status: string, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined, error?: APIError | undefined) => AnalyticsPayload;
|
|
19
|
-
export declare const invokeSucceededEvent: (id: string,
|
|
20
|
-
export declare const invokeFailedEvent: (id: string,
|
|
19
|
+
export declare const invokeSucceededEvent: (id: string, actionType: string, display: CardInnerAppearance, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
20
|
+
export declare const invokeFailedEvent: (id: string, actionType: string, display: CardInnerAppearance, reason: string, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
21
21
|
export declare const connectSucceededEvent: (definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
22
22
|
export declare const connectFailedEvent: (definitionId?: string | undefined, extensionKey?: string | undefined, reason?: string | undefined) => AnalyticsPayload;
|
|
23
23
|
export declare const trackAppAccountConnected: (definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
24
24
|
export declare const uiAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
25
25
|
export declare const uiAuthAlternateAccountEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
26
|
-
export declare const uiCardClickedEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined) => AnalyticsPayload;
|
|
27
|
-
export declare const uiActionClickedEvent: (
|
|
26
|
+
export declare const uiCardClickedEvent: (id: string, display: CardInnerAppearance, status: CardType, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined, location?: string | undefined, destinationProduct?: string | undefined) => AnalyticsPayload;
|
|
27
|
+
export declare const uiActionClickedEvent: (actionType: string, extensionKey?: string | undefined, display?: CardInnerAppearance | undefined) => AnalyticsPayload;
|
|
28
28
|
export declare const uiClosedAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
29
29
|
export declare const screenAuthPopupEvent: (definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
30
|
-
export declare const uiRenderSuccessEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
30
|
+
export declare const uiRenderSuccessEvent: (display: CardInnerAppearance, status: CardType, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
31
31
|
export declare const uiRenderFailedEvent: (display: CardInnerAppearance, error: Error, errorInfo: ErrorInfo) => AnalyticsPayload;
|
|
32
32
|
export declare const uiHoverCardViewedEvent: (hoverDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
33
33
|
export declare const uiHoverCardDismissedEvent: (hoverDisplay: PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
@@ -3,6 +3,6 @@ export declare const getMarkName: (id: string, status: CardType) => string;
|
|
|
3
3
|
export declare const getMeasureName: (id: string, status: CardType) => string;
|
|
4
4
|
export declare const clearMarks: (id: string) => void;
|
|
5
5
|
export declare const clearMeasures: (id: string) => void;
|
|
6
|
-
export declare const getMeasure: (id: string, status: CardType) =>
|
|
6
|
+
export declare const getMeasure: (id: string, status: CardType) => PerformanceEntry | undefined;
|
|
7
7
|
export declare const mark: (id: string, status: CardType) => void;
|
|
8
8
|
export declare const create: (id: string, status: CardType) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import { CardInnerAppearance } from '../view/Card/types';
|
|
3
|
-
export declare type AnalyticsAction = 'resolved' | 'unresolved' | 'connectSucceeded' | 'connectFailed' | 'connected' | 'clicked' | 'closed' | 'renderFailed' | 'renderWithStatus' | 'renderSuccess' | 'inserted' | 'viewed' | 'dismissed';
|
|
3
|
+
export declare type AnalyticsAction = 'resolved' | 'unresolved' | 'connectSucceeded' | 'connectFailed' | 'connected' | 'clicked' | 'closed' | 'renderFailed' | 'renderWithStatus' | 'renderSuccess' | 'inserted' | 'viewed' | 'dismissed' | 'created';
|
|
4
4
|
export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard';
|
|
5
5
|
export declare type AnalyticsPayload = GasPayload & {
|
|
6
6
|
action?: AnalyticsAction;
|
|
@@ -5,6 +5,7 @@ import { InvokeHandler } from '../../model/invoke-handler';
|
|
|
5
5
|
import { AnalyticsHandler } from '../../utils/types';
|
|
6
6
|
import { OnResolveCallback, CardPlatform } from '../Card/types';
|
|
7
7
|
export declare type BlockCardProps = {
|
|
8
|
+
id: string;
|
|
8
9
|
url: string;
|
|
9
10
|
cardState: CardState;
|
|
10
11
|
authFlow?: CardAuthFlowOpts['authFlow'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "data" | "appearance" | "testId" | "isSelected" | "inheritDimensions" | "onClick" | "analyticsContext" | "key" | "url" | "ui" | "showActions" | "onResolve" | "platform" | "isFrameVisible" | "embedIframeRef" | "forwardedRef" | "importer" | "container" | "inlinePreloaderStyle" | "showHoverPreview"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "data" | "appearance" | "testId" | "isSelected" | "inheritDimensions" | "id" | "onClick" | "analyticsContext" | "key" | "url" | "ui" | "showActions" | "onResolve" | "platform" | "isFrameVisible" | "embedIframeRef" | "forwardedRef" | "importer" | "container" | "inlinePreloaderStyle" | "showHoverPreview" | "analyticsEvents"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|