@atlaskit/smart-card 23.7.3 → 23.8.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/constants.js +14 -2
  3. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +3 -1
  4. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +41 -13
  5. package/dist/cjs/utils/analytics/analytics.js +128 -96
  6. package/dist/cjs/utils/analytics/index.js +12 -0
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +1 -1
  9. package/dist/cjs/view/BlockCard/index.js +4 -2
  10. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -1
  11. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -3
  12. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +17 -4
  13. package/dist/cjs/view/CardWithUrl/component.js +3 -1
  14. package/dist/cjs/view/EmbedCard/index.js +6 -2
  15. package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +21 -4
  16. package/dist/cjs/view/EmbedModal/components/analytics/index.js +4 -2
  17. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +14 -24
  18. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +61 -34
  19. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -1
  20. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +26 -7
  21. package/dist/cjs/view/HoverCard/index.js +6 -3
  22. package/dist/cjs/view/HoverCard/utils.js +1 -4
  23. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +2 -1
  24. package/dist/cjs/view/InlineCard/index.js +2 -1
  25. package/dist/cjs/view/common/UnauthorisedViewContent.js +14 -3
  26. package/dist/es2019/constants.js +12 -1
  27. package/dist/es2019/extractors/common/actions/extractPreviewAction.js +2 -1
  28. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +33 -8
  29. package/dist/es2019/utils/analytics/analytics.js +28 -4
  30. package/dist/es2019/utils/analytics/index.js +1 -1
  31. package/dist/es2019/version.json +1 -1
  32. package/dist/es2019/view/BlockCard/components/flexible/footer/index.js +1 -1
  33. package/dist/es2019/view/BlockCard/index.js +4 -2
  34. package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -1
  35. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +4 -4
  36. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +15 -3
  37. package/dist/es2019/view/CardWithUrl/component.js +2 -1
  38. package/dist/es2019/view/EmbedCard/index.js +6 -2
  39. package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +14 -3
  40. package/dist/es2019/view/EmbedModal/components/analytics/index.js +3 -2
  41. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +14 -20
  42. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +52 -30
  43. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -3
  44. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +23 -7
  45. package/dist/es2019/view/HoverCard/index.js +6 -3
  46. package/dist/es2019/view/HoverCard/utils.js +0 -1
  47. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +2 -1
  48. package/dist/es2019/view/InlineCard/index.js +2 -1
  49. package/dist/es2019/view/common/UnauthorisedViewContent.js +18 -11
  50. package/dist/esm/constants.js +12 -1
  51. package/dist/esm/extractors/common/actions/extractPreviewAction.js +2 -1
  52. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +42 -14
  53. package/dist/esm/utils/analytics/analytics.js +118 -92
  54. package/dist/esm/utils/analytics/index.js +1 -1
  55. package/dist/esm/version.json +1 -1
  56. package/dist/esm/view/BlockCard/components/flexible/footer/index.js +1 -1
  57. package/dist/esm/view/BlockCard/index.js +4 -2
  58. package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +1 -1
  59. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +4 -4
  60. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +18 -5
  61. package/dist/esm/view/CardWithUrl/component.js +2 -1
  62. package/dist/esm/view/EmbedCard/index.js +6 -2
  63. package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +15 -4
  64. package/dist/esm/view/EmbedModal/components/analytics/index.js +3 -2
  65. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +14 -22
  66. package/dist/esm/view/HoverCard/components/HoverCardContent.js +54 -30
  67. package/dist/esm/view/HoverCard/components/views/resolved/index.js +3 -3
  68. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +27 -9
  69. package/dist/esm/view/HoverCard/index.js +6 -3
  70. package/dist/esm/view/HoverCard/utils.js +0 -1
  71. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +2 -1
  72. package/dist/esm/view/InlineCard/index.js +2 -1
  73. package/dist/esm/view/common/UnauthorisedViewContent.js +8 -3
  74. package/dist/types/constants.d.ts +8 -0
  75. package/dist/types/state/actions/index.d.ts +1 -2
  76. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +17 -4
  77. package/dist/types/state/flexible-ui-context/index.d.ts +8 -4
  78. package/dist/types/state/hooks/useSmartLink.d.ts +5 -3
  79. package/dist/types/utils/analytics/analytics.d.ts +4 -2
  80. package/dist/types/utils/analytics/index.d.ts +1 -1
  81. package/dist/types/utils/analytics/types.d.ts +2 -0
  82. package/dist/types/utils/mocks.d.ts +4 -2
  83. package/dist/types/utils/types.d.ts +1 -1
  84. package/dist/types/view/BlockCard/components/flexible/footer/index.d.ts +1 -1
  85. package/dist/types/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +1 -1
  86. package/dist/types/view/BlockCard/views/flexible/types.d.ts +17 -13
  87. package/dist/types/view/Card/types.d.ts +1 -1
  88. package/dist/types/view/EmbedCard/views/UnauthorisedView.d.ts +3 -0
  89. package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +0 -1
  90. package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -0
  91. package/dist/types/view/HoverCard/components/views/unauthorised/types.d.ts +15 -4
  92. package/dist/types/view/HoverCard/types.d.ts +3 -3
  93. package/dist/types/view/HoverCard/utils.d.ts +0 -1
  94. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +2 -0
  95. package/dist/types/view/common/UnauthorisedViewContent.d.ts +7 -1
  96. package/package.json +5 -5
  97. package/report.api.md +15 -1
  98. package/tmp/api-report-tmp.d.ts +8 -4
