@atlaskit/smart-card 30.3.4 → 30.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/messages.js +3 -3
  3. package/dist/cjs/state/actions/index.js +4 -11
  4. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +6 -81
  5. package/dist/cjs/utils/analytics/analytics.js +104 -216
  6. package/dist/cjs/utils/analytics/index.js +0 -12
  7. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -11
  8. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  9. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  10. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  11. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -10
  12. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -98
  13. package/dist/cjs/view/LinkUrl/index.js +1 -1
  14. package/dist/es2019/messages.js +3 -3
  15. package/dist/es2019/state/actions/index.js +4 -11
  16. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +3 -78
  17. package/dist/es2019/utils/analytics/analytics.js +1 -118
  18. package/dist/es2019/utils/analytics/index.js +1 -1
  19. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -12
  20. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  21. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  22. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  23. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -10
  24. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -79
  25. package/dist/es2019/view/LinkUrl/index.js +1 -1
  26. package/dist/esm/messages.js +3 -3
  27. package/dist/esm/state/actions/index.js +4 -11
  28. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +8 -83
  29. package/dist/esm/utils/analytics/analytics.js +103 -215
  30. package/dist/esm/utils/analytics/index.js +1 -1
  31. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -12
  32. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  33. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  34. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  35. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +2 -10
  36. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -98
  37. package/dist/esm/view/LinkUrl/index.js +1 -1
  38. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -49
  39. package/dist/types/state/hooks/useSmartLink.d.ts +0 -16
  40. package/dist/types/utils/analytics/analytics.d.ts +1 -32
  41. package/dist/types/utils/analytics/index.d.ts +1 -1
  42. package/dist/types/utils/analytics/types.d.ts +0 -1
  43. package/dist/types/utils/mocks.d.ts +0 -16
  44. package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  45. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  46. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -49
  47. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -16
  48. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -32
  49. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  50. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -1
  51. package/dist/types-ts4.5/utils/mocks.d.ts +0 -16
  52. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  53. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  54. package/package.json +7 -10
@@ -5,8 +5,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { useMemo } from 'react';
6
6
  import { useSmartLinkContext } from '@atlaskit/link-provider';
7
7
  import { getUrl } from '@atlaskit/linking-common';
8
- import { chunkloadFailedEvent as _chunkloadFailedEvent, connectFailedEvent as _connectFailedEvent, connectSucceededEvent as _connectSucceededEvent, context, instrumentEvent, invokeFailedEvent as _invokeFailedEvent, invokeSucceededEvent as _invokeSucceededEvent, screenAuthPopupEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from '../../utils/analytics';
9
- import { trackHoverCardResolutionStarted, trackSmartLinkQuickActionFailed, trackSmartLinkQuickActionStarted, trackSmartLinkQuickActionSuccess, uiServerActionClicked } from '../../utils/analytics/analytics';
8
+ import { chunkloadFailedEvent as _chunkloadFailedEvent, connectFailedEvent as _connectFailedEvent, connectSucceededEvent as _connectSucceededEvent, context, instrumentEvent, invokeFailedEvent as _invokeFailedEvent, invokeSucceededEvent as _invokeSucceededEvent, screenAuthPopupEvent, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from '../../utils/analytics';
9
+ import { uiServerActionClicked } from '../../utils/analytics/analytics';
10
10
  import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getStatusDetails, getSubproduct } from '../helpers';
11
11
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
12
12
  import { useDispatchAnalytics } from './useDispatchAnalytics';
@@ -633,97 +633,23 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
633
633
  };
634
634
  }, [defaultId, commonAttributes, dispatchAnalytics]);
635
635
 
