@atlaskit/smart-card 26.5.4 → 26.5.6

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 (81) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +2 -2
  3. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +3 -4
  4. package/dist/cjs/state/hooks-external/useSmartLinkActions.js +4 -25
  5. package/dist/cjs/utils/analytics/analytics.js +134 -147
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/cjs/view/BlockCard/actions/PreviewAction.js +3 -3
  8. package/dist/cjs/view/BlockCard/index.js +9 -2
  9. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +4 -2
  10. package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +4 -2
  11. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +4 -2
  12. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -1
  13. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
  14. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +10 -5
  15. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +4 -30
  16. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -6
  17. package/dist/cjs/view/HoverCard/utils.js +2 -33
  18. package/dist/es2019/extractors/common/actions/extractPreviewAction.js +1 -4
  19. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +4 -6
  20. package/dist/es2019/state/hooks-external/useSmartLinkActions.js +3 -24
  21. package/dist/es2019/utils/analytics/analytics.js +0 -13
  22. package/dist/es2019/version.json +1 -1
  23. package/dist/es2019/view/BlockCard/actions/PreviewAction.js +1 -2
  24. package/dist/es2019/view/BlockCard/index.js +6 -1
  25. package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +3 -1
  26. package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +3 -1
  27. package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +3 -1
  28. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -1
  29. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -1
  30. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +9 -5
  31. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +3 -20
  32. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -7
  33. package/dist/es2019/view/HoverCard/utils.js +0 -20
  34. package/dist/esm/extractors/common/actions/extractPreviewAction.js +2 -2
  35. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +4 -5
  36. package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -26
  37. package/dist/esm/utils/analytics/analytics.js +130 -142
  38. package/dist/esm/version.json +1 -1
  39. package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -3
  40. package/dist/esm/view/BlockCard/index.js +9 -2
  41. package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +4 -2
  42. package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +4 -2
  43. package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +4 -2
  44. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -1
  45. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
  46. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +10 -5
  47. package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +4 -27
  48. package/dist/esm/view/HoverCard/components/views/resolved/index.js +3 -7
  49. package/dist/esm/view/HoverCard/utils.js +0 -29
  50. package/dist/types/model/invoke-opts.d.ts +1 -1
  51. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -1
  52. package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +1 -5
  53. package/dist/types/utils/analytics/analytics.d.ts +0 -3
  54. package/dist/types/view/BlockCard/components/Action.d.ts +1 -1
  55. package/dist/types/view/BlockCard/views/flexible/FlexibleErroredView.d.ts +1 -1
  56. package/dist/types/view/BlockCard/views/flexible/FlexibleForbiddenView.d.ts +1 -1
  57. package/dist/types/view/BlockCard/views/flexible/FlexibleNotFoundView.d.ts +1 -1
  58. package/dist/types/view/BlockCard/views/flexible/FlexibleResolvedView.d.ts +1 -1
  59. package/dist/types/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +1 -1
  60. package/dist/types/view/BlockCard/views/flexible/types.d.ts +9 -4
  61. package/dist/types/view/FlexibleCard/components/elements/lozenge/types.d.ts +0 -5
  62. package/dist/types/view/HoverCard/utils.d.ts +0 -3
  63. package/dist/types-ts4.5/model/invoke-opts.d.ts +1 -1
  64. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +2 -1
  65. package/dist/types-ts4.5/state/hooks-external/useSmartLinkActions.d.ts +1 -5
  66. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -3
  67. package/dist/types-ts4.5/view/BlockCard/components/Action.d.ts +1 -1
  68. package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleErroredView.d.ts +1 -1
  69. package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleForbiddenView.d.ts +1 -1
  70. package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleNotFoundView.d.ts +1 -1
  71. package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleResolvedView.d.ts +1 -1
  72. package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +1 -1
  73. package/dist/types-ts4.5/view/BlockCard/views/flexible/types.d.ts +9 -4
  74. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/types.d.ts +0 -5
  75. package/dist/types-ts4.5/view/HoverCard/utils.d.ts +0 -3
  76. package/package.json +5 -2
  77. package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +0 -16
  78. package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +0 -10
  79. package/dist/esm/extractors/common/lozenge/extractLozengeText.js +0 -9
  80. package/dist/types/extractors/common/lozenge/extractLozengeText.d.ts +0 -2
  81. package/dist/types-ts4.5/extractors/common/lozenge/extractLozengeText.d.ts +0 -2
