@atlaskit/smart-card 19.1.13 → 19.1.16
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 +67 -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 +257 -36
- 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 +26 -14
- 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/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/cjs/view/HoverCard/index.js +5 -3
- 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 +26 -14
- 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/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/es2019/view/HoverCard/index.js +5 -3
- 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 +256 -37
- 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 +26 -14
- 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/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/esm/view/HoverCard/index.js +5 -3
- 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 +146 -13
- package/dist/types/state/helpers.d.ts +2 -2
- package/dist/types/state/hooks/useSmartLink.d.ts +10 -12
- package/dist/types/state/index.d.ts +1 -0
- package/dist/types/utils/analytics/analytics.d.ts +8 -8
- 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/components/elements/date-time/types.d.ts +4 -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
|
@@ -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,
|
|
@@ -35,7 +35,8 @@ var DateTime = function DateTime(_ref) {
|
|
|
35
35
|
overrideCss = _ref.overrideCss,
|
|
36
36
|
type = _ref.type,
|
|
37
37
|
_ref$testId = _ref.testId,
|
|
38
|
-
testId = _ref$testId === void 0 ? 'smart-element-date-time' : _ref$testId
|
|
38
|
+
testId = _ref$testId === void 0 ? 'smart-element-date-time' : _ref$testId,
|
|
39
|
+
text = _ref.text;
|
|
39
40
|
|
|
40
41
|
var _useIntl = useIntl(),
|
|
41
42
|
formatRelativeTime = _useIntl.formatRelativeTime,
|
|
@@ -72,7 +73,7 @@ var DateTime = function DateTime(_ref) {
|
|
|
72
73
|
"data-separator": true,
|
|
73
74
|
"data-smart-element-date-time": true,
|
|
74
75
|
"data-testid": testId
|
|
75
|
-
}, jsx(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
76
|
+
}, text ? "".concat(text, " ").concat(context) : jsx(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
76
77
|
values: {
|
|
77
78
|
context: context
|
|
78
79
|
}
|
|
@@ -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]);
|
|
@@ -53,7 +54,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
53
54
|
//Check its previously open to avoid firing events when moving between the child and hover card components
|
|
54
55
|
if (isOpen === true && cardOpenTime.current) {
|
|
55
56
|
var hoverTime = Date.now() - cardOpenTime.current;
|
|
56
|
-
analytics.ui.hoverCardDismissedEvent('card', hoverTime, definitionId, extensionKey);
|
|
57
|
+
analytics.ui.hoverCardDismissedEvent('card', hoverTime, definitionId, extensionKey, 'mouse_hover');
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
setIsOpen(false);
|
|
@@ -68,7 +69,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
68
69
|
//Check if its previously closed to avoid firing events when moving between the child and hover card components
|
|
69
70
|
if (isOpen === false) {
|
|
70
71
|
cardOpenTime.current = Date.now();
|
|
71
|
-
analytics.ui.hoverCardViewedEvent('card', definitionId, extensionKey);
|
|
72
|
+
analytics.ui.hoverCardViewedEvent('card', definitionId, extensionKey, 'mouse_hover');
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
setIsOpen(true);
|
|
@@ -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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
*/
|
|
92
|
+
hoverCardViewedEvent: (previewDisplay: 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
|
+
*/
|
|
102
|
+
hoverCardDismissedEvent: (previewDisplay: 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,
|
|
20
|
-
hoverCardViewedEvent: (
|
|
21
|
-
hoverCardDismissedEvent: (
|
|
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
|
+
hoverCardViewedEvent: (previewDisplay: import("../../view/HoverCard/types").PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
21
|
+
hoverCardDismissedEvent: (previewDisplay: 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,19 +16,19 @@ 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
|
-
export declare const uiHoverCardViewedEvent: (
|
|
33
|
-
export declare const uiHoverCardDismissedEvent: (
|
|
32
|
+
export declare const uiHoverCardViewedEvent: (previewDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
33
|
+
export declare const uiHoverCardDismissedEvent: (previewDisplay: PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
34
34
|
export declare const uiHoverCardOpenLinkClickedEvent: (previewDisplay: string, 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 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
import { CardAppearance, CardPlatform } from '@atlaskit/linking-common';
|
|
4
|
+
import { AnalyticsFacade } from '../../state/analytics';
|
|
4
5
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
5
6
|
import { InlinePreloaderStyle } from '../types';
|
|
6
7
|
export type { CardAppearance, CardPlatform };
|
|
@@ -12,6 +13,7 @@ export declare type OnResolveCallback = (data: {
|
|
|
12
13
|
}) => void;
|
|
13
14
|
export interface CardProps extends WithAnalyticsEventsProps {
|
|
14
15
|
appearance: CardAppearance;
|
|
16
|
+
id?: string;
|
|
15
17
|
platform?: CardPlatform;
|
|
16
18
|
isSelected?: boolean;
|
|
17
19
|
isFrameVisible?: boolean;
|
|
@@ -29,4 +31,5 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
29
31
|
ui?: FlexibleUiOptions;
|
|
30
32
|
children?: React.ReactNode;
|
|
31
33
|
showHoverPreview?: boolean;
|
|
34
|
+
analyticsEvents?: AnalyticsFacade;
|
|
32
35
|
}
|
|
@@ -3,6 +3,7 @@ import { CardAppearance, OnResolveCallback } from '../Card/types';
|
|
|
3
3
|
import { JsonLd } from 'json-ld-types';
|
|
4
4
|
import { InlinePreloaderStyle } from '../types';
|
|
5
5
|
export interface CardWithDataContentProps {
|
|
6
|
+
id?: string;
|
|
6
7
|
appearance: CardAppearance;
|
|
7
8
|
data: JsonLd.Data.BaseData;
|
|
8
9
|
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from './types';
|
|
3
|
-
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, }: CardWithUrlContentProps): JSX.Element;
|
|
3
|
+
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { CardAppearance, CardPlatform, OnResolveCallback } from '../Card/types';
|
|
|
3
3
|
import { AnalyticsHandler } from '../../utils/types';
|
|
4
4
|
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
5
5
|
import { InlinePreloaderStyle } from '../types';
|
|
6
|
+
import { AnalyticsFacade } from '../../state/analytics';
|
|
6
7
|
export declare type CardWithUrlContentProps = {
|
|
7
8
|
id: string;
|
|
8
9
|
url: string;
|
|
@@ -22,4 +23,5 @@ export declare type CardWithUrlContentProps = {
|
|
|
22
23
|
ui?: FlexibleUiOptions;
|
|
23
24
|
children?: React.ReactNode;
|
|
24
25
|
showHoverPreview?: boolean;
|
|
26
|
+
analyticsEvents?: AnalyticsFacade;
|
|
25
27
|
};
|
|
@@ -13,6 +13,7 @@ export declare type EmbedCardProps = {
|
|
|
13
13
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
14
14
|
handleAnalytics: AnalyticsHandler;
|
|
15
15
|
handleInvoke: InvokeHandler;
|
|
16
|
+
id?: string;
|
|
16
17
|
isSelected?: boolean;
|
|
17
18
|
isFrameVisible?: boolean;
|
|
18
19
|
platform?: CardPlatform;
|
|
@@ -6,6 +6,10 @@ import { SmartLinkSize, SmartLinkTheme } from '../../constants';
|
|
|
6
6
|
import { CardAppearance } from '../../view/Card';
|
|
7
7
|
import { OnResolveCallback } from '../Card/types';
|
|
8
8
|
export declare type FlexibleCardProps = {
|
|
9
|
+
/**
|
|
10
|
+
* @internal A unique ID for a Smart Link.
|
|
11
|
+
*/
|
|
12
|
+
id?: string;
|
|
9
13
|
/**
|
|
10
14
|
* Determines the appearance of the Smart Link.
|
|
11
15
|
* @internal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { HoverCardProps } from './types';
|
|
3
3
|
export declare const HoverCardComponent: FC<HoverCardProps>;
|
|
4
|
-
export declare const HoverCard: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "analyticsContext" | "key" | "url"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const HoverCard: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "id" | "analyticsContext" | "key" | "url"> & React.RefAttributes<any>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
2
|
import { ElementItem } from '../FlexibleCard/components/blocks/types';
|
|
3
3
|
export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
4
|
+
id?: string;
|
|
4
5
|
url: string;
|
|
5
6
|
}
|
|
6
7
|
export declare type PreviewDisplay = 'card' | 'embed';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
export declare const getSimulatedMetadata: (extensionKey
|
|
2
|
+
export declare const getSimulatedMetadata: (extensionKey?: string) => JsonLd.Primitives.Property<any>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LozengeProps } from '../../../types';
|
|
3
3
|
export interface InlineCardResolvedViewProps {
|
|
4
|
+
/** A unique ID for a Smart Link. */
|
|
5
|
+
id?: string;
|
|
4
6
|
/** The optional con of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
5
7
|
icon?: React.ReactNode;
|
|
6
8
|
/** The name of the resource */
|
|
@@ -3,6 +3,7 @@ import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
3
3
|
import { CardState } from '../../state/types';
|
|
4
4
|
import { InlinePreloaderStyle } from '../types';
|
|
5
5
|
export declare type InlineCardProps = {
|
|
6
|
+
id: string;
|
|
6
7
|
url: string;
|
|
7
8
|
cardState: CardState;
|
|
8
9
|
handleAuthorize: (() => void) | undefined;
|