636
- /** Contains all track analytics events */
637
- var track = useMemo(function () {
636
+ /** Contains all screen analytics events */
637
+ var screen = useMemo(function () {
638
638
  return {
639
639
  /**
640
- * This fires an event which represents a user connecting their account to view a Smart Link.
640
+ * This fires an event which represents the connect account page being opened.
641
641
  * @param definitionId The definitionId of the Smart Link resolver invoked.
642
642
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
643
643
  * @returns
644
- * @deprecated
644
+ * @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
645
645
  */
646
- appAccountConnected: function appAccountConnected(_ref17) {
646
+ authPopupEvent: function authPopupEvent(_ref17) {
647
647
  var extensionKey = _ref17.extensionKey,
648
648
  definitionId = _ref17.definitionId,
649
649
  resourceType = _ref17.resourceType,
650
650
  destinationProduct = _ref17.destinationProduct,
651
651
  destinationSubproduct = _ref17.destinationSubproduct,
652
652
  location = _ref17.location;
653
- return dispatchAnalytics(applyCommonAttributes(trackAppAccountConnected(_objectSpread(_objectSpread({}, commonAttributes), {}, {
654
- extensionKey: extensionKey,
655
- definitionId: definitionId,
656
- resourceType: resourceType,
657
- destinationProduct: destinationProduct,
658
- destinationSubproduct: destinationSubproduct,
659
- location: location
660
- })), commonAttributes));
661
- },
662
- /**
663
- * This fires an event which represents a user starting the Smart Link connect account process.
664
- * @param location a location where the Smart Link auth action was initiated.
665
- * @param extensionKey The extensionKey of the Smart Link resolver invoked.
666
- * @returns
667
- * @deprecated
668
- */
669
- appAccountAuthStarted: function appAccountAuthStarted(_ref18) {
670
- var extensionKey = _ref18.extensionKey,
671
- location = _ref18.location;
672
- return dispatchAnalytics(applyCommonAttributes(trackAppAccountAuthStarted(_objectSpread(_objectSpread({}, commonAttributes), {}, {
673
- extensionKey: extensionKey,
674
- location: location
675
- })), commonAttributes));
676
- },
677
- /**
678
- * This fires a tracking event before an action invoke api call is made
679
- * @deprecated
680
- */
681
- smartLinkQuickActionStarted: function smartLinkQuickActionStarted(props) {
682
- return dispatchAnalytics(applyCommonAttributes(trackSmartLinkQuickActionStarted(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
683
- },
684
- /**
685
- * This fires a tracking event after an action invoke api call is successful
686
- * @deprecated
687
- */
688
- smartLinkQuickActionSuccess: function smartLinkQuickActionSuccess(props) {
689
- return dispatchAnalytics(applyCommonAttributes(trackSmartLinkQuickActionSuccess(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
690
- },
691
- /**
692
- * This fires a tracking event after an action invoke api call has failed
693
- * @deprecated
694
- */
695
- smartLinkQuickActionFailed: function smartLinkQuickActionFailed(props) {
696
- return dispatchAnalytics(applyCommonAttributes(trackSmartLinkQuickActionFailed(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
697
- },
698
- /**
699
- * Fires a track event when we call loadMetadata() to get information for a hover card
700
- * @deprecated
701
- */
702
- hoverCardResolutionStarted: function hoverCardResolutionStarted() {
703
- return dispatchAnalytics(applyCommonAttributes(trackHoverCardResolutionStarted(_objectSpread({
704
- display: 'hoverCardPreview'
705
- }, commonAttributes)), commonAttributes));
706
- }
707
- };
708
- }, [commonAttributes, dispatchAnalytics]);
709
-
710
- /** Contains all screen analytics events */
711
- var screen = useMemo(function () {
712
- return {
713
- /**
714
- * This fires an event which represents the connect account page being opened.
715
- * @param definitionId The definitionId of the Smart Link resolver invoked.
716
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
717
- * @returns
718
- * @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
719
- */
720
- authPopupEvent: function authPopupEvent(_ref19) {
721
- var extensionKey = _ref19.extensionKey,
722
- definitionId = _ref19.definitionId,
723
- resourceType = _ref19.resourceType,
724
- destinationProduct = _ref19.destinationProduct,
725
- destinationSubproduct = _ref19.destinationSubproduct,
726
- location = _ref19.location;
727
653
  return dispatchAnalytics(applyCommonAttributes(screenAuthPopupEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
728
654
  extensionKey: extensionKey,
729
655
  definitionId: definitionId,
@@ -752,8 +678,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
752
678
  return {
753
679
  ui: ui,
754
680
  operational: operational,
755
- track: track,
756
681
  screen: screen
757
682
  };
758
- }, [ui, operational, track, screen]);
683
+ }, [ui, operational, screen]);
759
684
  };
@@ -1,11 +1,6 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
2
  import _createClass from "@babel/runtime/helpers/createClass";
4
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
- var _excluded = ["smartLinkActionType"],
6
- _excluded2 = ["smartLinkActionType"],
7
- _excluded3 = ["smartLinkActionType"],
8
- _excluded4 = ["display"];
9
4
  var _SmartLinkActionTypeT, _SmartLinkActionTypeU;
10
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -15,7 +10,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
10
  export var context = {
16
11
  componentName: 'smart-cards',
17
12
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "30.3.4"
13
+ packageVersion: "30.4.1"
19
14
  };
20
15
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
16
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -205,120 +200,13 @@ export var connectFailedEvent = function connectFailedEvent(_ref5) {
205
200
  })
206
201
  };
207
202
  };
208
-
209
- /**
210
- * @deprecated
211
- */
212
- export var trackAppAccountConnected = function trackAppAccountConnected(_ref6) {
203
+ export var uiAuthEvent = function uiAuthEvent(_ref6) {
213
204
  var definitionId = _ref6.definitionId,
214
205
  extensionKey = _ref6.extensionKey,
215
206
  destinationProduct = _ref6.destinationProduct,
216
207
  destinationSubproduct = _ref6.destinationSubproduct,
217
- location = _ref6.location;
218
- return {
219
- action: 'connected',
220
- actionSubject: 'applicationAccount',
221
- eventType: 'track',
222
- attributes: _objectSpread(_objectSpread({}, context), {}, {
223
- definitionId: definitionId,
224
- extensionKey: extensionKey,
225
- destinationProduct: destinationProduct,
226
- destinationSubproduct: destinationSubproduct,
227
- location: location
228
- })
229
- };
230
- };
231
-
232
- /**
233
- * @deprecated
234
- */
235
- export var trackAppAccountAuthStarted = function trackAppAccountAuthStarted(_ref7) {
236
- var extensionKey = _ref7.extensionKey,
237
- location = _ref7.location;
238
- return {
239
- action: 'authStarted',
240
- actionSubject: 'applicationAccount',
241
- eventType: 'track',
242
- attributes: _objectSpread(_objectSpread({}, context), {}, {
243
- extensionKey: extensionKey,
244
- location: location
245
- })
246
- };
247
- };
248
-
249
- /**
250
- * @deprecated
251
- */
252
- export var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref8) {
253
- var _SmartLinkActionTypeT2;
254
- var smartLinkActionType = _ref8.smartLinkActionType,
255
- attributes = _objectWithoutProperties(_ref8, _excluded);
256
- return {
257
- action: 'started',
258
- actionSubject: 'smartLinkQuickAction',
259
- eventType: 'track',
260
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
261
- smartLinkActionType: (_SmartLinkActionTypeT2 = SmartLinkActionTypeTrackingEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeT2 !== void 0 ? _SmartLinkActionTypeT2 : smartLinkActionType
262
- })
263
- };
264
- };
265
-
266
- /**
267
- * @deprecated
268
- */
269
- export var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref9) {
270
- var _SmartLinkActionTypeT3;
271
- var smartLinkActionType = _ref9.smartLinkActionType,
272
- attributes = _objectWithoutProperties(_ref9, _excluded2);
273
- return {
274
- action: 'success',
275
- actionSubject: 'smartLinkQuickAction',
276
- eventType: 'track',
277
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
278
- smartLinkActionType: (_SmartLinkActionTypeT3 = SmartLinkActionTypeTrackingEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeT3 !== void 0 ? _SmartLinkActionTypeT3 : smartLinkActionType
279
- })
280
- };
281
- };
282
-
283
- /**
284
- * @deprecated
285
- */
286
- export var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref10) {
287
- var _SmartLinkActionTypeT4;
288
- var smartLinkActionType = _ref10.smartLinkActionType,
289
- attributes = _objectWithoutProperties(_ref10, _excluded3);
290
- return {
291
- action: 'failed',
292
- actionSubject: 'smartLinkQuickAction',
293
- eventType: 'track',
294
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
295
- smartLinkActionType: (_SmartLinkActionTypeT4 = SmartLinkActionTypeTrackingEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeT4 !== void 0 ? _SmartLinkActionTypeT4 : smartLinkActionType
296
- })
297
- };
298
- };
299
-
300
- /**
301
- * @deprecated
302
- */
303
- export var trackHoverCardResolutionStarted = function trackHoverCardResolutionStarted(_ref11) {
304
- var display = _ref11.display,
305
- attributes = _objectWithoutProperties(_ref11, _excluded4);
306
- return {
307
- action: 'resolved',
308
- actionSubject: 'hoverCard',
309
- eventType: 'track',
310
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
311
- display: display
312
- })
313
- };
314
- };
315
- export var uiAuthEvent = function uiAuthEvent(_ref12) {
316
- var definitionId = _ref12.definitionId,
317
- extensionKey = _ref12.extensionKey,
318
- destinationProduct = _ref12.destinationProduct,
319
- destinationSubproduct = _ref12.destinationSubproduct,
320
- location = _ref12.location,
321
- display = _ref12.display;
208
+ location = _ref6.location,
209
+ display = _ref6.display;
322
210
  return {
323
211
  action: 'clicked',
324
212
  actionSubject: 'button',
@@ -334,13 +222,13 @@ export var uiAuthEvent = function uiAuthEvent(_ref12) {
334
222
  })
335
223
  };
336
224
  };
337
- export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref13) {
338
- var definitionId = _ref13.definitionId,
339
- extensionKey = _ref13.extensionKey,
340
- destinationProduct = _ref13.destinationProduct,
341
- destinationSubproduct = _ref13.destinationSubproduct,
342
- location = _ref13.location,
343
- display = _ref13.display;
225
+ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref7) {
226
+ var definitionId = _ref7.definitionId,
227
+ extensionKey = _ref7.extensionKey,
228
+ destinationProduct = _ref7.destinationProduct,
229
+ destinationSubproduct = _ref7.destinationSubproduct,
230
+ location = _ref7.location,
231
+ display = _ref7.display;
344
232
  return {
345
233
  action: 'clicked',
346
234
  actionSubject: 'smartLink',
@@ -356,17 +244,17 @@ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_r
356
244
  })
357
245
  };