@@ -73,24 +73,4 @@ export const getSimulatedMetadata = (extensionKey = '', data) => {
73
73
  }
74
74
  };
75
75
  }
76
- };
77
- export const toActionableMetadata = (onActionClick, extensionKey, types = [], cardActions = [], elementItems = []) => {
78
- // Actionable State for Jira issue
79
- if (extensionKey === 'jira-object-provider' && types !== null && types !== void 0 && types.includes('atlassian:Task')) {
80
- const previewAction = cardActions.find(action => action.id === 'preview-content');
81
- if (previewAction) {
82
- return elementItems.map(elementItem => elementItem.name === ElementName.State ? {
83
- ...elementItem,
84
- onClick: () => {
85
- if (onActionClick) {
86
- onActionClick(previewAction.id);
87
- }
88
- return previewAction.invoke({
89
- isReloadRequired: true
90
- });
91
- }
92
- } : elementItem);
93
- }
94
- }
95
- return elementItems;
96
76
  };
@@ -86,8 +86,8 @@ export var extractPreviewAction = function extractPreviewAction(_ref) {
86
86
  // - Promise invoked by the action invocation handler; open preview.
87
87
  previewActionProps.action.promise = previewAction.promise;
88
88
  // - Promise invoked on click of `Preview` on block card; trigger above promise.
89
- previewAction.promise = function (opts) {
90
- return handleInvoke(_objectSpread(_objectSpread({}, previewActionProps), opts));
89
+ previewAction.promise = function () {
90
+ return handleInvoke(previewActionProps);
91
91
  };
92
92
  return previewAction;
93
93
  }
@@ -8,7 +8,7 @@ import { chunkloadFailedEvent as _chunkloadFailedEvent, connectFailedEvent as _c
8
8
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
9
9
  import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getSubproduct } from '../helpers';
10
10
  import { useSmartLinkContext } from '@atlaskit/link-provider';
11
- import { trackLinkUpdated, trackSmartLinkQuickActionFailed, trackSmartLinkQuickActionStarted, trackSmartLinkQuickActionSuccess, uiIframeDwelledEvent, uiIframeFocusedEvent } from '../../utils/analytics/analytics';
11
+ import { trackSmartLinkQuickActionFailed, trackSmartLinkQuickActionStarted, trackSmartLinkQuickActionSuccess, uiIframeDwelledEvent, uiIframeFocusedEvent } from '../../utils/analytics/analytics';
12
12
  import { useDispatchAnalytics } from './useDispatchAnalytics';
13
13
  var applyCommonAttributes = function applyCommonAttributes(event, commonAttributes) {
14
14
  if (event && event.attributes) {
@@ -746,11 +746,10 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatch
746
746
  })), commonAttributes));
747
747
  },
748
748
  /**
749
- * This fires a tracking event before and after link updated.
749
+ * Removed in EDM-5153: This is an even from an experiment.
750
+ * @deprecated
750
751
  */
