@atlaskit/smart-card 26.0.0 → 26.1.0

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 (44) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +37 -0
  3. package/dist/cjs/state/hooks/use-invoke/index.js +28 -8
  4. package/dist/cjs/utils/actions/create-status-update-request.js +3 -2
  5. package/dist/cjs/utils/analytics/analytics.js +198 -126
  6. package/dist/cjs/utils/analytics/index.js +18 -0
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
  9. package/dist/cjs/view/CardWithUrl/component.js +2 -1
  10. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/index.js +43 -30
  11. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -1
  12. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +37 -3
  13. package/dist/es2019/state/hooks/use-invoke/index.js +23 -9
  14. package/dist/es2019/utils/actions/create-status-update-request.js +1 -1
  15. package/dist/es2019/utils/analytics/analytics.js +66 -0
  16. package/dist/es2019/utils/analytics/index.js +1 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
  19. package/dist/es2019/view/CardWithUrl/component.js +2 -1
  20. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/index.js +29 -18
  21. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -1
  22. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +39 -2
  23. package/dist/esm/state/hooks/use-invoke/index.js +28 -8
  24. package/dist/esm/utils/actions/create-status-update-request.js +3 -2
  25. package/dist/esm/utils/analytics/analytics.js +190 -124
  26. package/dist/esm/utils/analytics/index.js +1 -1
  27. package/dist/esm/version.json +1 -1
  28. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
  29. package/dist/esm/view/CardWithUrl/component.js +2 -1
  30. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/index.js +43 -30
  31. package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -1
  32. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +31 -0
  33. package/dist/types/state/flexible-ui-context/index.d.ts +24 -0
  34. package/dist/types/state/hooks/use-invoke/index.d.ts +7 -1
  35. package/dist/types/state/hooks/useSmartLink.d.ts +12 -0
  36. package/dist/types/utils/analytics/analytics.d.ts +13 -0
  37. package/dist/types/utils/analytics/index.d.ts +1 -1
  38. package/dist/types/utils/analytics/types.d.ts +1 -0
  39. package/dist/types/utils/mocks.d.ts +12 -0
  40. package/dist/types/utils/types.d.ts +2 -2
  41. package/dist/types/view/FlexibleCard/components/common/lozenge-action/types.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/report.api.md +20 -1
  44. package/tmp/api-report-tmp.d.ts +909 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`68562365142`](https://bitbucket.org/atlassian/atlassian-frontend/commits/68562365142) - Add analytics for quick actions
8
+
9
+ ## 26.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`6341b726715`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6341b726715) - Fix of the request body of the invoke update request
14
+
3
15
  ## 26.0.0
4
16
 
5
17
  ### Minor Changes
@@ -65,6 +65,7 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatchAnalyti
65
65
  definitionId: extractedDefinitionId,
66
66
  extensionKey: extractedExtensionKey,
67
67
  resourceType: extractedResourceType,
68
+ destinationObjectType: extractedResourceType,
68
69
  destinationSubproduct: extractedSubproduct,
69
70
  destinationProduct: extractedProduct,
70
71
  location: defaultLocation
@@ -497,6 +498,24 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatchAnalyti
497
498
  */
498
499
  learnMoreClickedEvent: function learnMoreClickedEvent() {
499
500
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiLearnMoreLinkClickedEvent)(), commonAttributes));
501
+ },
502
+ /**
503
+ * Fires an event that represent a click was performed on a Status Lozenge
504
+ */
505
+ smartLinkLozengeActionClickedEvent: function smartLinkLozengeActionClickedEvent() {
506
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusLozengeButtonClicked)(), commonAttributes));
507
+ },
508
+ /**
509
+ * Fires an event that represent a click was performed on a Status Lozenge's dropdown item
510
+ */
511
+ smartLinkLozengeActionListItemClickedEvent: function smartLinkLozengeActionListItemClickedEvent() {
512
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusListItemButtonClicked)(), commonAttributes));
513
+ },
514
+ /**
515
+ * Fires an event that represent a click was performed on a Status Lozenge open preview button
516
+ */
517
+ smartLinkLozengeActionErrorOpenPreviewClickedEvent: function smartLinkLozengeActionErrorOpenPreviewClickedEvent() {
518
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusOpenPreviewButtonClicked)(), commonAttributes));
500
519
  }
