@atlaskit/smart-card 32.7.6 → 32.7.8

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 (96) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/extractors/flexible/actions/index.js +5 -7
  3. package/dist/cjs/state/actions/index.js +13 -38
  4. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +54 -305
  5. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  6. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
  7. package/dist/cjs/utils/analytics/analytics.js +28 -304
  8. package/dist/cjs/utils/analytics/index.js +0 -66
  9. package/dist/cjs/utils/mocks.js +5 -7
  10. package/dist/cjs/view/BlockCard/views/styled.js +1 -1
  11. package/dist/cjs/view/Card/index.js +5 -7
  12. package/dist/cjs/view/CardWithUrl/component.js +7 -22
  13. package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
  14. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  15. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  16. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
  17. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
  18. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
  19. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -1
  20. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  21. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  22. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +34 -34
  23. package/dist/cjs/view/FlexibleCard/components/utils.js +5 -5
  24. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +21 -53
  25. package/dist/cjs/view/HoverCard/styled.js +1 -1
  26. package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -11
  27. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +10 -13
  28. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +7 -10
  29. package/dist/cjs/view/InlineCard/ResolvedView/index.js +5 -7
  30. package/dist/cjs/view/InlineCard/ResolvingView/index.js +5 -7
  31. package/dist/cjs/view/LinkUrl/index.js +1 -1
  32. package/dist/cjs/view/LinkView/index.js +5 -7
  33. package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -9
  34. package/dist/es2019/state/actions/index.js +13 -38
  35. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -238
  36. package/dist/es2019/utils/analytics/analytics.js +2 -286
  37. package/dist/es2019/utils/analytics/index.js +1 -1
  38. package/dist/es2019/view/BlockCard/views/styled.js +1 -1
  39. package/dist/es2019/view/CardWithUrl/component.js +8 -23
  40. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  41. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  42. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +3 -3
  43. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  44. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  45. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
  46. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +21 -53
  47. package/dist/es2019/view/HoverCard/styled.js +1 -1
  48. package/dist/es2019/view/LinkUrl/index.js +1 -1
  49. package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
  50. package/dist/esm/extractors/flexible/actions/index.js +5 -7
  51. package/dist/esm/state/actions/index.js +13 -38
  52. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +55 -306
  53. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  54. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
  55. package/dist/esm/utils/analytics/analytics.js +27 -303
  56. package/dist/esm/utils/analytics/index.js +1 -1
  57. package/dist/esm/utils/mocks.js +5 -7
  58. package/dist/esm/view/BlockCard/views/styled.js +1 -1
  59. package/dist/esm/view/Card/index.js +5 -7
  60. package/dist/esm/view/CardWithUrl/component.js +8 -23
  61. package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
  62. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  63. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  64. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
  65. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
  66. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
  67. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +1 -1
  68. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  69. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  70. package/dist/esm/view/FlexibleCard/components/elements/utils.js +34 -34
  71. package/dist/esm/view/FlexibleCard/components/utils.js +5 -5
  72. package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -53
  73. package/dist/esm/view/HoverCard/styled.js +1 -1
  74. package/dist/esm/view/InlineCard/ErroredView/index.js +8 -11
  75. package/dist/esm/view/InlineCard/ForbiddenView/index.js +10 -13
  76. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +7 -10
  77. package/dist/esm/view/InlineCard/ResolvedView/index.js +5 -7
  78. package/dist/esm/view/InlineCard/ResolvingView/index.js +5 -7
  79. package/dist/esm/view/LinkUrl/index.js +1 -1
  80. package/dist/esm/view/LinkView/index.js +5 -7
  81. package/dist/esm/view/common/UnauthorisedViewContent.js +3 -9
  82. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
  83. package/dist/types/state/hooks/useSmartLink.d.ts +0 -12
  84. package/dist/types/utils/analytics/analytics.d.ts +1 -51
  85. package/dist/types/utils/analytics/index.d.ts +1 -1
  86. package/dist/types/utils/analytics/types.d.ts +0 -60
  87. package/dist/types/utils/mocks.d.ts +0 -12
  88. package/dist/types/view/common/UnauthorisedViewContent.d.ts +1 -1
  89. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
  90. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -12
  91. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -51
  92. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  93. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -60
  94. package/dist/types-ts4.5/utils/mocks.d.ts +0 -12
  95. package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +1 -1
  96. package/package.json +2 -5