751
- linkUpdated: function linkUpdated(props) {
752
- return dispatchAnalytics(applyCommonAttributes(trackLinkUpdated(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
753
- },
752
+ linkUpdated: function linkUpdated(props) {},
754
753
  /**
755
754
  * This fires a tracking event before an action invoke api call is made
756
755
  */
@@ -1,12 +1,11 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import { useEffect, useMemo, useState } from 'react';
3
3
  import uuid from 'uuid';
4
4
  import { extractBlockProps as extractCardProps } from '../../extractors/block';
5
5
  import { useSmartCardActions as useLinkActions } from '../actions';
6
6
  import { useSmartLinkAnalytics as useLinkAnalytics } from '../analytics';
7
7
  import { useSmartCardState as useLinkState } from '../store';
8
8
  import { getExtensionKey } from '../helpers';
9
- import { useFeatureFlag } from '@atlaskit/link-provider';
10
9
  export function useSmartLinkActions(_ref) {
11
10
  var url = _ref.url,
12
11
  appearance = _ref.appearance,
@@ -24,34 +23,14 @@ export function useSmartLinkActions(_ref) {
24
23
  var linkState = useLinkState(url);
25
24
  var linkAnalytics = useLinkAnalytics(url, analyticsHandler, id);
26
25
  var linkActions = useLinkActions(id, url, linkAnalytics);
27
-
28
- // Start: Smart ink Actions experiment
29
- var enableActionableElement = useFeatureFlag('enableActionableElement');
30
- var reload = useCallback(function () {
31
- return linkActions.reload();
32
- }, [linkActions]);
33
- var handleInvoke = useCallback(function (opts) {
34
- var _opts$action;
35
- if (enableActionableElement && opts.type === 'client' && opts.isReloadRequired && ((_opts$action = opts.action) === null || _opts$action === void 0 ? void 0 : _opts$action.type) === 'PreviewAction') {
36
- // Reload when embed preview modal close
37
- var promise = opts.action.promise;
38
- opts.action.type = 'StatusAction';
39
- opts.action.promise = function () {
40
- return promise({
41
- onClose: reload
42
- });
43
- };
44
- }
45
- return linkActions.invoke(opts, appearance);
46
- }, [appearance, enableActionableElement, linkActions, reload]);
47
- // End: Smart ink Actions experiment
48
-
49
26
  useEffect(function () {
50
27
  if (!linkState.details) {
51
28
  return;
52
29
  }
53
30
  var cardProperties = extractCardProps(linkState.details.data, linkState.details.meta, {
54
- handleInvoke: handleInvoke,
31
+ handleInvoke: function handleInvoke(opts) {
32
+ return linkActions.invoke(opts, appearance);
33
+ },
55
34
  analytics: linkAnalytics,
56
35
  origin: origin,
57
36
  extensionKey: getExtensionKey(linkState.details),
@@ -68,6 +47,6 @@ export function useSmartLinkActions(_ref) {
68
47
  };
69
48
  });
70
49
  setActions(cardActions);
71
- }, [linkState, linkActions, linkAnalytics, appearance, platform, origin, handleInvoke]);
50
+ }, [linkState, linkActions, linkAnalytics, appearance, platform, origin]);
72
51
  return actions;
73
52
  }
@@ -2,10 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
5
- var _excluded = ["actionSubjectId"],
5
+ var _excluded = ["smartLinkActionType"],
6
6
  _excluded2 = ["smartLinkActionType"],
7
- _excluded3 = ["smartLinkActionType"],
8
- _excluded4 = ["smartLinkActionType"];
7
+ _excluded3 = ["smartLinkActionType"];
9
8
  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
9
  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; }
11
10
  import { name as packageName, version as packageVersion } from '../../version.json';
@@ -238,22 +237,23 @@ export var trackAppAccountAuthStarted = function trackAppAccountAuthStarted(_ref
238
237
  })
239
238
  };
240
239
  };
241
- export var trackLinkUpdated = function trackLinkUpdated(_ref8) {
242
- var actionSubjectId = _ref8.actionSubjectId,
240
+ export var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref8) {
241
+ var smartLinkActionType = _ref8.smartLinkActionType,
243
242
  attributes = _objectWithoutProperties(_ref8, _excluded);
244
243
  return {
245
- action: 'updated',
246
- actionSubject: 'link',
247
- actionSubjectId: actionSubjectId,
244
+ action: 'started',
245
+ actionSubject: 'smartLinkQuickAction',
248
246
  eventType: 'track',
249
- attributes: _objectSpread(_objectSpread({}, context), attributes)
247
+ attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
248
+ smartLinkActionType: smartLinkActionType
249
+ })
250
250
  };
251
251
  };