501
520
  };
502
521
  }, [defaultId, commonAttributes, dispatchAnalytics]);
@@ -738,6 +757,24 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatchAnalyti
738
757
  */
739
758
  linkUpdated: function linkUpdated(props) {
740
759
  return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackLinkUpdated)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
760
+ },
761
+ /**
762
+ * This fires a tracking event before an action invoke api call is made
763
+ */
764
+ smartLinkQuickActionStarted: function smartLinkQuickActionStarted(props) {
765
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackSmartLinkQuickActionStarted)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
766
+ },
767
+ /**
768
+ * This fires a tracking event after an action invoke api call is successful
769
+ */
770
+ smartLinkQuickActionSuccess: function smartLinkQuickActionSuccess(props) {
771
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackSmartLinkQuickActionSuccess)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
772
+ },
773
+ /**
774
+ * This fires a tracking event after an action invoke api call has failed
775
+ */
776
+ smartLinkQuickActionFailed: function smartLinkQuickActionFailed(props) {
777
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackSmartLinkQuickActionFailed)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
741
778
  }
742
779
  };
743
780
  }, [commonAttributes, dispatchAnalytics]);
@@ -11,30 +11,50 @@ var _react = require("react");
11
11
  var _linkClientExtension = require("@atlaskit/link-client-extension");
12
12
  var _linkProvider = require("@atlaskit/link-provider");
13
13
  var useInvoke = function useInvoke() {
14
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
15
+ failed = _ref.failed,
16
+ started = _ref.started,
17
+ success = _ref.success;
14
18
  var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
15
19
  connections = _useSmartLinkContext.connections;
16
20
  var clientExt = (0, _linkClientExtension.useSmartLinkClientExtension)(connections.client);
17
21
  return (0, _react.useCallback)( /*#__PURE__*/function () {
18
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(req, cb) {
19
- var response;
22
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(req, cb) {
23
+ var _req$action;
24
+ var smartLinkActionType, response;
20
25
  return _regenerator.default.wrap(function _callee$(_context) {
21
26
  while (1) switch (_context.prev = _context.next) {
22
27
  case 0:
23
- _context.next = 2;
28
+ smartLinkActionType = req === null || req === void 0 ? void 0 : (_req$action = req.action) === null || _req$action === void 0 ? void 0 : _req$action.actionType;
29
+ _context.prev = 1;
30
+ started && started({
31
+ smartLinkActionType: smartLinkActionType
32
+ });
33
+ _context.next = 5;
24
34
  return clientExt.invoke(req);
25
- case 2:
35
+ case 5:
26
36
  response = _context.sent;
37
+ success && success({
38
+ smartLinkActionType: smartLinkActionType
39
+ });
27
40
  return _context.abrupt("return", cb ? cb(response) : response);
28
- case 4:
41
+ case 10:
42
+ _context.prev = 10;
43
+ _context.t0 = _context["catch"](1);
44
+ failed && failed({
45
+ smartLinkActionType: smartLinkActionType
46
+ });
47
+ throw _context.t0;
48
+ case 14:
29
49
  case "end":
30
50
  return _context.stop();
31
51
  }
32
- }, _callee);
52
+ }, _callee, null, [[1, 10]]);
33
53
  }));
34
54
  return function (_x, _x2) {
35
- return _ref.apply(this, arguments);
55
+ return _ref2.apply(this, arguments);
36
56
  };
37
- }(), [clientExt]);
57
+ }(), [clientExt, failed, started, success]);
38
58
  };
39
59
  var _default = useInvoke;
40
60
  exports.default = _default;