@@ -9,15 +9,13 @@ import { useSmartLinkActions } from '../../../state/hooks-external/useSmartLinkA
9
9
  import { useSmartLinkRenderers } from '../../../state/renderers';
10
10
  import { useSmartCardState as useLinkState } from '../../../state/store';
11
11
  import HoverCardContent from '../components/HoverCardContent';
12
- import { HoverCardContainer, CARD_GAP_PX } from '../styled';
13
- import { SMART_CARD_ANALYTICS_DISPLAY } from '../utils';
14
- export var hoverCardClassName = 'smart-links-hover-preview';
12
+ import { CARD_GAP_PX } from '../styled';
13
+ import { CardDisplay } from '../../../constants';
15
14
  export var HoverCardComponent = function HoverCardComponent(_ref) {
16
15
  var children = _ref.children,
17
16
  url = _ref.url,
18
17
  analyticsHandler = _ref.analyticsHandler,
19
- analytics = _ref.analytics,
20
- onAuthorize = _ref.onAuthorize;
18
+ analytics = _ref.analytics;
21
19
  var delay = 300;
22
20
 
23
21
  var _React$useState = React.useState(false),
@@ -33,6 +31,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
33
31
  var parentSpan = useRef(null);
34
32
  var renderers = useSmartLinkRenderers();
35
33
  var linkState = useLinkState(url);
34
+ var linkStatus = linkState.status;
36
35
  var hoverDisplay = 'card';
37
36
  var invokeMethod = 'mouse_hover';
38
37
  var setMousePosition = useCallback(function (event) {
@@ -52,12 +51,13 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
52
51
  analytics.ui.hoverCardDismissedEvent({
53
52
  previewDisplay: 'card',
54
53
  hoverTime: hoverTime,
55
- previewInvokeMethod: 'mouse_hover'
54
+ previewInvokeMethod: 'mouse_hover',
55
+ status: linkStatus
56
56
  });
57
57
  }
58
58
 
59
59
  setIsOpen(false);
60
- }, [analytics.ui, isOpen]);
60
+ }, [analytics.ui, isOpen, linkStatus]);
61
61
  var initHideCard = useCallback(function () {
62
62
  if (fadeInTimeoutId.current) {
63
63
  clearTimeout(fadeInTimeoutId.current);
@@ -80,7 +80,8 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
80
80
  cardOpenTime.current = Date.now();
81
81
  analytics.ui.hoverCardViewedEvent({
82
82
  previewDisplay: hoverDisplay,
83
- previewInvokeMethod: invokeMethod
83
+ previewInvokeMethod: invokeMethod,
84
+ status: linkStatus
84
85
  });
85
86
  } //If these are undefined then popupOffset is undefined and we fallback to default bottom-start placement
86
87
 
@@ -95,10 +96,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
95
96
 
96
97
  setIsOpen(true);
97
98
  }, delay);