252
- export var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref9) {
252
+ export var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref9) {
253
253
  var smartLinkActionType = _ref9.smartLinkActionType,
254
254
  attributes = _objectWithoutProperties(_ref9, _excluded2);
255
255
  return {
256
- action: 'started',
256
+ action: 'success',
257
257
  actionSubject: 'smartLinkQuickAction',
258
258
  eventType: 'track',
259
259
  attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
@@ -261,11 +261,11 @@ export var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickAction
261
261
  })
262
262
  };
263
263
  };
264
- export var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref10) {
264
+ export var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref10) {
265
265
  var smartLinkActionType = _ref10.smartLinkActionType,
266
266
  attributes = _objectWithoutProperties(_ref10, _excluded3);
267
267
  return {
268
- action: 'success',
268
+ action: 'failed',
269
269
  actionSubject: 'smartLinkQuickAction',
270
270
  eventType: 'track',
271
271
  attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
@@ -273,19 +273,29 @@ export var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickAction
273
273
  })
274
274
  };
275
275
  };
276
- export var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref11) {
277
- var smartLinkActionType = _ref11.smartLinkActionType,
278
- attributes = _objectWithoutProperties(_ref11, _excluded4);
276
+ export var uiAuthEvent = function uiAuthEvent(_ref11) {
277
+ var definitionId = _ref11.definitionId,
278
+ extensionKey = _ref11.extensionKey,
279
+ destinationProduct = _ref11.destinationProduct,
280
+ destinationSubproduct = _ref11.destinationSubproduct,
281
+ location = _ref11.location,
282
+ display = _ref11.display;
279
283
  return {
280
- action: 'failed',
281
- actionSubject: 'smartLinkQuickAction',
282
- eventType: 'track',
283
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
284
- smartLinkActionType: smartLinkActionType
284
+ action: 'clicked',
285
+ actionSubject: 'button',
286
+ actionSubjectId: 'connectAccount',
287
+ eventType: 'ui',
288
+ attributes: _objectSpread(_objectSpread({}, context), {}, {
289
+ definitionId: definitionId,
290
+ extensionKey: extensionKey,
291
+ destinationProduct: destinationProduct,
292
+ destinationSubproduct: destinationSubproduct,
293
+ location: location,
294
+ display: display
285
295
  })
286
296
  };
287
297
  };
288
- export var uiAuthEvent = function uiAuthEvent(_ref12) {
298
+ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref12) {
289
299
  var definitionId = _ref12.definitionId,
290
300
  extensionKey = _ref12.extensionKey,
291
301
  destinationProduct = _ref12.destinationProduct,
@@ -294,8 +304,8 @@ export var uiAuthEvent = function uiAuthEvent(_ref12) {
294
304
  display = _ref12.display;
295
305
  return {
296
306
  action: 'clicked',
297
- actionSubject: 'button',
298
- actionSubjectId: 'connectAccount',
307
+ actionSubject: 'smartLink',
308
+ actionSubjectId: 'tryAnotherAccount',
299
309
  eventType: 'ui',
300
310
  attributes: _objectSpread(_objectSpread({}, context), {}, {
301
311
  definitionId: definitionId,
@@ -307,43 +317,49 @@ export var uiAuthEvent = function uiAuthEvent(_ref12) {
307
317
  })
308
318
  };
309
319
  };
310
- export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref13) {
311
- var definitionId = _ref13.definitionId,
320
+ export var uiCardClickedEvent = function uiCardClickedEvent(_ref13) {
321
+ var id = _ref13.id,
322
+ display = _ref13.display,
323
+ status = _ref13.status,
324
+ definitionId = _ref13.definitionId,
312
325
  extensionKey = _ref13.extensionKey,
326
+ isModifierKeyPressed = _ref13.isModifierKeyPressed,
327
+ location = _ref13.location,
313
328
  destinationProduct = _ref13.destinationProduct,
314
329
  destinationSubproduct = _ref13.destinationSubproduct,
315
- location = _ref13.location,
316
- display = _ref13.display;
330
+ actionSubjectId = _ref13.actionSubjectId;
317
331
  return {
318
332
  action: 'clicked',
319
333
  actionSubject: 'smartLink',
320
- actionSubjectId: 'tryAnotherAccount',
334
+ actionSubjectId: actionSubjectId,
321
335
  eventType: 'ui',
322
336
  attributes: _objectSpread(_objectSpread({}, context), {}, {
337
+ id: id,
338
+ status: status,
323
339
  definitionId: definitionId,
324
340
  extensionKey: extensionKey,
325
- destinationProduct: destinationProduct,
326
- destinationSubproduct: destinationSubproduct,
341
+ display: display,
342
+ isModifierKeyPressed: isModifierKeyPressed,
327
343
  location: location,
328
- display: display
344
+ destinationProduct: destinationProduct,
345
+ destinationSubproduct: destinationSubproduct
329
346
  })
330
347
  };
331
348
  };
332
- export var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
349
+ export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref14) {
333
350
  var id = _ref14.id,
334
351
  display = _ref14.display,
335
352
  status = _ref14.status,
336
353
  definitionId = _ref14.definitionId,
337
354
  extensionKey = _ref14.extensionKey,
338
- isModifierKeyPressed = _ref14.isModifierKeyPressed,
339
355
  location = _ref14.location,
340
356
  destinationProduct = _ref14.destinationProduct,
341
357
  destinationSubproduct = _ref14.destinationSubproduct,
342
- actionSubjectId = _ref14.actionSubjectId;
358
+ dwellTime = _ref14.dwellTime,
359
+ dwellPercentVisible = _ref14.dwellPercentVisible;
343
360
  return {
344
- action: 'clicked',
345
- actionSubject: 'smartLink',
346
- actionSubjectId: actionSubjectId,
361
+ action: 'dwelled',
362
+ actionSubject: 'smartLinkIframe',
347
363
  eventType: 'ui',
348
364
  attributes: _objectSpread(_objectSpread({}, context), {}, {
349
365
  id: id,
@@ -351,14 +367,15 @@ export var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
351
367
  definitionId: definitionId,
352
368
  extensionKey: extensionKey,
353
369
  display: display,
354
- isModifierKeyPressed: isModifierKeyPressed,
355
370
  location: location,
356
371
  destinationProduct: destinationProduct,
357
- destinationSubproduct: destinationSubproduct
372
+ destinationSubproduct: destinationSubproduct,
373
+ dwellTime: dwellTime,
374
+ dwellPercentVisible: dwellPercentVisible
358
375
  })
359
376
  };
360
377
  };
361
- export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
378
+ export var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref15) {
362
379
  var id = _ref15.id,
363
380
  display = _ref15.display,
364
381
  status = _ref15.status,
@@ -366,11 +383,9 @@ export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
366
383
  extensionKey = _ref15.extensionKey,
367
384
  location = _ref15.location,
368
385
  destinationProduct = _ref15.destinationProduct,
369
- destinationSubproduct = _ref15.destinationSubproduct,
370
- dwellTime = _ref15.dwellTime,
371
- dwellPercentVisible = _ref15.dwellPercentVisible;
386
+ destinationSubproduct = _ref15.destinationSubproduct;
372
387
  return {
373
- action: 'dwelled',
388
+ action: 'focused',
374
389
  actionSubject: 'smartLinkIframe',
375
390
  eventType: 'ui',
376
391
  attributes: _objectSpread(_objectSpread({}, context), {}, {
@@ -381,153 +396,154 @@ export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
381
396
  display: display,
382
397
  location: location,
383
398
  destinationProduct: destinationProduct,
384
- destinationSubproduct: destinationSubproduct,
385
- dwellTime: dwellTime,
386
- dwellPercentVisible: dwellPercentVisible
399
+ destinationSubproduct: destinationSubproduct
387
400
  })
388
401
  };
389
402
  };
390
- export var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref16) {
403
+ export var uiActionClickedEvent = function uiActionClickedEvent(_ref16) {
391
404
  var id = _ref16.id,
405
+ actionType = _ref16.actionType,
406
+ extensionKey = _ref16.extensionKey,
392
407
  display = _ref16.display,
393
- status = _ref16.status,
394
408
  definitionId = _ref16.definitionId,
395
- extensionKey = _ref16.extensionKey,
396
- location = _ref16.location,
397
409
  destinationProduct = _ref16.destinationProduct,
398
- destinationSubproduct = _ref16.destinationSubproduct;
410
+ destinationSubproduct = _ref16.destinationSubproduct,
411
+ location = _ref16.location;
399
412
  return {
400
- action: 'focused',
401
- actionSubject: 'smartLinkIframe',
413
+ action: 'clicked',
414
+ actionSubject: 'button',
415
+ actionSubjectId: uiActionSubjectIds[actionType],
402
416
  eventType: 'ui',
403
417
  attributes: _objectSpread(_objectSpread({}, context), {}, {
404
418
  id: id,
405
- status: status,
406
- definitionId: definitionId,
407
- extensionKey: extensionKey,
408
419
  display: display,
409
- location: location,
420
+ actionType: actionType,
421
+ extensionKey: extensionKey,
422
+ definitionId: definitionId,
410
423
  destinationProduct: destinationProduct,
411
- destinationSubproduct: destinationSubproduct
424
+ destinationSubproduct: destinationSubproduct,
425
+ location: location
412
426
  })
413
427
  };
414
428
  };
415
- export var uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
416
- var id = _ref17.id,
417
- actionType = _ref17.actionType,
429
+ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref17) {
430
+ var display = _ref17.display,
418
431
  extensionKey = _ref17.extensionKey,
419
- display = _ref17.display,
420
432
  definitionId = _ref17.definitionId,
421
433
  destinationProduct = _ref17.destinationProduct,
422
434
  destinationSubproduct = _ref17.destinationSubproduct,
423
435
  location = _ref17.location;
424
436
  return {
425
- action: 'clicked',
426
- actionSubject: 'button',
427
- actionSubjectId: uiActionSubjectIds[actionType],
437
+ action: 'closed',
438
+ actionSubject: 'consentModal',
428
439
  eventType: 'ui',
429
440
  attributes: _objectSpread(_objectSpread({}, context), {}, {
430
- id: id,
431
- display: display,
432
- actionType: actionType,
433
441
  extensionKey: extensionKey,
434
442
  definitionId: definitionId,
435
443
  destinationProduct: destinationProduct,
436
444
  destinationSubproduct: destinationSubproduct,
437
- location: location
445
+ location: location,
446
+ display: display
438
447
  })
439
448
  };
440
449
  };