@@ -9,13 +9,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
10
  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) { (0, _defineProperty2.default)(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; }
11
11
  var createStatusUpdateRequest = function createStatusUpdateRequest(request, id) {
12
- return _objectSpread(_objectSpread({}, request), {}, {
12
+ return {
13
+ providerKey: request.providerKey,
13
14
  action: _objectSpread(_objectSpread({}, request.action), {}, {
14
15
  payload: {
15
16
  newStatusId: id
16
17
  }
17
18
  })
18
- });
19
+ };
19
20
  };
20
21
  var _default = createStatusUpdateRequest;
21
22
  exports.default = _default;
@@ -4,14 +4,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.unresolvedEvent = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiIframeFocusedEvent = exports.uiIframeDwelledEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackLinkUpdated = exports.trackAppAccountConnected = exports.trackAppAccountAuthStarted = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
7
+ exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiIframeFocusedEvent = exports.uiIframeDwelledEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackSmartLinkQuickActionSuccess = exports.trackSmartLinkQuickActionStarted = exports.trackSmartLinkQuickActionFailed = exports.trackLinkUpdated = exports.trackAppAccountConnected = exports.trackAppAccountAuthStarted = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
12
  var _version = require("../../version.json");
13
13
  var _performance = require("../performance");
14
- var _excluded = ["actionSubjectId"];
14
+ var _excluded = ["actionSubjectId"],
15
+ _excluded2 = ["smartLinkActionType"],
16
+ _excluded3 = ["smartLinkActionType"],
17
+ _excluded4 = ["smartLinkActionType"];
15
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16
19
  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) { (0, _defineProperty2.default)(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; }
17
20
  var ANALYTICS_CHANNEL = 'media';
@@ -256,13 +259,52 @@ var trackLinkUpdated = function trackLinkUpdated(_ref8) {
256
259
  };
257
260
  };
258
261
  exports.trackLinkUpdated = trackLinkUpdated;
259
- var uiAuthEvent = function uiAuthEvent(_ref9) {
260
- var definitionId = _ref9.definitionId,
261
- extensionKey = _ref9.extensionKey,
262
- destinationProduct = _ref9.destinationProduct,
263
- destinationSubproduct = _ref9.destinationSubproduct,
264
- location = _ref9.location,
265
- display = _ref9.display;
262
+ var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref9) {
263
+ var smartLinkActionType = _ref9.smartLinkActionType,
264
+ attributes = (0, _objectWithoutProperties2.default)(_ref9, _excluded2);
265
+ return {
266
+ action: 'started',
267
+ actionSubject: 'smartLinkQuickAction',
268
+ eventType: 'track',
269
+ attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
270
+ smartLinkActionType: smartLinkActionType
271
+ })
272
+ };
273
+ };
274
+ exports.trackSmartLinkQuickActionStarted = trackSmartLinkQuickActionStarted;
275
+ var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref10) {
276
+ var smartLinkActionType = _ref10.smartLinkActionType,
277
+ attributes = (0, _objectWithoutProperties2.default)(_ref10, _excluded3);
278
+ return {
279
+ action: 'success',
280
+ actionSubject: 'smartLinkQuickAction',
281
+ eventType: 'track',
282
+ attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
283
+ smartLinkActionType: smartLinkActionType
284
+ })
285
+ };
286
+ };
287
+ exports.trackSmartLinkQuickActionSuccess = trackSmartLinkQuickActionSuccess;
288
+ var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref11) {
289
+ var smartLinkActionType = _ref11.smartLinkActionType,
290
+ attributes = (0, _objectWithoutProperties2.default)(_ref11, _excluded4);
291
+ return {
292
+ action: 'failed',
293
+ actionSubject: 'smartLinkQuickAction',
294
+ eventType: 'track',
295
+ attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
296
+ smartLinkActionType: smartLinkActionType
297
+ })
298
+ };
299
+ };
300
+ exports.trackSmartLinkQuickActionFailed = trackSmartLinkQuickActionFailed;
301
+ var uiAuthEvent = function uiAuthEvent(_ref12) {
302
+ var definitionId = _ref12.definitionId,
303
+ extensionKey = _ref12.extensionKey,
304
+ destinationProduct = _ref12.destinationProduct,
305
+ destinationSubproduct = _ref12.destinationSubproduct,
306
+ location = _ref12.location,
307
+ display = _ref12.display;
266
308
  return {
267
309
  action: 'clicked',
268
310
  actionSubject: 'button',
@@ -279,13 +321,13 @@ var uiAuthEvent = function uiAuthEvent(_ref9) {
279
321
  };
280
322
  };
281
323
  exports.uiAuthEvent = uiAuthEvent;
282
- var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref10) {
283
- var definitionId = _ref10.definitionId,
284
- extensionKey = _ref10.extensionKey,
285
- destinationProduct = _ref10.destinationProduct,
286
- destinationSubproduct = _ref10.destinationSubproduct,
287
- location = _ref10.location,
288
- display = _ref10.display;
324
+ var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref13) {
325
+ var definitionId = _ref13.definitionId,
326
+ extensionKey = _ref13.extensionKey,
327
+ destinationProduct = _ref13.destinationProduct,
328
+ destinationSubproduct = _ref13.destinationSubproduct,
329
+ location = _ref13.location,
330
+ display = _ref13.display;
289
331
  return {
290
332
  action: 'clicked',
291
333
  actionSubject: 'smartLink',
@@ -302,17 +344,17 @@ var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref10) {
302
344
  };
303
345
  };