98
- }, [isOpen, setMousePosition, analytics.ui]);
99
+ }, [isOpen, setMousePosition, analytics.ui, linkStatus]);
99
100
  var linkActions = useSmartLinkActions({
100
101
  url: url,
101
- appearance: SMART_CARD_ANALYTICS_DISPLAY,
102
+ appearance: CardDisplay.HoverCardPreview,
102
103
  analyticsHandler: analyticsHandler,
103
104
  origin: 'smartLinkPreviewHoverCard'
104
105
  });
@@ -108,9 +109,6 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
108
109
  }
109
110
  }, [hideCard]); // Stop hover preview content to propagate event to parent.
110
111
 
111
- var onClick = useCallback(function (e) {
112
- return e.stopPropagation();
113
- }, []);
114
112
  return jsx(Popup, {
115
113
  testId: "hover-card",
116
114
  isOpen: isOpen,
@@ -120,23 +118,17 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
120
118
  autoFocus: false,
121
119
  content: function content(_ref2) {
122
120
  var update = _ref2.update;
123
- return jsx("div", {
121
+ return jsx(HoverCardContent, {
124
122
  onMouseEnter: initShowCard,
125
123
  onMouseLeave: initHideCard,
126
- onClick: onClick,
127
- css: HoverCardContainer // class name for trello to exclude click events
128
- ,
129
- className: hoverCardClassName
130
- }, jsx(HoverCardContent, {
131
124
  analytics: analytics,
132
125
  cardActions: linkActions,
133
126
  cardState: linkState,
134
127
  onActionClick: onActionClick,
135
128
  onResolve: update,
136
129
  renderers: renderers,
137
- url: url,
138
- onAuthorize: onAuthorize
139
- }));
130
+ url: url
131
+ });
140
132
  },
141
133
  trigger: function trigger(triggerProps) {
142
134
  return jsx("span", {
@@ -1,21 +1,24 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
1
3
  import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
2
4
  import { extractType } from '@atlaskit/linking-common/extractors';
3
5
  import React, { useCallback, useMemo } from 'react';
4
- import { ActionName, SmartLinkPosition, SmartLinkSize } from '../../../constants';
6
+ import { ActionName, CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
5
7
  import { extractMetadata } from '../../../extractors/hover/extractMetadata';
6
8
  import { getExtensionKey } from '../../../state/helpers';
7
9
  import { isSpecialEvent } from '../../../utils';
8
- import { flexibleUiOptions, titleBlockCss } from '../styled';
9
- import { getSimulatedMetadata, SMART_CARD_ANALYTICS_DISPLAY } from '../utils';
10
+ import { HoverCardContainer, flexibleUiOptions, titleBlockCss } from '../styled';
11
+ import { getSimulatedMetadata } from '../utils';
10
12
  import HoverCardLoadingView from './views/resolving';
11
13
  import HoverCardUnauthorisedView from './views/unauthorised';
12
14
  import HoverCardResolvedView from './views/resolved';
13
15
  import { FormattedMessage } from 'react-intl-next';
14
16
  import { messages } from '../../../messages';
17
+ export var hoverCardClassName = 'smart-links-hover-preview';
15
18
  export var getOpenAction = function getOpenAction(url, analytics, onActionClick) {
16
19
  return {
17
20
  name: ActionName.CustomAction,
18
- icon: /*#__PURE__*/React.createElement(ShortcutIcon, {
21
+ icon: jsx(ShortcutIcon, {
19
22
  label: "open in new tab",
20
23
  size: "medium"
21
24
  }),
@@ -30,7 +33,7 @@ export var getOpenAction = function getOpenAction(url, analytics, onActionClick)
30
33
  previewDisplay: 'card'
31
34
  });
32
35
  },
33
- tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.open_link_in_a_new_tab),
36
+ tooltipMessage: jsx(FormattedMessage, messages.open_link_in_a_new_tab),
34
37
  testId: 'hover-card-open-button'
35
38
  };
36
39
  };
@@ -48,7 +51,8 @@ var HoverCardContent = function HoverCardContent(_ref) {
48
51
  onResolve = _ref.onResolve,
49
52
  renderers = _ref.renderers,
50
53
  url = _ref.url,
51
- onAuthorize = _ref.onAuthorize;
54
+ onMouseEnter = _ref.onMouseEnter,
55
+ onMouseLeave = _ref.onMouseLeave;
52
56
  var extensionKey = useMemo(function () {
53
57
  return getExtensionKey(cardState.details);
54
58
  }, [cardState.details]);
@@ -56,7 +60,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
56
60
  var isModifierKeyPressed = isSpecialEvent(event);
57
61
  analytics.ui.cardClickedEvent({
58
62
  id: id,
59
- display: SMART_CARD_ANALYTICS_DISPLAY,
63
+ display: CardDisplay.HoverCardPreview,
60
64
  status: cardState.status,
61
65
  isModifierKeyPressed: isModifierKeyPressed,
62
66
  actionSubjectId: 'titleGoToLink'
@@ -89,33 +93,53 @@ var HoverCardContent = function HoverCardContent(_ref) {
89
93
  url: url,
90
94
  children: {}
91
95
  };
96
+ var onClickStopPropagation = useCallback(function (e) {
97
+ return e.stopPropagation();
98
+ }, []);
92
99
 
93
- if (cardState.metadataStatus === 'pending') {
94
- return /*#__PURE__*/React.createElement(HoverCardLoadingView, {
95
- flexibleCardProps: flexibleCardProps,
96
- titleBlockProps: titleBlockProps
97
- });
98
- }
100
+ var getCardView = function getCardView(cardState) {
101
+ if (cardState.metadataStatus === 'pending') {
102
+ return jsx(HoverCardLoadingView, {
103
+ flexibleCardProps: flexibleCardProps,
104
+ titleBlockProps: titleBlockProps
105
+ });
106
+ }
99
107
 
100
- if (cardState.status === 'unauthorized') {
101
- return /*#__PURE__*/React.createElement(HoverCardUnauthorisedView, {
102
- flexibleCardProps: flexibleCardProps,
103
- onAuthorize: onAuthorize
104
- });
105
- } // if metadataStatus is 'errored' simply render using data available (normal path)
108
+ if (cardState.status === 'unauthorized') {
109
+ return jsx(HoverCardUnauthorisedView, {
110
+ analytics: analytics,
111
+ extensionKey: extensionKey,
112
+ id: id,
113
+ flexibleCardProps: flexibleCardProps,
114
+ url: url
115
+ });
116
+ }
106
117
 
118
+ if (cardState.status === 'resolved') {
119
+ return jsx(HoverCardResolvedView, {
120
+ id: id,
121
+ url: url,
122
+ extensionKey: extensionKey,
123
+ analytics: analytics,
124
+ cardActions: cardActions,
125
+ cardState: cardState,
126
+ flexibleCardProps: flexibleCardProps,
127
+ onActionClick: onActionClick,
128
+ titleBlockProps: titleBlockProps
129
+ });
130
+ }
107
131
 
108
- return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
109
- id: id,
110
- url: url,
111
- extensionKey: extensionKey,
112
- analytics: analytics,
113
- cardActions: cardActions,
114
- cardState: cardState,
115
- flexibleCardProps: flexibleCardProps,
116
- onActionClick: onActionClick,
117
- titleBlockProps: titleBlockProps
118
- });
132
+ return null;
133
+ };
134
+
135
+ var cardView = getCardView(cardState);
136
+ return cardView ? jsx("div", {
137
+ onMouseEnter: onMouseEnter,
138
+ onMouseLeave: onMouseLeave,
139
+ onClick: onClickStopPropagation,
140
+ className: hoverCardClassName,
141
+ css: HoverCardContainer
142
+ }, cardView) : null;
119
143
  };
120
144
 
121
145
  export default HoverCardContent;
@@ -1,12 +1,12 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
2
  import { useFeatureFlag } from '@atlaskit/link-provider';
3
3
  import { extractType } from '@atlaskit/linking-common/extractors';
4
- import { ActionName, SmartLinkSize } from '../../../../../constants';
4
+ import { ActionName, CardDisplay, SmartLinkSize } from '../../../../../constants';
5
5
  import { FooterBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
6
6
  import { footerBlockCss, hiddenSnippetStyles, metadataBlockCss } from './styled';
7
7
  import FlexibleCard from '../../../../FlexibleCard';
8
8
  import { useSmartCardActions } from '../../../../../state/actions';
9
- import { getSimulatedMetadata, toActionableMetadata, SMART_CARD_ANALYTICS_DISPLAY } from '../../../utils';
9
+ import { getSimulatedMetadata, toActionableMetadata } from '../../../utils';
10
10
  import SnippetOrPreview from '../../SnippetOrPreview';
11
11
  import { extractMetadata } from '../../../../../extractors/hover/extractMetadata';
12
12
  export var toFooterActions = function toFooterActions(cardActions, onActionClick) {
@@ -49,7 +49,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
49
49
  // Since this hover view is only rendered on resolved status,
50
50
  // there is no need to check for statuses.
51
51
  analytics.ui.renderSuccessEvent({
52
- display: SMART_CARD_ANALYTICS_DISPLAY,
52
+ display: CardDisplay.HoverCardPreview,
53
53
  status: cardState.status
54
54
  });
55
55
  }, [analytics.ui, cardState.status]);
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useMemo } from 'react';
2
+ import React, { useCallback, useMemo } from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import FlexibleCard from '../../../../FlexibleCard';
5
5
  import { messages } from '../../../../../messages';
@@ -9,29 +9,46 @@ import { connectButtonStyles, mainTextStyles, titleBlockStyles } from './styled'
9
9
  import UnauthorisedViewContent from '../../../../common/UnauthorisedViewContent';
10
10
  import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
11
11
  import { LinkIcon } from '../../../../FlexibleCard/components/elements';
12
- import { ActionName } from '../../../../../constants';
12
+ import { ActionName, CardDisplay } from '../../../../../constants';
13
+ import { useSmartCardActions } from '../../../../../state/actions';
13
14
 
14
15
  var HoverCardUnauthorisedView = function HoverCardUnauthorisedView(_ref) {
15
16
  var _cardState$details, _extractProvider;
16
17
 
17
- var flexibleCardProps = _ref.flexibleCardProps,
18
+ var analytics = _ref.analytics,
19
+ extensionKey = _ref.extensionKey,
20
+ _ref$id = _ref.id,
21
+ id = _ref$id === void 0 ? '' : _ref$id,
22
+ flexibleCardProps = _ref.flexibleCardProps,
18
23
  _ref$testId = _ref.testId,
19
24
  testId = _ref$testId === void 0 ? 'hover-card-unauthorised-view' : _ref$testId,
20
- onAuthorize = _ref.onAuthorize;
25
+ url = _ref.url;
21
26
  var cardState = flexibleCardProps.cardState;
22
27
  var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
23
28
  var providerName = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
29
+
30
+ var _useSmartCardActions = useSmartCardActions(id, url, analytics),
31
+ authorize = _useSmartCardActions.authorize;
32
+
33
+ var handleAuthorize = useCallback(function () {
34
+ if (authorize) {
35
+ analytics.track.appAccountAuthStarted({
36
+ extensionKey: extensionKey
37
+ });
38
+ authorize(CardDisplay.HoverCardPreview);
39
+ }
40
+ }, [authorize, extensionKey, analytics.track]);
24
41
  var actions = useMemo(function () {
25
- return onAuthorize ? [{
42
+ return [{
26
43
  name: ActionName.CustomAction,
27
44
  content: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_unauthorised_account_action, {
28
45
  values: {
29
46
  context: providerName
30
47
  }
31
48
  })),
32
- onClick: onAuthorize
33
- }] : [];
34
- }, [onAuthorize, providerName]);
49
+ onClick: handleAuthorize
50
+ }];
51
+ }, [handleAuthorize, providerName]);
35
52
  return /*#__PURE__*/React.createElement(FlexibleCard, _extends({}, flexibleCardProps, {
36
53
  testId: testId
37
54
  }), /*#__PURE__*/React.createElement(CustomBlock, {
@@ -45,7 +62,8 @@ var HoverCardUnauthorisedView = function HoverCardUnauthorisedView(_ref) {
45
62
  overrideCss: mainTextStyles,
46
63
  testId: "".concat(testId, "-content")
47
64
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
48
- providerName: providerName
65
+ providerName: providerName,
66
+ analytics: analytics
49
67
  }))), /*#__PURE__*/React.createElement(CustomBlock, {
50
68
  overrideCss: connectButtonStyles,
51
69
  testId: "".concat(testId, "-button")
@@ -8,7 +8,7 @@ import { ErrorBoundary } from 'react-error-boundary';
8
8
  import { useSmartLinkAnalytics } from '../../state/analytics';
9
9
  import { fireSmartLinkEvent } from '../../utils/analytics';
10
10
  import { HoverCardComponent } from './components/HoverCardComponent';
11
- import { SMART_CARD_ANALYTICS_DISPLAY } from './utils';
11
+ import { CardDisplay } from '../../constants';
12
12
 
13
13
  var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
14
14
  var url = props.url,
@@ -21,7 +21,7 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
21
21
  var analytics = useSmartLinkAnalytics(url, analyticsHandler, id);
22
22
  var onError = useCallback(function (error, info) {
23
23
  analytics.ui.renderFailedEvent({
24
- display: SMART_CARD_ANALYTICS_DISPLAY,
24
+ display: CardDisplay.HoverCardPreview,
25
25
  id: id,
26
26
  error: error,
27
27
  errorInfo: info
@@ -37,5 +37,8 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
37
37
  };
38
38
 
39
39
  export var HoverCard = withAnalyticsContext({
40
- source: 'smartLinkPreviewHoverCard'
40
+ source: 'smartLinkPreviewHoverCard',
41
+ attributes: {
42
+ display: CardDisplay.HoverCardPreview
43
+ }
41
44
  })(withAnalyticsEvents()(HoverCardWithErrorBoundary));
@@ -5,7 +5,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
7
  import { ElementName } from '../../constants';
8
- export var SMART_CARD_ANALYTICS_DISPLAY = 'flexible';
9
8
  export var getSimulatedMetadata = function getSimulatedMetadata() {
10
9
  var extensionKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
11
10
  var types = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -98,7 +98,8 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
98
98
  if (showAuthTooltip) {
99
99
  return /*#__PURE__*/React.createElement(HoverCard, {
100
100
  url: url,
101
- onAuthorize: this.props.onAuthorise
101
+ onAuthorize: this.props.onAuthorise,
102
+ id: this.props.id
102
103
  }, inlineCardUnauthenticatedView);
103
104
  }
104
105
 
@@ -79,7 +79,8 @@ export var InlineCard = function InlineCard(_ref) {
79
79
  onClick: handleFrameClick,
80
80
  onAuthorise: handleAuthorize,
81
81
  testId: testIdWithStatus,
82
- showAuthTooltip: showAuthTooltip
82
+ showAuthTooltip: showAuthTooltip,
83
+ id: id
83
84
  });
84
85
 
85
86
  case 'forbidden':
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import React, { useCallback } from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import { messages } from '../../messages';
5
5
  import { CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
@@ -11,7 +11,11 @@ import { CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
11
11
  var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
12
12
  var providerName = _ref.providerName,
13
13
  _ref$testId = _ref.testId,
14
- testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId;
14
+ testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId,
15
+ analytics = _ref.analytics;
16
+ var handleLearnMoreClick = useCallback(function () {
17
+ analytics === null || analytics === void 0 ? void 0 : analytics.ui.learnMoreClickedEvent();
18
+ }, [analytics === null || analytics === void 0 ? void 0 : analytics.ui]);
15
19
  return /*#__PURE__*/React.createElement(React.Fragment, null, providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_unauthorised_account_description, {
16
20
  values: {
17
21
  context: providerName
@@ -19,7 +23,8 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
19
23
  })) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement("a", {
20
24
  href: CONTENT_URL_SECURITY_AND_PERMISSIONS,
21
25
  target: "_blank",
22
- "data-testid": "".concat(testId, "-learn-more")
26
+ "data-testid": "".concat(testId, "-learn-more"),
27
+ onClick: handleLearnMoreClick
23
28
  }, /*#__PURE__*/React.createElement(FormattedMessage, messages.learn_more_about_smart_links)));
24
29
  };
25
30
 
@@ -195,3 +195,11 @@ export declare enum MediaPlacement {
195
195
  Left = "left",
196
196
  Right = "right"
197
197
  }
198
+ export declare enum CardDisplay {
199
+ Inline = "inline",
200
+ Block = "block",
201
+ Embed = "embed",
202
+ EmbedPreview = "embedPreview",
203
+ Flexible = "flexible",
204
+ HoverCardPreview = "hoverCardPreview"
205
+ }
@@ -1,12 +1,11 @@
1
1
  import { JsonLd } from 'json-ld-types';
2
- import { CardAppearance } from '../../view/Card';
3
2
  import { InvokeServerOpts, InvokeClientOpts } from '../../model/invoke-opts';
4
3
  import { AnalyticsFacade } from '../analytics';
5
4
  import { CardInnerAppearance } from '../../view/Card/types';
6
5
  export declare const useSmartCardActions: (id: string, url: string, analytics: AnalyticsFacade) => {
7
6
  register: () => Promise<void>;
8
7
  reload: () => void;
9
- authorize: (appearance: CardAppearance) => void;
8
+ authorize: (appearance: CardInnerAppearance) => void;
10
9
  invoke: (opts: InvokeClientOpts | InvokeServerOpts, appearance: CardInnerAppearance) => Promise<JsonLd.Response | void>;
11
10
  loadMetadata: () => Promise<void> | undefined;
12
11
  };
@@ -110,17 +110,23 @@ export declare const useSmartLinkAnalytics: (url: string, dispatchAnalytics: Ana
110
110
  * @param previewInvokeMethod How the preview was triggered.
111
111
  * @returns
112
112
  */
113
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiHoverCardViewedEventProps) => void;
113
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
114
114
  /**
115
115
  * This fires an event that represents a hover preview being dismissed.
116
116
  * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
117
117
  * @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
118
118
  * @param definitionId The definitionId of the Smart Link resolver invoked.
119
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
119
+ * @param extensionKey The extensionKey of the Smart Link resolver invoked.
120
120
  * @param previewInvokeMethod How the preview was triggered.
121
121
  * @returns
122
122
  */
123
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiHoverCardDismissedEventProps) => void;
123
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
124
+ /**
125
+ * Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
126
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
127
+ * @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
128
+ */
129
+ learnMoreClickedEvent: () => void;
124
130
  };
125
131
  operational: {
126
132
  /**
@@ -168,12 +174,19 @@ export declare const useSmartLinkAnalytics: (url: string, dispatchAnalytics: Ana
168
174
  };
169
175
  track: {
170
176
  /**
171
- * This fires an event which represents a user starting the Smart Link connect account process.
177
+ * This fires an event which represents a user connecting their account to view a Smart Link.
172
178
  * @param definitionId The definitionId of the Smart Link resolver invoked.
173
179
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
174
180
  * @returns
175
181
  */
176
182
  appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
183
+ /**
184
+ * This fires an event which represents a user starting the Smart Link connect account process.
185
+ * @param location a location where the Smart Link auth action was initiated.
186
+ * @param extensionKey The extensionKey of the Smart Link resolver invoked.
187
+ * @returns
188
+ */
189
+ appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
177
190
  };
178
191
  screen: {
179
192
  /**
@@ -26,8 +26,9 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
26
26
  }) => void;
27
27
  renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
28
28
  renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
29
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
30
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
29
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
30
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
31
+ learnMoreClickedEvent: () => void;
31
32
  };
32
33
  operational: {
33
34
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
@@ -38,6 +39,7 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
38
39
  };
39
40
  track: {
40
41
  appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
42
+ appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
41
43
  };
42
44
  screen: {
43
45
  authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
@@ -62,8 +64,9 @@ export declare const useFlexibleUiAnalyticsContext: () => {
62
64
  }) => void;
63
65
  renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
64
66
  renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
65
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
66
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
67
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
68
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
69
+ learnMoreClickedEvent: () => void;
67
70
  };
68
71
  operational: {
69
72
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
@@ -74,6 +77,7 @@ export declare const useFlexibleUiAnalyticsContext: () => {
74
77
  };
75
78
  track: {
76
79
  appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
80
+ appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
77
81
  };
78
82
  screen: {
79
83
  authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
@@ -4,7 +4,7 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
4
4
  actions: {
5
5
  register: () => Promise<void>;
6
6
  reload: () => void;
7
- authorize: (appearance: import("@atlaskit/linking-common").CardAppearance) => void;
7
+ authorize: (appearance: import("../../view/Card/types").CardInnerAppearance) => void;
8
8
  invoke: (opts: import("../../model/invoke-opts").InvokeClientOpts | import("../../model/invoke-opts").InvokeServerOpts, appearance: import("../../view/Card/types").CardInnerAppearance) => Promise<void | import("json-ld-types").JsonLd.Response<import("json-ld-types").JsonLd.Data.BaseData>>;
9
9
  loadMetadata: () => Promise<void> | undefined;
10
10
  };
@@ -25,8 +25,9 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
25
25
  }) => void;
26
26
  renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
27
27
  renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
28
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
29
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
28
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
29
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
30
+ learnMoreClickedEvent: () => void;
30
31
  };
31
32
  operational: {
32
33
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
@@ -37,6 +38,7 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
37
38
  };
38
39
  track: {
39
40
  appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
41
+ appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
40
42
  };
41
43
  screen: {
42
44
  authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
@@ -19,6 +19,7 @@ export declare const invokeFailedEvent: ({ id, actionType, display, reason, exte
19
19
  export declare const connectSucceededEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => AnalyticsPayload;
20
20
  export declare const connectFailedEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, reason, }: ConnectFailedEventProps) => AnalyticsPayload;
21
21
  export declare const trackAppAccountConnected: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
22
+ export declare const trackAppAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
22
23
  export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
23
24
  export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
24
25
  export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
@@ -27,6 +28,7 @@ export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId,
27
28
  export declare const screenAuthPopupEvent: ({ extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => AnalyticsPayload;
28
29
  export declare const uiRenderSuccessEvent: ({ display, status, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderSuccessEventProps) => AnalyticsPayload;
29
30
  export declare const uiRenderFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
30
- export declare const uiHoverCardViewedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardViewedEventProps) => AnalyticsPayload;
31
- export declare const uiHoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardDismissedEventProps) => AnalyticsPayload;
31
+ export declare const uiHoverCardViewedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, status, }: UiHoverCardViewedEventProps) => AnalyticsPayload;
32
+ export declare const uiHoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, status, }: UiHoverCardDismissedEventProps) => AnalyticsPayload;
32
33
  export declare const uiHoverCardOpenLinkClickedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => AnalyticsPayload;
34
+ export declare const uiLearnMoreLinkClickedEvent: () => AnalyticsPayload;
@@ -1,4 +1,4 @@
1
1
  import { AnalyticsPayload } from '../types';
2
2
  import { InstrumentEventProps } from './types';
3
- export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, } from './analytics';
3
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, } from './analytics';
4
4
  export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;
@@ -76,11 +76,13 @@ export declare type UiRenderFailedEventProps = CommonEventProps & {
76
76
  export declare type UiHoverCardViewedEventProps = CommonEventProps & {
77
77
  previewDisplay: PreviewDisplay;
78
78
  previewInvokeMethod?: PreviewInvokeMethod;
79
+ status: CardType;
79
80
  };
80
81
  export declare type UiHoverCardDismissedEventProps = CommonEventProps & {
81
82
  previewDisplay: PreviewDisplay;
82
83
  hoverTime: number;
83
84
  previewInvokeMethod?: PreviewInvokeMethod;
85
+ status: CardType;
84
86
  };
85
87
  export declare type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
86
88
  previewDisplay: PreviewDisplay;