441
- export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
442
- var display = _ref18.display,
443
- extensionKey = _ref18.extensionKey,
450
+ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref18) {
451
+ var extensionKey = _ref18.extensionKey,
444
452
  definitionId = _ref18.definitionId,
445
453
  destinationProduct = _ref18.destinationProduct,
446
454
  destinationSubproduct = _ref18.destinationSubproduct,
447
455
  location = _ref18.location;
448
456
  return {
449
- action: 'closed',
450
457
  actionSubject: 'consentModal',
451
- eventType: 'ui',
458
+ eventType: 'screen',
452
459
  attributes: _objectSpread(_objectSpread({}, context), {}, {
453
460
  extensionKey: extensionKey,
454
461
  definitionId: definitionId,
455
462
  destinationProduct: destinationProduct,
456
463
  destinationSubproduct: destinationSubproduct,
457
- location: location,
458
- display: display
464
+ location: location
459
465
  })
460
466
  };
461
467
  };
462
- export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
463
- var extensionKey = _ref19.extensionKey,
468
+ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref19) {
469
+ var display = _ref19.display,
470
+ status = _ref19.status,
471
+ extensionKey = _ref19.extensionKey,
464
472
  definitionId = _ref19.definitionId,
465
473
  destinationProduct = _ref19.destinationProduct,
466
474
  destinationSubproduct = _ref19.destinationSubproduct,
467
475
  location = _ref19.location;
468
476
  return {
469
- actionSubject: 'consentModal',
470
- eventType: 'screen',
477
+ action: 'renderSuccess',
478
+ actionSubject: 'smartLink',
479
+ eventType: 'ui',
471
480
  attributes: _objectSpread(_objectSpread({}, context), {}, {
481
+ status: status,
472
482
  extensionKey: extensionKey,
473
483
  definitionId: definitionId,
474
484
  destinationProduct: destinationProduct,
475
485
  destinationSubproduct: destinationSubproduct,
476
- location: location
486
+ location: location,
487
+ display: display
477
488
  })
478
489
  };
479
490
  };