@@ -8,21 +8,20 @@ exports.CardLinkView = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
11
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
12
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
  var _Frame = require("../InlineCard/Frame");
16
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
16
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
17
17
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
18
  var CardLinkView = exports.CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
19
- (0, _inherits2.default)(CardLinkView, _React$PureComponent);
20
- var _super = _createSuper(CardLinkView);
21
19
  function CardLinkView() {
22
20
  (0, _classCallCheck2.default)(this, CardLinkView);
23
- return _super.apply(this, arguments);
21
+ return _callSuper(this, CardLinkView, arguments);
24
22
  }
25
- (0, _createClass2.default)(CardLinkView, [{
23
+ (0, _inherits2.default)(CardLinkView, _React$PureComponent);
24
+ return (0, _createClass2.default)(CardLinkView, [{
26
25
  key: "render",
27
26
  value: function render() {
28
27
  return /*#__PURE__*/_react.default.createElement(_Frame.Frame, (0, _extends2.default)({
@@ -30,5 +29,4 @@ var CardLinkView = exports.CardLinkView = /*#__PURE__*/function (_React$PureComp
30
29
  }, this.props), this.props.placeholder || this.props.link);
31
30
  }
32
31
  }]);
33
- return CardLinkView;
34
32
  }(_react.default.PureComponent);
@@ -9,7 +9,6 @@ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _reactIntlNext = require("react-intl-next");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
14
13
  var _constants = require("../../constants");
15
14
  var _messages = require("../../messages");
@@ -23,17 +22,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
23
22
  var providerName = _ref.providerName,
24
23
  isProductIntegrationSupported = _ref.isProductIntegrationSupported,
25
24
  _ref$testId = _ref.testId,
26
- testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId,
27
- analytics = _ref.analytics;
25
+ testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId;
28
26
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
29
27
  fireEvent = _useAnalyticsEvents.fireEvent;
30
28
  var handleLearnMoreClick = (0, _react.useCallback)(function () {
31
- if ((0, _platformFeatureFlags.fg)('platform_migrate-some-ui-events-smart-card')) {
32
- fireEvent('ui.button.clicked.learnMore', {});
33
- } else {
34
- analytics === null || analytics === void 0 || analytics.ui.learnMoreClickedEvent();
35
- }
36
- }, [analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent]);
29
+ fireEvent('ui.button.clicked.learnMore', {});
30
+ }, [fireEvent]);
37
31
  var learnMoreMessage = isProductIntegrationSupported ? _messages.messages.learn_more_about_connecting_account : _messages.messages.learn_more_about_smart_links;
38
32
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, providerName ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_unauthorised_account_description, {
39
33
  values: {
@@ -2,7 +2,6 @@ import { useCallback, useMemo } from 'react';
2
2
  import { useSmartLinkContext } from '@atlaskit/link-provider';
3
3
  import { ACTION_RESOLVING, ACTION_UPDATE_METADATA_STATUS, cardAction } from '@atlaskit/linking-common';
4
4
  import { auth } from '@atlaskit/outbound-auth-flow-client';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
7
6
  import { SmartLinkStatus } from '../../constants';
8
7
  import { startUfoExperience } from '../analytics';
@@ -88,32 +87,16 @@ export const useSmartCardActions = (id, url, analytics) => {
88
87
  const services = getServices(details);
89
88
  // When authentication is triggered, let GAS know!
90
89
  if (status === 'unauthorized') {
91
- if (fg('platform_migrate-some-ui-events-smart-card')) {
92
- fireEvent('ui.button.clicked.connectAccount', {
93
- display: appearance,
94
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
95
- });
96
- } else {
97
- analytics.ui.authEvent({
98
- display: appearance,
99
- definitionId,
100
- extensionKey
101
- });
102
- }
90
+ fireEvent('ui.button.clicked.connectAccount', {
91
+ display: appearance,
92
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
93
+ });
103
94
  }
104
95
  if (status === 'forbidden') {
105
- if (fg('platform_migrate-some-ui-events-smart-card')) {
106
- fireEvent('ui.smartLink.clicked.tryAnotherAccount', {
107
- display: appearance,
108
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
109
- });
110
- } else {
111
- analytics.ui.authAlternateAccountEvent({
112
- display: appearance,
113
- definitionId,
114
- extensionKey
115
- });
116
- }
96
+ fireEvent('ui.smartLink.clicked.tryAnotherAccount', {
97
+ display: appearance,
98
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
99
+ });
117
100
  }
118
101
  if (services.length > 0) {
119
102
  fireEvent('screen.consentModal.viewed', {
@@ -142,23 +125,15 @@ export const useSmartCardActions = (id, url, analytics) => {
142
125
  reason: (_err$type = err.type) !== null && _err$type !== void 0 ? _err$type : null
143
126
  });
144
127
  if (err.type === 'auth_window_closed') {
145
- if (fg('platform_migrate-some-ui-events-smart-card')) {
146
- fireEvent('ui.consentModal.closed', {
147
- display: appearance,
148
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
149
- });
150
- } else {
151
- analytics.ui.closedAuthEvent({
152
- display: appearance,
153
- definitionId,
154
- extensionKey
155
- });
156
- }
128
+ fireEvent('ui.consentModal.closed', {
129
+ display: appearance,
130
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
131
+ });
157
132
  }
158
133
  reload();
159
134
  });
160
135
  }
161
- }, [getSmartLinkState, analytics.ui, id, reload, fireEvent]);
136
+ }, [getSmartLinkState, id, reload, fireEvent]);
162
137
  const invoke = useCallback(async (opts, appearance) => {
163
138
  const {
164
139
  key,
@@ -1,8 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useSmartLinkContext } from '@atlaskit/link-provider';
3
3
  import { getUrl } from '@atlaskit/linking-common';
4
- import { context, invokeFailedEvent, invokeSucceededEvent, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from '../../utils/analytics';
5
- import { uiServerActionClicked } from '../../utils/analytics/analytics';
4
+ import { context, invokeFailedEvent, invokeSucceededEvent, uiActionClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent } from '../../utils/analytics';
6
5
  import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getStatusDetails, getSubproduct } from '../helpers';
7
6
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
8
7
  import { useDispatchAnalytics } from './useDispatchAnalytics';
@@ -57,58 +56,6 @@ export const useSmartLinkAnalytics = (url, id, defaultLocation) => {
57
56
 
58
57
  /** Contains all ui analytics events */
59
58
  const ui = useMemo(() => ({
60
- /**
61
- * This fires an event that represents when a user clicks on the authentication
62
- * call to action with no current authenticated account. (i.e. Connect to Preview).
63
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
64
- * @param definitionId The definitionId of the Smart Link resolver invoked.
65
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
66
- * @returns
67
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
68
- */
69
- authEvent: ({
70
- display,
71
- extensionKey,
72
- definitionId,
73
- resourceType,
74
- destinationProduct,
75
- destinationSubproduct,
76
- location
77
- }) => dispatchAnalytics(applyCommonAttributes(uiAuthEvent({
78
- display,
79
- extensionKey,
80
- definitionId,
81
- resourceType,
82
- destinationProduct,
83
- destinationSubproduct,
84
- location
85
- }), commonAttributes)),
86
- /**
87
- * This fires an event that represents when a user clicks on the authentication
88
- * call to action with a forbidden authenticated account. (i.e. Try another account).
89
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
90
- * @param definitionId The definitionId of the Smart Link resolver invoked.
91
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
92
- * @returns
93
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
94
- */
95
- authAlternateAccountEvent: ({
96
- display,
97
- extensionKey,
98
- definitionId,
99
- resourceType,
100
- destinationProduct,
101
- destinationSubproduct,
102
- location
103
- }) => dispatchAnalytics(applyCommonAttributes(uiAuthAlternateAccountEvent({
104
- display,
105
- extensionKey,
106
- definitionId,
107
- resourceType,
108
- destinationProduct,
109
- destinationSubproduct,
110
- location
111
- }), commonAttributes)),
112
59
  /**
113
60
  * This fires an event that represents when a user
114
61
  * click a button.
@@ -124,42 +71,6 @@ export const useSmartLinkAnalytics = (url, id, defaultLocation) => {
124
71
  },
125
72
  eventType: 'ui'
126
73
  }, commonAttributes)),
127
- /**
128
- * This fires an event that represents when a user clicks on a Smart Link.
129
- * @param id The unique ID for this Smart Link.
130
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
131
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
132
- * @param definitionId The definitionId of the Smart Link resolver invoked.
133
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
134
- * @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
135
- * @param location Where the Smart Link is currently rendered.
136
- * @param destinationProduct The product the Smart Link is linked to.
137
- * @returns
138
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
139
- */
140
- cardClickedEvent: ({
141
- id,
142
- display,
143
- status,
144
- definitionId,
145
- extensionKey,
146
- isModifierKeyPressed,
147
- location,
148
- destinationProduct,
149
- destinationSubproduct,
150
- actionSubjectId
151
- }) => dispatchAnalytics(applyCommonAttributes(uiCardClickedEvent({
152
- id,
153
- display,
154
- status,
155
- definitionId,
156
- extensionKey,
157
- isModifierKeyPressed,
158
- location,
159
- destinationProduct,
160
- destinationSubproduct,
161
- actionSubjectId
162
- }), commonAttributes)),
163
74
  /**
164
75
  * This fires an event that represents when a user clicks on a Smart Link action.
165
76
  * Note: This also starts the UFO smart-link-action-invocation experience.
@@ -193,60 +104,6 @@ export const useSmartLinkAnalytics = (url, id, defaultLocation) => {
193
104
  location
194
105
  }), commonAttributes));
195
106
  },
196
- /**
197
- * This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
198
- * https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
199
- * @param previewDisplay What format the preview is in.
200
- * @param definitionId The definitionId of the Smart Link resolver invoked.
201
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
202
- * @param previewInvokeMethod How the preview was triggered.
203
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
204
- */
205
- hoverCardOpenLinkClickedEvent: ({
206
- previewDisplay,
207
- definitionId,
208
- extensionKey,
209
- destinationProduct,
210
- destinationSubproduct,
211
- location,
212
- previewInvokeMethod
213
- }) => {
214
- dispatchAnalytics(applyCommonAttributes(uiHoverCardOpenLinkClickedEvent({
215
- id: defaultId,
216
- previewDisplay,
217
- definitionId,
218
- extensionKey,
219
- destinationProduct,
220
- destinationSubproduct,
221
- location,
222
- previewInvokeMethod
223
- }), commonAttributes));
224
- },
225
- /**
226
- * This fires an event that represents when a user closed the authentication window without authenticating after opening it.
227
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
228
- * @param definitionId The definitionId of the Smart Link resolver invoked.
229
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
230
- * @returns
231
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
232
- */
233
- closedAuthEvent: ({
234
- display,
235
- extensionKey,
236
- definitionId,
237
- resourceType,
238
- destinationProduct,
239
- destinationSubproduct,
240
- location
241
- }) => dispatchAnalytics(applyCommonAttributes(uiClosedAuthEvent({
242
- display,
243
- extensionKey,
244
- definitionId,
245
- resourceType,
246
- destinationProduct,
247
- destinationSubproduct,
248
- location
249
- }), commonAttributes)),
250
107
  /**
251
108
  * This fires an event that represents when a user close a modal.
252
109
  * @param data A partial analytics event payload
@@ -340,100 +197,7 @@ export const useSmartLinkAnalytics = (url, id, defaultLocation) => {
340
197
  destinationSubproduct,
341
198
  location
342
199
  }), commonAttributes));
343
- },
344
- /**
345
- * This fires an event that represents a hover preview being opened.
346
- * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
347
- * @param definitionId The definitionId of the Smart Link resolver invoked.
348
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
349
- * @param previewInvokeMethod How the preview was triggered.
350
- * @returns
351
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
352
- */
353
- hoverCardViewedEvent: ({
354
- previewDisplay,
355
- previewInvokeMethod,
356
- id,
357
- extensionKey,
358
- definitionId,
359
- resourceType,
360
- destinationProduct,
361
- destinationSubproduct,
362
- location,
363
- status
364
- }) => dispatchAnalytics(applyCommonAttributes(uiHoverCardViewedEvent({
365
- id,
366
- previewDisplay,
367
- extensionKey,
368
- definitionId,
369
- resourceType,
370
- destinationProduct,
371
- destinationSubproduct,
372
- location,
373
- previewInvokeMethod,
374
- status
375
- }), commonAttributes)),
376
- /**
377
- * This fires an event that represents a hover preview being dismissed.
378
- * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
379
- * @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
380
- * @param definitionId The definitionId of the Smart Link resolver invoked.
381
- * @param extensionKey The extensionKey of the Smart Link resolver invoked.
382
- * @param previewInvokeMethod How the preview was triggered.
383
- * @returns
384
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
385
- */
386
- hoverCardDismissedEvent: ({
387
- id,
388
- previewDisplay,
389
- hoverTime,
390
- previewInvokeMethod,
391
- extensionKey,
392
- definitionId,
393
- resourceType,
394
- destinationProduct,
395
- destinationSubproduct,
396
- location,
397
- status
398
- }) => dispatchAnalytics(applyCommonAttributes(uiHoverCardDismissedEvent({
399
- previewDisplay,
400
- id,
401
- hoverTime,
402
- extensionKey,
403
- definitionId,
404
- resourceType,
405
- destinationProduct,
406
- destinationSubproduct,
407
- location,
408
- previewInvokeMethod,
409
- status
410
- }), commonAttributes)),
411
- /**
412
- * Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
413
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
414
- * @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
415
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
416
- */
417
- learnMoreClickedEvent: () => dispatchAnalytics(applyCommonAttributes(uiLearnMoreLinkClickedEvent(), commonAttributes)),
418
- /**
419
- * Fires an event that represent a click was performed on a Status Lozenge
420
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
421
- */
422
- smartLinkLozengeActionClickedEvent: () => dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusLozengeButtonClicked(), commonAttributes)),
423
- /**
424
- * Fires an event that represent a click was performed on a Status Lozenge's dropdown item
425
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
426
- */
427
- smartLinkLozengeActionListItemClickedEvent: () => dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusListItemButtonClicked(), commonAttributes)),
428
- /**
429
- * Fires an event that represent a click was performed on a Status Lozenge open preview button
430
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
431
- */
432
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusOpenPreviewButtonClicked(), commonAttributes)),
433
- /**
434
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
435
- */
436
- smartLinkServerActionClickedEvent: props => dispatchAnalytics(applyCommonAttributes(uiServerActionClicked(props), commonAttributes))
200
+ }
437
201
  }), [dispatchAnalytics, commonAttributes, defaultId, extractedExtensionKey]);
438
202
 
439
203
  /** Contains all operational analytics events */