304
346
  exports.uiAuthAlternateAccountEvent = uiAuthAlternateAccountEvent;
305
- var uiCardClickedEvent = function uiCardClickedEvent(_ref11) {
306
- var id = _ref11.id,
307
- display = _ref11.display,
308
- status = _ref11.status,
309
- definitionId = _ref11.definitionId,
310
- extensionKey = _ref11.extensionKey,
311
- isModifierKeyPressed = _ref11.isModifierKeyPressed,
312
- location = _ref11.location,
313
- destinationProduct = _ref11.destinationProduct,
314
- destinationSubproduct = _ref11.destinationSubproduct,
315
- actionSubjectId = _ref11.actionSubjectId;
347
+ var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
348
+ var id = _ref14.id,
349
+ display = _ref14.display,
350
+ status = _ref14.status,
351
+ definitionId = _ref14.definitionId,
352
+ extensionKey = _ref14.extensionKey,
353
+ isModifierKeyPressed = _ref14.isModifierKeyPressed,
354
+ location = _ref14.location,
355
+ destinationProduct = _ref14.destinationProduct,
356
+ destinationSubproduct = _ref14.destinationSubproduct,
357
+ actionSubjectId = _ref14.actionSubjectId;
316
358
  return {
317
359
  action: 'clicked',
318
360
  actionSubject: 'smartLink',
@@ -332,17 +374,17 @@ var uiCardClickedEvent = function uiCardClickedEvent(_ref11) {
332
374
  };
333
375
  };
334
376
  exports.uiCardClickedEvent = uiCardClickedEvent;
335
- var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref12) {
336
- var id = _ref12.id,
337
- display = _ref12.display,
338
- status = _ref12.status,
339
- definitionId = _ref12.definitionId,
340
- extensionKey = _ref12.extensionKey,
341
- location = _ref12.location,
342
- destinationProduct = _ref12.destinationProduct,
343
- destinationSubproduct = _ref12.destinationSubproduct,
344
- dwellTime = _ref12.dwellTime,
345
- dwellPercentVisible = _ref12.dwellPercentVisible;
377
+ var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
378
+ var id = _ref15.id,
379
+ display = _ref15.display,
380
+ status = _ref15.status,
381
+ definitionId = _ref15.definitionId,
382
+ extensionKey = _ref15.extensionKey,
383
+ location = _ref15.location,
384
+ destinationProduct = _ref15.destinationProduct,
385
+ destinationSubproduct = _ref15.destinationSubproduct,
386
+ dwellTime = _ref15.dwellTime,
387
+ dwellPercentVisible = _ref15.dwellPercentVisible;
346
388
  return {
347
389
  action: 'dwelled',
348
390
  actionSubject: 'smartLinkIframe',
@@ -362,15 +404,15 @@ var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref12) {
362
404
  };
363
405
  };