358
246
  };
359
- export var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
360
- var id = _ref14.id,
361
- display = _ref14.display,
362
- status = _ref14.status,
363
- definitionId = _ref14.definitionId,
364
- extensionKey = _ref14.extensionKey,
365
- isModifierKeyPressed = _ref14.isModifierKeyPressed,
366
- location = _ref14.location,
367
- destinationProduct = _ref14.destinationProduct,
368
- destinationSubproduct = _ref14.destinationSubproduct,
369
- actionSubjectId = _ref14.actionSubjectId;
247
+ export var uiCardClickedEvent = function uiCardClickedEvent(_ref8) {
248
+ var id = _ref8.id,
249
+ display = _ref8.display,
250
+ status = _ref8.status,
251
+ definitionId = _ref8.definitionId,
252
+ extensionKey = _ref8.extensionKey,
253
+ isModifierKeyPressed = _ref8.isModifierKeyPressed,
254
+ location = _ref8.location,
255
+ destinationProduct = _ref8.destinationProduct,
256
+ destinationSubproduct = _ref8.destinationSubproduct,
257
+ actionSubjectId = _ref8.actionSubjectId;
370
258
  return {
371
259
  action: 'clicked',
372
260
  actionSubject: 'smartLink',
@@ -385,15 +273,15 @@ export var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
385
273
  })