480
- export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
491
+ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref20) {
481
492
  var display = _ref20.display,
482
- status = _ref20.status,
493
+ error = _ref20.error,
494
+ errorInfo = _ref20.errorInfo,
483
495
  extensionKey = _ref20.extensionKey,
484
496
  definitionId = _ref20.definitionId,
485
497
  destinationProduct = _ref20.destinationProduct,
486
498
  destinationSubproduct = _ref20.destinationSubproduct,
487
499
  location = _ref20.location;
488
500
  return {
489
- action: 'renderSuccess',
490
501
  actionSubject: 'smartLink',
502
+ action: 'renderFailed',
491
503
  eventType: 'ui',
492
504
  attributes: _objectSpread(_objectSpread({}, context), {}, {
493
- status: status,
505
+ error: error,
506
+ errorInfo: errorInfo,
507
+ display: display,
494
508
  extensionKey: extensionKey,
495
509
  definitionId: definitionId,
496
510
  destinationProduct: destinationProduct,
497
511
  destinationSubproduct: destinationSubproduct,
498
- location: location,
499
- display: display
512
+ location: location
500
513
  })
501
514
  };
502
515
  };
503
- export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
504
- var display = _ref21.display,
505
- error = _ref21.error,
506
- errorInfo = _ref21.errorInfo,
516
+ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref21) {
517
+ var id = _ref21.id,
518
+ previewDisplay = _ref21.previewDisplay,
507
519
  extensionKey = _ref21.extensionKey,
508
520
  definitionId = _ref21.definitionId,
509
521
  destinationProduct = _ref21.destinationProduct,
510
522
  destinationSubproduct = _ref21.destinationSubproduct,
511
- location = _ref21.location;
523
+ location = _ref21.location,
524
+ previewInvokeMethod = _ref21.previewInvokeMethod,
525
+ status = _ref21.status;
512
526
  return {
513
- actionSubject: 'smartLink',
514
- action: 'renderFailed',
527
+ action: 'viewed',
528
+ actionSubject: 'hoverCard',
515
529
  eventType: 'ui',
516
530
  attributes: _objectSpread(_objectSpread({}, context), {}, {
517
- error: error,
518
- errorInfo: errorInfo,
519
- display: display,
531
+ id: id,
532
+ previewDisplay: previewDisplay,
520
533
  extensionKey: extensionKey,
521
534
  definitionId: definitionId,
522
535
  destinationProduct: destinationProduct,
523
536
  destinationSubproduct: destinationSubproduct,
524
- location: location
537
+ location: location,
538
+ previewInvokeMethod: previewInvokeMethod,
539
+ status: status
525
540
  })
526
541
  };
527
542
  };