364
406
  exports.uiIframeDwelledEvent = uiIframeDwelledEvent;
365
- var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref13) {
366
- var id = _ref13.id,
367
- display = _ref13.display,
368
- status = _ref13.status,
369
- definitionId = _ref13.definitionId,
370
- extensionKey = _ref13.extensionKey,
371
- location = _ref13.location,
372
- destinationProduct = _ref13.destinationProduct,
373
- destinationSubproduct = _ref13.destinationSubproduct;
407
+ var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref16) {
408
+ var id = _ref16.id,
409
+ display = _ref16.display,
410
+ status = _ref16.status,
411
+ definitionId = _ref16.definitionId,
412
+ extensionKey = _ref16.extensionKey,
413
+ location = _ref16.location,
414
+ destinationProduct = _ref16.destinationProduct,
415
+ destinationSubproduct = _ref16.destinationSubproduct;
374
416
  return {
375
417
  action: 'focused',
376
418
  actionSubject: 'smartLinkIframe',
@@ -388,15 +430,15 @@ var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref13) {
388
430
  };
389
431
  };
390
432
  exports.uiIframeFocusedEvent = uiIframeFocusedEvent;
391
- var uiActionClickedEvent = function uiActionClickedEvent(_ref14) {
392
- var id = _ref14.id,
393
- actionType = _ref14.actionType,
394
- extensionKey = _ref14.extensionKey,
395
- display = _ref14.display,
396
- definitionId = _ref14.definitionId,
397
- destinationProduct = _ref14.destinationProduct,
398
- destinationSubproduct = _ref14.destinationSubproduct,
399
- location = _ref14.location;
433
+ var uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
434
+ var id = _ref17.id,
435
+ actionType = _ref17.actionType,
436
+ extensionKey = _ref17.extensionKey,
437
+ display = _ref17.display,
438
+ definitionId = _ref17.definitionId,
439
+ destinationProduct = _ref17.destinationProduct,
440
+ destinationSubproduct = _ref17.destinationSubproduct,
441
+ location = _ref17.location;
400
442
  return {
401
443
  action: 'clicked',
402
444
  actionSubject: 'button',
@@ -415,13 +457,13 @@ var uiActionClickedEvent = function uiActionClickedEvent(_ref14) {
415
457
  };
416
458
  };
417
459
  exports.uiActionClickedEvent = uiActionClickedEvent;
418
- var uiClosedAuthEvent = function uiClosedAuthEvent(_ref15) {
419
- var display = _ref15.display,
420
- extensionKey = _ref15.extensionKey,
421
- definitionId = _ref15.definitionId,
422
- destinationProduct = _ref15.destinationProduct,
423
- destinationSubproduct = _ref15.destinationSubproduct,
424
- location = _ref15.location;
460
+ var uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
461
+ var display = _ref18.display,
462
+ extensionKey = _ref18.extensionKey,
463
+ definitionId = _ref18.definitionId,
464
+ destinationProduct = _ref18.destinationProduct,
465
+ destinationSubproduct = _ref18.destinationSubproduct,
466
+ location = _ref18.location;
425
467
  return {
426
468
  action: 'closed',
427
469
  actionSubject: 'consentModal',
@@ -437,12 +479,12 @@ var uiClosedAuthEvent = function uiClosedAuthEvent(_ref15) {
437
479
  };
438
480
  };
439
481
  exports.uiClosedAuthEvent = uiClosedAuthEvent;
440
- var screenAuthPopupEvent = function screenAuthPopupEvent(_ref16) {
441
- var extensionKey = _ref16.extensionKey,
442
- definitionId = _ref16.definitionId,
443
- destinationProduct = _ref16.destinationProduct,
444
- destinationSubproduct = _ref16.destinationSubproduct,
445
- location = _ref16.location;
482
+ var screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
483
+ var extensionKey = _ref19.extensionKey,
484
+ definitionId = _ref19.definitionId,
485
+ destinationProduct = _ref19.destinationProduct,
486
+ destinationSubproduct = _ref19.destinationSubproduct,
487
+ location = _ref19.location;
446
488
  return {
447
489
  actionSubject: 'consentModal',
448
490
  eventType: 'screen',
@@ -456,14 +498,14 @@ var screenAuthPopupEvent = function screenAuthPopupEvent(_ref16) {
456
498
  };
457
499
  };
458
500
  exports.screenAuthPopupEvent = screenAuthPopupEvent;
459
- var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref17) {
460
- var display = _ref17.display,
461
- status = _ref17.status,
462
- extensionKey = _ref17.extensionKey,
463
- definitionId = _ref17.definitionId,
464
- destinationProduct = _ref17.destinationProduct,
465
- destinationSubproduct = _ref17.destinationSubproduct,
466
- location = _ref17.location;
501
+ var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
502
+ var display = _ref20.display,
503
+ status = _ref20.status,
504
+ extensionKey = _ref20.extensionKey,
505
+ definitionId = _ref20.definitionId,
506
+ destinationProduct = _ref20.destinationProduct,
507
+ destinationSubproduct = _ref20.destinationSubproduct,
508
+ location = _ref20.location;
467
509
  return {
468
510
  action: 'renderSuccess',
469
511
  actionSubject: 'smartLink',
@@ -480,15 +522,15 @@ var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref17) {
480
522
  };
481
523
  };
482
524
  exports.uiRenderSuccessEvent = uiRenderSuccessEvent;
483
- var uiRenderFailedEvent = function uiRenderFailedEvent(_ref18) {
484
- var display = _ref18.display,
485
- error = _ref18.error,
486
- errorInfo = _ref18.errorInfo,
487
- extensionKey = _ref18.extensionKey,
488
- definitionId = _ref18.definitionId,
489
- destinationProduct = _ref18.destinationProduct,
490
- destinationSubproduct = _ref18.destinationSubproduct,
491
- location = _ref18.location;
525
+ var uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
526
+ var display = _ref21.display,
527
+ error = _ref21.error,
528
+ errorInfo = _ref21.errorInfo,
529
+ extensionKey = _ref21.extensionKey,
530
+ definitionId = _ref21.definitionId,
531
+ destinationProduct = _ref21.destinationProduct,
532
+ destinationSubproduct = _ref21.destinationSubproduct,
533
+ location = _ref21.location;
492
534
  return {
493
535
  actionSubject: 'smartLink',
494
536
  action: 'renderFailed',
@@ -506,16 +548,16 @@ var uiRenderFailedEvent = function uiRenderFailedEvent(_ref18) {
506
548
  };
507
549
  };
508
550
  exports.uiRenderFailedEvent = uiRenderFailedEvent;
509
- var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref19) {
510
- var id = _ref19.id,
511
- previewDisplay = _ref19.previewDisplay,
512
- extensionKey = _ref19.extensionKey,
513
- definitionId = _ref19.definitionId,
514
- destinationProduct = _ref19.destinationProduct,
515
- destinationSubproduct = _ref19.destinationSubproduct,
516
- location = _ref19.location,
517
- previewInvokeMethod = _ref19.previewInvokeMethod,
518
- status = _ref19.status;
551
+ var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
552
+ var id = _ref22.id,
553
+ previewDisplay = _ref22.previewDisplay,
554
+ extensionKey = _ref22.extensionKey,
555
+ definitionId = _ref22.definitionId,
556
+ destinationProduct = _ref22.destinationProduct,
557
+ destinationSubproduct = _ref22.destinationSubproduct,
558
+ location = _ref22.location,
559
+ previewInvokeMethod = _ref22.previewInvokeMethod,
560
+ status = _ref22.status;
519
561
  return {
520
562
  action: 'viewed',
521
563
  actionSubject: 'hoverCard',
@@ -534,17 +576,17 @@ var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref19) {
534
576
  };
535
577
  };
536
578
  exports.uiHoverCardViewedEvent = uiHoverCardViewedEvent;
537
- var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref20) {
538
- var id = _ref20.id,
539
- previewDisplay = _ref20.previewDisplay,
540
- hoverTime = _ref20.hoverTime,
541
- extensionKey = _ref20.extensionKey,
542
- definitionId = _ref20.definitionId,
543
- destinationProduct = _ref20.destinationProduct,
544
- destinationSubproduct = _ref20.destinationSubproduct,
545
- location = _ref20.location,
546
- previewInvokeMethod = _ref20.previewInvokeMethod,
547
- status = _ref20.status;
579
+ var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23) {
580
+ var id = _ref23.id,
581
+ previewDisplay = _ref23.previewDisplay,
582
+ hoverTime = _ref23.hoverTime,
583
+ extensionKey = _ref23.extensionKey,
584
+ definitionId = _ref23.definitionId,
585
+ destinationProduct = _ref23.destinationProduct,
586
+ destinationSubproduct = _ref23.destinationSubproduct,
587
+ location = _ref23.location,
588
+ previewInvokeMethod = _ref23.previewInvokeMethod,
589
+ status = _ref23.status;
548
590
  return {
549
591
  action: 'dismissed',
550
592
  actionSubject: 'hoverCard',
@@ -564,15 +606,15 @@ var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref20) {
564
606
  };
565
607
  };
566
608
  exports.uiHoverCardDismissedEvent = uiHoverCardDismissedEvent;
567
- var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref21) {
568
- var id = _ref21.id,
569
- previewDisplay = _ref21.previewDisplay,
570
- extensionKey = _ref21.extensionKey,
571
- definitionId = _ref21.definitionId,
572
- destinationProduct = _ref21.destinationProduct,
573
- destinationSubproduct = _ref21.destinationSubproduct,
574
- location = _ref21.location,
575
- previewInvokeMethod = _ref21.previewInvokeMethod;
609
+ var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref24) {
610
+ var id = _ref24.id,
611
+ previewDisplay = _ref24.previewDisplay,
612
+ extensionKey = _ref24.extensionKey,
613
+ definitionId = _ref24.definitionId,
614
+ destinationProduct = _ref24.destinationProduct,
615
+ destinationSubproduct = _ref24.destinationSubproduct,
616
+ location = _ref24.location,
617
+ previewInvokeMethod = _ref24.previewInvokeMethod;
576
618
  return {
577
619
  action: 'clicked',
578
620
  actionSubject: 'button',
@@ -601,15 +643,15 @@ var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent() {
601
643
  };
602
644
  };
603
645
  exports.uiLearnMoreLinkClickedEvent = uiLearnMoreLinkClickedEvent;
604
- var chunkloadFailedEvent = function chunkloadFailedEvent(_ref22) {
605
- var display = _ref22.display,
606
- error = _ref22.error,
607
- errorInfo = _ref22.errorInfo,
608
- extensionKey = _ref22.extensionKey,
609
- definitionId = _ref22.definitionId,
610
- destinationProduct = _ref22.destinationProduct,
611
- destinationSubproduct = _ref22.destinationSubproduct,
612
- location = _ref22.location;
646
+ var chunkloadFailedEvent = function chunkloadFailedEvent(_ref25) {
647
+ var display = _ref25.display,
648
+ error = _ref25.error,
649
+ errorInfo = _ref25.errorInfo,
650
+ extensionKey = _ref25.extensionKey,
651
+ definitionId = _ref25.definitionId,
652
+ destinationProduct = _ref25.destinationProduct,
653
+ destinationSubproduct = _ref25.destinationSubproduct,
654
+ location = _ref25.location;
613
655
  return {
614
656
  action: 'chunkLoadFailed',
615
657
  actionSubject: 'smartLink',
@@ -626,4 +668,34 @@ var chunkloadFailedEvent = function chunkloadFailedEvent(_ref22) {
626
668
  })
627
669
  };
628
670
  };
629
- exports.chunkloadFailedEvent = chunkloadFailedEvent;
671
+ exports.chunkloadFailedEvent = chunkloadFailedEvent;
672
+ var uiSmartLinkStatusLozengeButtonClicked = function uiSmartLinkStatusLozengeButtonClicked() {
673
+ return {
674
+ action: 'clicked',
675
+ actionSubject: 'button',
676
+ actionSubjectId: 'smartLinkStatusLozenge',
677
+ eventType: 'ui',
678
+ attributes: _objectSpread({}, context)
679
+ };
680
+ };
681
+ exports.uiSmartLinkStatusLozengeButtonClicked = uiSmartLinkStatusLozengeButtonClicked;
682
+ var uiSmartLinkStatusListItemButtonClicked = function uiSmartLinkStatusListItemButtonClicked() {
683
+ return {
684
+ action: 'clicked',
685
+ actionSubject: 'button',
686
+ actionSubjectId: 'smartLinkStatusListItem',
687
+ eventType: 'ui',
688
+ attributes: _objectSpread({}, context)
689
+ };
690
+ };
691
+ exports.uiSmartLinkStatusListItemButtonClicked = uiSmartLinkStatusListItemButtonClicked;
692
+ var uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatusOpenPreviewButtonClicked() {
693
+ return {
694
+ action: 'clicked',
695
+ actionSubject: 'button',
696
+ actionSubjectId: 'smartLinkStatusOpenPreview',
697
+ eventType: 'ui',
698
+ attributes: _objectSpread({}, context)
699
+ };
700
+ };
701
+ exports.uiSmartLinkStatusOpenPreviewButtonClicked = uiSmartLinkStatusOpenPreviewButtonClicked;
@@ -149,6 +149,24 @@ Object.defineProperty(exports, "uiRenderSuccessEvent", {
149
149
  return _analytics.uiRenderSuccessEvent;
150
150
  }
151
151
  });