386
274
  };
387
275
  };
388
- export var uiActionClickedEvent = function uiActionClickedEvent(_ref15) {
389
- var id = _ref15.id,
390
- actionType = _ref15.actionType,
391
- extensionKey = _ref15.extensionKey,
392
- display = _ref15.display,
393
- definitionId = _ref15.definitionId,
394
- destinationProduct = _ref15.destinationProduct,
395
- destinationSubproduct = _ref15.destinationSubproduct,
396
- location = _ref15.location;
276
+ export var uiActionClickedEvent = function uiActionClickedEvent(_ref9) {
277
+ var id = _ref9.id,
278
+ actionType = _ref9.actionType,
279
+ extensionKey = _ref9.extensionKey,
280
+ display = _ref9.display,
281
+ definitionId = _ref9.definitionId,
282
+ destinationProduct = _ref9.destinationProduct,
283
+ destinationSubproduct = _ref9.destinationSubproduct,
284
+ location = _ref9.location;
397
285
  return {
398
286
  action: 'clicked',
399
287
  actionSubject: 'button',
@@ -411,13 +299,13 @@ export var uiActionClickedEvent = function uiActionClickedEvent(_ref15) {
411
299
  })
412
300
  };
413
301
  };
414
- export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref16) {
415
- var display = _ref16.display,
416
- extensionKey = _ref16.extensionKey,
417
- definitionId = _ref16.definitionId,
418
- destinationProduct = _ref16.destinationProduct,
419
- destinationSubproduct = _ref16.destinationSubproduct,
420
- location = _ref16.location;
302
+ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref10) {
303
+ var display = _ref10.display,
304
+ extensionKey = _ref10.extensionKey,
305
+ definitionId = _ref10.definitionId,
306
+ destinationProduct = _ref10.destinationProduct,
307
+ destinationSubproduct = _ref10.destinationSubproduct,
308
+ location = _ref10.location;
421
309
  return {
422
310
  action: 'closed',
423
311
  actionSubject: 'consentModal',
@@ -436,12 +324,12 @@ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref16) {
436
324
  /**
437
325
  * @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
438
326
  */
439
- export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref17) {
440
- var extensionKey = _ref17.extensionKey,
441
- definitionId = _ref17.definitionId,
442
- destinationProduct = _ref17.destinationProduct,
443
- destinationSubproduct = _ref17.destinationSubproduct,
444
- location = _ref17.location;
327
+ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref11) {
328
+ var extensionKey = _ref11.extensionKey,
329
+ definitionId = _ref11.definitionId,
330
+ destinationProduct = _ref11.destinationProduct,
331
+ destinationSubproduct = _ref11.destinationSubproduct,
332
+ location = _ref11.location;
445
333
  return {
446
334
  actionSubject: 'consentModal',
447
335
  eventType: 'screen',
@@ -454,15 +342,15 @@ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref17) {
454
342
  })
455
343
  };