528
- export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
543
+ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref22) {
529
544
  var id = _ref22.id,
530
545
  previewDisplay = _ref22.previewDisplay,
546
+ hoverTime = _ref22.hoverTime,
531
547
  extensionKey = _ref22.extensionKey,
532
548
  definitionId = _ref22.definitionId,
533
549
  destinationProduct = _ref22.destinationProduct,
@@ -536,12 +552,13 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
536
552
  previewInvokeMethod = _ref22.previewInvokeMethod,
537
553
  status = _ref22.status;
538
554
  return {
539
- action: 'viewed',
555
+ action: 'dismissed',
540
556
  actionSubject: 'hoverCard',
541
557
  eventType: 'ui',
542
558
  attributes: _objectSpread(_objectSpread({}, context), {}, {
543
559
  id: id,
544
560
  previewDisplay: previewDisplay,
561
+ hoverTime: hoverTime,
545
562
  extensionKey: extensionKey,
546
563
  definitionId: definitionId,
547
564
  destinationProduct: destinationProduct,
@@ -552,44 +569,15 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
552
569
  })
553
570
  };
554
571
  };
555
- export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23) {
572
+ export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref23) {
556
573
  var id = _ref23.id,
557
574
  previewDisplay = _ref23.previewDisplay,
558
- hoverTime = _ref23.hoverTime,
559
575
  extensionKey = _ref23.extensionKey,
560
576
  definitionId = _ref23.definitionId,
561
577
  destinationProduct = _ref23.destinationProduct,
562
578
  destinationSubproduct = _ref23.destinationSubproduct,
563
579
  location = _ref23.location,
564
- previewInvokeMethod = _ref23.previewInvokeMethod,
565
- status = _ref23.status;
566
- return {
567
- action: 'dismissed',
568
- actionSubject: 'hoverCard',
569
- eventType: 'ui',
570
- attributes: _objectSpread(_objectSpread({}, context), {}, {
571
- id: id,
572
- previewDisplay: previewDisplay,
573
- hoverTime: hoverTime,
574
- extensionKey: extensionKey,
575
- definitionId: definitionId,
576
- destinationProduct: destinationProduct,
577
- destinationSubproduct: destinationSubproduct,
578
- location: location,
579
- previewInvokeMethod: previewInvokeMethod,
580
- status: status
581
- })
582
- };
583
- };
584
- export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref24) {
585
- var id = _ref24.id,
586
- previewDisplay = _ref24.previewDisplay,
587
- extensionKey = _ref24.extensionKey,
588
- definitionId = _ref24.definitionId,
589
- destinationProduct = _ref24.destinationProduct,
590
- destinationSubproduct = _ref24.destinationSubproduct,
591
- location = _ref24.location,
592
- previewInvokeMethod = _ref24.previewInvokeMethod;
580
+ previewInvokeMethod = _ref23.previewInvokeMethod;
593
581
  return {
594
582
  action: 'clicked',
595
583
  actionSubject: 'button',
@@ -616,15 +604,15 @@ export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent()
616
604
  attributes: _objectSpread({}, context)
617
605
  };
618
606
  };