152
+ Object.defineProperty(exports, "uiSmartLinkStatusListItemButtonClicked", {
153
+ enumerable: true,
154
+ get: function get() {
155
+ return _analytics.uiSmartLinkStatusListItemButtonClicked;
156
+ }
157
+ });
158
+ Object.defineProperty(exports, "uiSmartLinkStatusLozengeButtonClicked", {
159
+ enumerable: true,
160
+ get: function get() {
161
+ return _analytics.uiSmartLinkStatusLozengeButtonClicked;
162
+ }
163
+ });
164
+ Object.defineProperty(exports, "uiSmartLinkStatusOpenPreviewButtonClicked", {
165
+ enumerable: true,
166
+ get: function get() {
167
+ return _analytics.uiSmartLinkStatusOpenPreviewButtonClicked;
168
+ }
169
+ });
152
170
  Object.defineProperty(exports, "unresolvedEvent", {
153
171
  enumerable: true,
154
172
  get: function get() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.0.0",
3
+ "version": "26.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -71,6 +71,7 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
71
71
  name: _constants.ElementName.ModifiedBy
72
72
  }].concat(baseMetadata);
73
73
  return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, {
74
+ analytics: analytics,
74
75
  appearance: "block",
75
76
  cardState: cardState,
76
77
  onClick: onClick,
@@ -194,7 +194,8 @@ function CardWithUrlContent(_ref) {
194
194
  url: url,
195
195
  testId: testId,
196
196
  onResolve: onResolve,
197
- onError: onError
197
+ onError: onError,
198
+ analytics: analytics
198
199
  }, children);
199
200
  }
200
201