456
344
  };
457
- export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref18) {
458
- var display = _ref18.display,
459
- status = _ref18.status,
460
- extensionKey = _ref18.extensionKey,
461
- definitionId = _ref18.definitionId,
462
- destinationProduct = _ref18.destinationProduct,
463
- destinationSubproduct = _ref18.destinationSubproduct,
464
- location = _ref18.location,
465
- canBeDatasource = _ref18.canBeDatasource;
345
+ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref12) {
346
+ var display = _ref12.display,
347
+ status = _ref12.status,
348
+ extensionKey = _ref12.extensionKey,
349
+ definitionId = _ref12.definitionId,
350
+ destinationProduct = _ref12.destinationProduct,
351
+ destinationSubproduct = _ref12.destinationSubproduct,
352
+ location = _ref12.location,
353
+ canBeDatasource = _ref12.canBeDatasource;
466
354
  return {
467
355
  action: 'renderSuccess',
468
356
  actionSubject: 'smartLink',
@@ -479,15 +367,15 @@ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref18) {
479
367
  })
480
368
  };
481
369
  };
482
- export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref19) {
483
- var display = _ref19.display,
484
- error = _ref19.error,
485
- errorInfo = _ref19.errorInfo,
486
- extensionKey = _ref19.extensionKey,
487
- definitionId = _ref19.definitionId,
488
- destinationProduct = _ref19.destinationProduct,
489
- destinationSubproduct = _ref19.destinationSubproduct,
490
- location = _ref19.location;
370
+ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref13) {
371
+ var display = _ref13.display,
372
+ error = _ref13.error,
373
+ errorInfo = _ref13.errorInfo,
374
+ extensionKey = _ref13.extensionKey,
375
+ definitionId = _ref13.definitionId,
376
+ destinationProduct = _ref13.destinationProduct,
377
+ destinationSubproduct = _ref13.destinationSubproduct,
378
+ location = _ref13.location;
491
379
  return {
492
380
  actionSubject: 'smartLink',
493
381
  action: 'renderFailed',
@@ -504,16 +392,16 @@ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref19) {
504
392
  })
505
393
  };
506
394
  };
507
- export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref20) {
508
- var id = _ref20.id,
509
- previewDisplay = _ref20.previewDisplay,
510
- extensionKey = _ref20.extensionKey,
511
- definitionId = _ref20.definitionId,
512
- destinationProduct = _ref20.destinationProduct,
513
- destinationSubproduct = _ref20.destinationSubproduct,
514
- location = _ref20.location,
515
- previewInvokeMethod = _ref20.previewInvokeMethod,
516
- status = _ref20.status;
395
+ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref14) {
396
+ var id = _ref14.id,
397
+ previewDisplay = _ref14.previewDisplay,
398
+ extensionKey = _ref14.extensionKey,
399
+ definitionId = _ref14.definitionId,
400
+ destinationProduct = _ref14.destinationProduct,
401
+ destinationSubproduct = _ref14.destinationSubproduct,
402
+ location = _ref14.location,
403
+ previewInvokeMethod = _ref14.previewInvokeMethod,
404
+ status = _ref14.status;
517
405
  return {
518
406
  action: 'viewed',
519
407
  actionSubject: 'hoverCard',
@@ -531,17 +419,17 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref20) {
531
419
  })