619
- export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref25) {
620
- var display = _ref25.display,
621
- error = _ref25.error,
622
- errorInfo = _ref25.errorInfo,
623
- extensionKey = _ref25.extensionKey,
624
- definitionId = _ref25.definitionId,
625
- destinationProduct = _ref25.destinationProduct,
626
- destinationSubproduct = _ref25.destinationSubproduct,
627
- location = _ref25.location;
607
+ export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref24) {
608
+ var display = _ref24.display,
609
+ error = _ref24.error,
610
+ errorInfo = _ref24.errorInfo,
611
+ extensionKey = _ref24.extensionKey,
612
+ definitionId = _ref24.definitionId,
613
+ destinationProduct = _ref24.destinationProduct,
614
+ destinationSubproduct = _ref24.destinationSubproduct,
615
+ location = _ref24.location;
628
616
  return {
629
617
  action: 'chunkLoadFailed',
630
618
  actionSubject: 'smartLink',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.5.4",
3
+ "version": "26.5.6",
4
4
  "sideEffects": false
5
5
  }
@@ -76,14 +76,14 @@ export default (function (_ref2) {
76
76
  return {
77
77
  id: 'preview-content',
78
78
  text: /*#__PURE__*/React.createElement(FormattedMessage, previewText),
79
- promise: function promise(props) {
80
- return previewFunction(_objectSpread(_objectSpread({
79
+ promise: function promise() {
80
+ return previewFunction(_objectSpread({
81
81
  popupMountPointId: 'twp-editor-preview-iframe',
82
82
  providerName: 'Preview',
83
83
  showModal: true,
84
84
  iframeName: 'twp-editor-preview-iframe',
85
85
  onClose: function onClose() {}
86
- }, props), rest));
86
+ }, rest));
87
87
  }
88
88
  };
89
89
  });