532
420
  };
533
421
  };
534
- export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref21) {
535
- var id = _ref21.id,
536
- previewDisplay = _ref21.previewDisplay,
537
- hoverTime = _ref21.hoverTime,
538
- extensionKey = _ref21.extensionKey,
539
- definitionId = _ref21.definitionId,
540
- destinationProduct = _ref21.destinationProduct,
541
- destinationSubproduct = _ref21.destinationSubproduct,
542
- location = _ref21.location,
543
- previewInvokeMethod = _ref21.previewInvokeMethod,
544
- status = _ref21.status;
422
+ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref15) {
423
+ var id = _ref15.id,
424
+ previewDisplay = _ref15.previewDisplay,
425
+ hoverTime = _ref15.hoverTime,
426
+ extensionKey = _ref15.extensionKey,
427
+ definitionId = _ref15.definitionId,
428
+ destinationProduct = _ref15.destinationProduct,
429
+ destinationSubproduct = _ref15.destinationSubproduct,
430
+ location = _ref15.location,
431
+ previewInvokeMethod = _ref15.previewInvokeMethod,
432
+ status = _ref15.status;
545
433
  return {
546
434
  action: 'dismissed',
547
435
  actionSubject: 'hoverCard',
@@ -560,15 +448,15 @@ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref21
560
448
  })
561
449
  };
562
450
  };
563
- export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref22) {
564
- var id = _ref22.id,
565
- previewDisplay = _ref22.previewDisplay,
566
- extensionKey = _ref22.extensionKey,
567
- definitionId = _ref22.definitionId,
568
- destinationProduct = _ref22.destinationProduct,
569
- destinationSubproduct = _ref22.destinationSubproduct,
570
- location = _ref22.location,
571
- previewInvokeMethod = _ref22.previewInvokeMethod;
451
+ export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref16) {
452
+ var id = _ref16.id,
453
+ previewDisplay = _ref16.previewDisplay,
454
+ extensionKey = _ref16.extensionKey,
455
+ definitionId = _ref16.definitionId,
456
+ destinationProduct = _ref16.destinationProduct,
457
+ destinationSubproduct = _ref16.destinationSubproduct,
458
+ location = _ref16.location,
459
+ previewInvokeMethod = _ref16.previewInvokeMethod;
572
460
  return {
573
461
  action: 'clicked',
574
462
  actionSubject: 'button',
@@ -595,15 +483,15 @@ export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent()
595
483
  attributes: _objectSpread({}, context)
596
484
  };
597
485
  };
598
- export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref23) {
599
- var display = _ref23.display,
600
- error = _ref23.error,
601
- errorInfo = _ref23.errorInfo,
602
- extensionKey = _ref23.extensionKey,
603
- definitionId = _ref23.definitionId,
604
- destinationProduct = _ref23.destinationProduct,
605
- destinationSubproduct = _ref23.destinationSubproduct,
606
- location = _ref23.location;
486
+ export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref17) {
487
+ var display = _ref17.display,
488
+ error = _ref17.error,
489
+ errorInfo = _ref17.errorInfo,
490
+ extensionKey = _ref17.extensionKey,
491
+ definitionId = _ref17.definitionId,
492
+ destinationProduct = _ref17.destinationProduct,
493
+ destinationSubproduct = _ref17.destinationSubproduct,
494
+ location = _ref17.location;
607
495
  return {
608
496
  action: 'chunkLoadFailed',
609
497
  actionSubject: 'smartLink',
@@ -647,9 +535,9 @@ export var uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatu
647
535
  attributes: _objectSpread({}, context)
648
536
  };
649
537
  };
650
- export var uiServerActionClicked = function uiServerActionClicked(_ref24) {
538
+ export var uiServerActionClicked = function uiServerActionClicked(_ref18) {
651
539
  var _SmartLinkActionTypeU2;
652
- var smartLinkActionType = _ref24.smartLinkActionType;
540
+ var smartLinkActionType = _ref18.smartLinkActionType;
653
541
  return {
654
542
  action: 'clicked',
655
543
  actionSubject: 'button',
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { getMeasure } from '../performance';
5
5
  import { resolvedEvent, unresolvedEvent } from './analytics';
6
- export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';
6
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';
7
7
  export var instrumentEvent = function instrumentEvent(_ref) {
8
8
  var id = _ref.id,
9
9
  status = _ref.status,
@@ -11,10 +11,9 @@ import { useCallback, useMemo } from 'react';
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { FormattedMessage } from 'react-intl-next';
13
13
  import { extractProvider } from '@atlaskit/link-extractors';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
16
15
  import { messages } from '../../../../messages';
17
- import { getExtensionKey, hasAuthScopeOverrides } from '../../../../state/helpers';
16
+ import { hasAuthScopeOverrides } from '../../../../state/helpers';
18
17
  import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
19
18
  import { AuthorizeAction } from '../../actions/flexible/AuthorizeAction';
20
19
  import UnresolvedView from './unresolved-view';
@@ -33,14 +32,13 @@ var contentStyles = css({
33
32
  * @see FlexibleCardProps
34
33
  */
35
34
  var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
36
- var _getExtensionKey, _cardState$details, _extractProvider;
35
+ var _cardState$details, _extractProvider;
37
36
  var _ref$testId = _ref.testId,
38
37
  testId = _ref$testId === void 0 ? 'smart-block-unauthorized-view' : _ref$testId,
39
38
  props = _objectWithoutProperties(_ref, _excluded);
40
39
  var analytics = props.analytics,
41
40
  cardState = props.cardState,
42
41
  onAuthorize = props.onAuthorize;
43
- var extensionKey = (_getExtensionKey = getExtensionKey(cardState === null || cardState === void 0 ? void 0 : cardState.details)) !== null && _getExtensionKey !== void 0 ? _getExtensionKey : '';
44
42
  var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
45
43
  var providerName = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
46
44
  var isProductIntegrationSupported = hasAuthScopeOverrides(cardState === null || cardState === void 0 ? void 0 : cardState.details);
@@ -48,16 +46,10 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
48
46
  fireEvent = _useAnalyticsEvents.fireEvent;
49
47
  var handleAuthorize = useCallback(function () {
50
48
  if (onAuthorize) {
51
- if (fg('smart-card-migrate-track-analytics')) {
52
- fireEvent('track.applicationAccount.authStarted', {});
53
- } else {
54
- analytics === null || analytics === void 0 || analytics.track.appAccountAuthStarted({
55
- extensionKey: extensionKey
56
- });
57
- }
49
+ fireEvent('track.applicationAccount.authStarted', {});
58
50
  onAuthorize();
59
51
  }
60
- }, [onAuthorize, extensionKey, analytics === null || analytics === void 0 ? void 0 : analytics.track, fireEvent]);
52
+ }, [onAuthorize, fireEvent]);
61
53
  var content = useMemo(function () {
62
54
  return onAuthorize ? jsx(UnauthorisedViewContent, {
63
55
  providerName: providerName,
@@ -4,7 +4,6 @@ var _excluded = ["analytics", "context", "extensionKey", "isProductIntegrationSu
4
4
  import React, { useCallback, useMemo } from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import Button from '@atlaskit/button';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
9
8
  import { messages } from '../../../../messages';
10
9
  import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
@@ -24,16 +23,10 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
24
23
  fireEvent = _useAnalyticsEvents.fireEvent;
25
24
  var handleOnAuthorizeClick = useCallback(function () {
26
25
  if (onAuthorize) {
27
- if (fg('smart-card-migrate-track-analytics')) {
28
- fireEvent('track.applicationAccount.authStarted', {});
29
- } else {
30
- analytics.track.appAccountAuthStarted({
31
- extensionKey: extensionKey
32
- });
33
- }
26
+ fireEvent('track.applicationAccount.authStarted', {});
34
27
  onAuthorize();
35
28
  }
36
- }, [onAuthorize, analytics.track, extensionKey, fireEvent]);
29
+ }, [onAuthorize, fireEvent]);
37
30
  var content = useMemo(function () {
38
31
  if (onAuthorize) {
39
32
  var _context$text;