@atlaskit/smart-card 30.4.0 → 30.4.2

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 (51) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/state/actions/index.js +4 -11
  3. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +6 -81
  4. package/dist/cjs/utils/analytics/analytics.js +104 -216
  5. package/dist/cjs/utils/analytics/index.js +0 -12
  6. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -11
  7. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  8. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  9. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  10. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -10
  11. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -98
  12. package/dist/cjs/view/LinkUrl/index.js +1 -1
  13. package/dist/es2019/state/actions/index.js +4 -11
  14. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +3 -78
  15. package/dist/es2019/utils/analytics/analytics.js +1 -118
  16. package/dist/es2019/utils/analytics/index.js +1 -1
  17. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -12
  18. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  19. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  20. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  21. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -10
  22. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -79
  23. package/dist/es2019/view/LinkUrl/index.js +1 -1
  24. package/dist/esm/state/actions/index.js +4 -11
  25. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +8 -83
  26. package/dist/esm/utils/analytics/analytics.js +103 -215
  27. package/dist/esm/utils/analytics/index.js +1 -1
  28. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -12
  29. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  30. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  31. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  32. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +2 -10
  33. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -98
  34. package/dist/esm/view/LinkUrl/index.js +1 -1
  35. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -49
  36. package/dist/types/state/hooks/useSmartLink.d.ts +0 -16
  37. package/dist/types/utils/analytics/analytics.d.ts +1 -32
  38. package/dist/types/utils/analytics/index.d.ts +1 -1
  39. package/dist/types/utils/analytics/types.d.ts +0 -1
  40. package/dist/types/utils/mocks.d.ts +0 -16
  41. package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  42. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  43. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -49
  44. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -16
  45. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -32
  46. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  47. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -1
  48. package/dist/types-ts4.5/utils/mocks.d.ts +0 -16
  49. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  50. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  51. package/package.json +4 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 30.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 30.4.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#168176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168176)
14
+ [`49d838b4eb2ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/49d838b4eb2ab) -
15
+ Remove FF smart-card-migrate-track-analytics
16
+
3
17
  ## 30.4.0
4
18
 
5
19
  ### Minor Changes
@@ -131,16 +131,9 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
131
131
  });
132
132
  }
133
133
  (0, _outboundAuthFlowClient.auth)(services[0].url).then(function () {
134
- if ((0, _platformFeatureFlags.fg)('smart-card-migrate-track-analytics')) {
135
- fireEvent('track.applicationAccount.connected', {
136
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
137
- });
138
- } else {
139
- analytics.track.appAccountConnected({
140
- definitionId: definitionId,
141
- extensionKey: extensionKey
142
- });
143
- }
134
+ fireEvent('track.applicationAccount.connected', {
135
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
136
+ });
144
137
  analytics.operational.connectSucceededEvent({
145
138
  id: id,
146
139
  definitionId: definitionId,
@@ -164,7 +157,7 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
164
157
  reload();
165
158
  });
166
159
  }
167
- }, [getSmartLinkState, analytics.ui, analytics.screen, analytics.track, analytics.operational, id, reload, fireEvent]);
160
+ }, [getSmartLinkState, analytics.ui, analytics.screen, analytics.operational, id, reload, fireEvent]);
168
161
  var invoke = (0, _react.useCallback)( /*#__PURE__*/function () {
169
162
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(opts, appearance) {
170
163
  var key, action, source;
@@ -640,97 +640,23 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
640
640
  };
641
641
  }, [defaultId, commonAttributes, dispatchAnalytics]);
642
642
 
643
- /** Contains all track analytics events */
644
- var track = (0, _react.useMemo)(function () {
643
+ /** Contains all screen analytics events */
644
+ var screen = (0, _react.useMemo)(function () {
645
645
  return {
646
646
  /**
647
- * This fires an event which represents a user connecting their account to view a Smart Link.
647
+ * This fires an event which represents the connect account page being opened.
648
648
  * @param definitionId The definitionId of the Smart Link resolver invoked.
649
649
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
650
650
  * @returns
651
- * @deprecated
651
+ * @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
652
652
  */
653
- appAccountConnected: function appAccountConnected(_ref17) {
653
+ authPopupEvent: function authPopupEvent(_ref17) {
654
654
  var extensionKey = _ref17.extensionKey,
655
655
  definitionId = _ref17.definitionId,
656
656
  resourceType = _ref17.resourceType,
657
657
  destinationProduct = _ref17.destinationProduct,
658
658
  destinationSubproduct = _ref17.destinationSubproduct,
659
659
  location = _ref17.location;
660
- return dispatchAnalytics(applyCommonAttributes((0, _analytics.trackAppAccountConnected)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
661
- extensionKey: extensionKey,
662
- definitionId: definitionId,
663
- resourceType: resourceType,
664
- destinationProduct: destinationProduct,
665
- destinationSubproduct: destinationSubproduct,
666
- location: location
667
- })), commonAttributes));
668
- },
669
- /**
670
- * This fires an event which represents a user starting the Smart Link connect account process.
671
- * @param location a location where the Smart Link auth action was initiated.
672
- * @param extensionKey The extensionKey of the Smart Link resolver invoked.
673
- * @returns
674
- * @deprecated
675
- */
676
- appAccountAuthStarted: function appAccountAuthStarted(_ref18) {
677
- var extensionKey = _ref18.extensionKey,
678
- location = _ref18.location;
679
- return dispatchAnalytics(applyCommonAttributes((0, _analytics.trackAppAccountAuthStarted)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
680
- extensionKey: extensionKey,
681
- location: location
682
- })), commonAttributes));
683
- },
684
- /**
685
- * This fires a tracking event before an action invoke api call is made
686
- * @deprecated
687
- */
688
- smartLinkQuickActionStarted: function smartLinkQuickActionStarted(props) {
689
- return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackSmartLinkQuickActionStarted)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
690
- },
691
- /**
692
- * This fires a tracking event after an action invoke api call is successful
693
- * @deprecated
694
- */
695
- smartLinkQuickActionSuccess: function smartLinkQuickActionSuccess(props) {
696
- return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackSmartLinkQuickActionSuccess)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
697
- },
698
- /**
699
- * This fires a tracking event after an action invoke api call has failed
700
- * @deprecated
701
- */
702
- smartLinkQuickActionFailed: function smartLinkQuickActionFailed(props) {
703
- return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackSmartLinkQuickActionFailed)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
704
- },
705
- /**
706
- * Fires a track event when we call loadMetadata() to get information for a hover card
707
- * @deprecated
708
- */
709
- hoverCardResolutionStarted: function hoverCardResolutionStarted() {
710
- return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackHoverCardResolutionStarted)(_objectSpread({
711
- display: 'hoverCardPreview'
712
- }, commonAttributes)), commonAttributes));
713
- }
714
- };
715
- }, [commonAttributes, dispatchAnalytics]);
716
-
717
- /** Contains all screen analytics events */
718
- var screen = (0, _react.useMemo)(function () {
719
- return {
720
- /**
721
- * This fires an event which represents the connect account page being opened.
722
- * @param definitionId The definitionId of the Smart Link resolver invoked.
723
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
724
- * @returns
725
- * @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
726
- */
727
- authPopupEvent: function authPopupEvent(_ref19) {
728
- var extensionKey = _ref19.extensionKey,
729
- definitionId = _ref19.definitionId,
730
- resourceType = _ref19.resourceType,
731
- destinationProduct = _ref19.destinationProduct,
732
- destinationSubproduct = _ref19.destinationSubproduct,
733
- location = _ref19.location;
734
660
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.screenAuthPopupEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
735
661
  extensionKey: extensionKey,
736
662
  definitionId: definitionId,
@@ -759,8 +685,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
759
685
  return {
760
686
  ui: ui,
761
687
  operational: operational,
762
- track: track,
763
688
  screen: screen
764
689
  };
765
- }, [ui, operational, track, screen]);
690
+ }, [ui, operational, screen]);
766
691
  };
@@ -4,17 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiServerActionClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackSmartLinkQuickActionSuccess = exports.trackSmartLinkQuickActionStarted = exports.trackSmartLinkQuickActionFailed = exports.trackHoverCardResolutionStarted = exports.trackAppAccountConnected = exports.trackAppAccountAuthStarted = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.SmartLinkActionTypeUiEventMapper = exports.SmartLinkActionTypeTrackingEventMapper = exports.ANALYTICS_CHANNEL = void 0;
8
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
7
+ exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiServerActionClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.SmartLinkActionTypeUiEventMapper = exports.SmartLinkActionTypeTrackingEventMapper = exports.ANALYTICS_CHANNEL = void 0;
9
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
11
  var _linkingTypes = require("@atlaskit/linking-types");
13
12
  var _performance = require("../performance");
14
- var _excluded = ["smartLinkActionType"],
15
- _excluded2 = ["smartLinkActionType"],
16
- _excluded3 = ["smartLinkActionType"],
17
- _excluded4 = ["display"];
18
13
  var _SmartLinkActionTypeT, _SmartLinkActionTypeU;
19
14
  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; }
20
15
  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) { (0, _defineProperty2.default)(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; }
@@ -22,7 +17,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
17
  var context = exports.context = {
23
18
  componentName: 'smart-cards',
24
19
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "30.4.0"
20
+ packageVersion: "30.4.2"
26
21
  };
27
22
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
23
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -212,120 +207,13 @@ var connectFailedEvent = exports.connectFailedEvent = function connectFailedEven
212
207
  })
213
208
  };
214
209
  };
215
-
216
- /**
217
- * @deprecated
218
- */
219
- var trackAppAccountConnected = exports.trackAppAccountConnected = function trackAppAccountConnected(_ref6) {
210
+ var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref6) {
220
211
  var definitionId = _ref6.definitionId,
221
212
  extensionKey = _ref6.extensionKey,
222
213
  destinationProduct = _ref6.destinationProduct,
223
214
  destinationSubproduct = _ref6.destinationSubproduct,
224
- location = _ref6.location;
225
- return {
226
- action: 'connected',
227
- actionSubject: 'applicationAccount',
228
- eventType: 'track',
229
- attributes: _objectSpread(_objectSpread({}, context), {}, {
230
- definitionId: definitionId,
231
- extensionKey: extensionKey,
232
- destinationProduct: destinationProduct,
233
- destinationSubproduct: destinationSubproduct,
234
- location: location
235
- })
236
- };
237
- };
238
-
239
- /**
240
- * @deprecated
241
- */
242
- var trackAppAccountAuthStarted = exports.trackAppAccountAuthStarted = function trackAppAccountAuthStarted(_ref7) {
243
- var extensionKey = _ref7.extensionKey,
244
- location = _ref7.location;
245
- return {
246
- action: 'authStarted',
247
- actionSubject: 'applicationAccount',
248
- eventType: 'track',
249
- attributes: _objectSpread(_objectSpread({}, context), {}, {
250
- extensionKey: extensionKey,
251
- location: location
252
- })
253
- };
254
- };
255
-
256
- /**
257
- * @deprecated
258
- */
259
- var trackSmartLinkQuickActionStarted = exports.trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref8) {
260
- var _SmartLinkActionTypeT2;
261
- var smartLinkActionType = _ref8.smartLinkActionType,
262
- attributes = (0, _objectWithoutProperties2.default)(_ref8, _excluded);
263
- return {
264
- action: 'started',
265
- actionSubject: 'smartLinkQuickAction',
266
- eventType: 'track',
267
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
268
- smartLinkActionType: (_SmartLinkActionTypeT2 = SmartLinkActionTypeTrackingEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeT2 !== void 0 ? _SmartLinkActionTypeT2 : smartLinkActionType
269
- })
270
- };
271
- };
272
-
273
- /**
274
- * @deprecated
275
- */
276
- var trackSmartLinkQuickActionSuccess = exports.trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref9) {
277
- var _SmartLinkActionTypeT3;
278
- var smartLinkActionType = _ref9.smartLinkActionType,
279
- attributes = (0, _objectWithoutProperties2.default)(_ref9, _excluded2);
280
- return {
281
- action: 'success',
282
- actionSubject: 'smartLinkQuickAction',
283
- eventType: 'track',
284
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
285
- smartLinkActionType: (_SmartLinkActionTypeT3 = SmartLinkActionTypeTrackingEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeT3 !== void 0 ? _SmartLinkActionTypeT3 : smartLinkActionType
286
- })
287
- };
288
- };
289
-
290
- /**
291
- * @deprecated
292
- */
293
- var trackSmartLinkQuickActionFailed = exports.trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref10) {
294
- var _SmartLinkActionTypeT4;
295
- var smartLinkActionType = _ref10.smartLinkActionType,
296
- attributes = (0, _objectWithoutProperties2.default)(_ref10, _excluded3);
297
- return {
298
- action: 'failed',
299
- actionSubject: 'smartLinkQuickAction',
300
- eventType: 'track',
301
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
302
- smartLinkActionType: (_SmartLinkActionTypeT4 = SmartLinkActionTypeTrackingEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeT4 !== void 0 ? _SmartLinkActionTypeT4 : smartLinkActionType
303
- })
304
- };
305
- };
306
-
307
- /**
308
- * @deprecated
309
- */
310
- var trackHoverCardResolutionStarted = exports.trackHoverCardResolutionStarted = function trackHoverCardResolutionStarted(_ref11) {
311
- var display = _ref11.display,
312
- attributes = (0, _objectWithoutProperties2.default)(_ref11, _excluded4);
313
- return {
314
- action: 'resolved',
315
- actionSubject: 'hoverCard',
316
- eventType: 'track',
317
- attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
318
- display: display
319
- })
320
- };
321
- };
322
- var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref12) {
323
- var definitionId = _ref12.definitionId,
324
- extensionKey = _ref12.extensionKey,
325
- destinationProduct = _ref12.destinationProduct,
326
- destinationSubproduct = _ref12.destinationSubproduct,
327
- location = _ref12.location,
328
- display = _ref12.display;
215
+ location = _ref6.location,
216
+ display = _ref6.display;
329
217
  return {
330
218
  action: 'clicked',
331
219
  actionSubject: 'button',
@@ -341,13 +229,13 @@ var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref12) {
341
229
  })
342
230
  };
343
231
  };
344
- var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref13) {
345
- var definitionId = _ref13.definitionId,
346
- extensionKey = _ref13.extensionKey,
347
- destinationProduct = _ref13.destinationProduct,
348
- destinationSubproduct = _ref13.destinationSubproduct,
349
- location = _ref13.location,
350
- display = _ref13.display;
232
+ var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref7) {
233
+ var definitionId = _ref7.definitionId,
234
+ extensionKey = _ref7.extensionKey,
235
+ destinationProduct = _ref7.destinationProduct,
236
+ destinationSubproduct = _ref7.destinationSubproduct,
237
+ location = _ref7.location,
238
+ display = _ref7.display;
351
239
  return {
352
240
  action: 'clicked',
353
241
  actionSubject: 'smartLink',
@@ -363,17 +251,17 @@ var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function
363
251
  })
364
252
  };
365
253
  };
366
- var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
367
- var id = _ref14.id,
368
- display = _ref14.display,
369
- status = _ref14.status,
370
- definitionId = _ref14.definitionId,
371
- extensionKey = _ref14.extensionKey,
372
- isModifierKeyPressed = _ref14.isModifierKeyPressed,
373
- location = _ref14.location,
374
- destinationProduct = _ref14.destinationProduct,
375
- destinationSubproduct = _ref14.destinationSubproduct,
376
- actionSubjectId = _ref14.actionSubjectId;
254
+ var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEvent(_ref8) {
255
+ var id = _ref8.id,
256
+ display = _ref8.display,
257
+ status = _ref8.status,
258
+ definitionId = _ref8.definitionId,
259
+ extensionKey = _ref8.extensionKey,
260
+ isModifierKeyPressed = _ref8.isModifierKeyPressed,
261
+ location = _ref8.location,
262
+ destinationProduct = _ref8.destinationProduct,
263
+ destinationSubproduct = _ref8.destinationSubproduct,
264
+ actionSubjectId = _ref8.actionSubjectId;
377
265
  return {
378
266
  action: 'clicked',
379
267
  actionSubject: 'smartLink',
@@ -392,15 +280,15 @@ var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEven
392
280
  })
393
281
  };
394
282
  };
395
- var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref15) {
396
- var id = _ref15.id,
397
- actionType = _ref15.actionType,
398
- extensionKey = _ref15.extensionKey,
399
- display = _ref15.display,
400
- definitionId = _ref15.definitionId,
401
- destinationProduct = _ref15.destinationProduct,
402
- destinationSubproduct = _ref15.destinationSubproduct,
403
- location = _ref15.location;
283
+ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref9) {
284
+ var id = _ref9.id,
285
+ actionType = _ref9.actionType,
286
+ extensionKey = _ref9.extensionKey,
287
+ display = _ref9.display,
288
+ definitionId = _ref9.definitionId,
289
+ destinationProduct = _ref9.destinationProduct,
290
+ destinationSubproduct = _ref9.destinationSubproduct,
291
+ location = _ref9.location;
404
292
  return {
405
293
  action: 'clicked',
406
294
  actionSubject: 'button',
@@ -418,13 +306,13 @@ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClick
418
306
  })
419
307
  };
420
308
  };
421
- var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_ref16) {
422
- var display = _ref16.display,
423
- extensionKey = _ref16.extensionKey,
424
- definitionId = _ref16.definitionId,
425
- destinationProduct = _ref16.destinationProduct,
426
- destinationSubproduct = _ref16.destinationSubproduct,
427
- location = _ref16.location;
309
+ var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_ref10) {
310
+ var display = _ref10.display,
311
+ extensionKey = _ref10.extensionKey,
312
+ definitionId = _ref10.definitionId,
313
+ destinationProduct = _ref10.destinationProduct,
314
+ destinationSubproduct = _ref10.destinationSubproduct,
315
+ location = _ref10.location;
428
316
  return {
429
317
  action: 'closed',
430
318
  actionSubject: 'consentModal',
@@ -443,12 +331,12 @@ var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_
443
331
  /**
444
332
  * @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
445
333
  */
446
- var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPopupEvent(_ref17) {
447
- var extensionKey = _ref17.extensionKey,
448
- definitionId = _ref17.definitionId,
449
- destinationProduct = _ref17.destinationProduct,
450
- destinationSubproduct = _ref17.destinationSubproduct,
451
- location = _ref17.location;
334
+ var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPopupEvent(_ref11) {
335
+ var extensionKey = _ref11.extensionKey,
336
+ definitionId = _ref11.definitionId,
337
+ destinationProduct = _ref11.destinationProduct,
338
+ destinationSubproduct = _ref11.destinationSubproduct,
339
+ location = _ref11.location;
452
340
  return {
453
341
  actionSubject: 'consentModal',
454
342
  eventType: 'screen',
@@ -461,15 +349,15 @@ var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPop
461
349
  })
462
350
  };
463
351
  };
464
- var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref18) {
465
- var display = _ref18.display,
466
- status = _ref18.status,
467
- extensionKey = _ref18.extensionKey,
468
- definitionId = _ref18.definitionId,
469
- destinationProduct = _ref18.destinationProduct,
470
- destinationSubproduct = _ref18.destinationSubproduct,
471
- location = _ref18.location,
472
- canBeDatasource = _ref18.canBeDatasource;
352
+ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref12) {
353
+ var display = _ref12.display,
354
+ status = _ref12.status,
355
+ extensionKey = _ref12.extensionKey,
356
+ definitionId = _ref12.definitionId,
357
+ destinationProduct = _ref12.destinationProduct,
358
+ destinationSubproduct = _ref12.destinationSubproduct,
359
+ location = _ref12.location,
360
+ canBeDatasource = _ref12.canBeDatasource;
473
361
  return {
474
362
  action: 'renderSuccess',
475
363
  actionSubject: 'smartLink',
@@ -486,15 +374,15 @@ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSucce
486
374
  })
487
375
  };
488
376
  };
489
- var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref19) {
490
- var display = _ref19.display,
491
- error = _ref19.error,
492
- errorInfo = _ref19.errorInfo,
493
- extensionKey = _ref19.extensionKey,
494
- definitionId = _ref19.definitionId,
495
- destinationProduct = _ref19.destinationProduct,
496
- destinationSubproduct = _ref19.destinationSubproduct,
497
- location = _ref19.location;
377
+ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref13) {
378
+ var display = _ref13.display,
379
+ error = _ref13.error,
380
+ errorInfo = _ref13.errorInfo,
381
+ extensionKey = _ref13.extensionKey,
382
+ definitionId = _ref13.definitionId,
383
+ destinationProduct = _ref13.destinationProduct,
384
+ destinationSubproduct = _ref13.destinationSubproduct,
385
+ location = _ref13.location;
498
386
  return {
499
387
  actionSubject: 'smartLink',
500
388
  action: 'renderFailed',
@@ -511,16 +399,16 @@ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedE
511
399
  })
512
400
  };
513
401
  };
514
- var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref20) {
515
- var id = _ref20.id,
516
- previewDisplay = _ref20.previewDisplay,
517
- extensionKey = _ref20.extensionKey,
518
- definitionId = _ref20.definitionId,
519
- destinationProduct = _ref20.destinationProduct,
520
- destinationSubproduct = _ref20.destinationSubproduct,
521
- location = _ref20.location,
522
- previewInvokeMethod = _ref20.previewInvokeMethod,
523
- status = _ref20.status;
402
+ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref14) {
403
+ var id = _ref14.id,
404
+ previewDisplay = _ref14.previewDisplay,
405
+ extensionKey = _ref14.extensionKey,
406
+ definitionId = _ref14.definitionId,
407
+ destinationProduct = _ref14.destinationProduct,
408
+ destinationSubproduct = _ref14.destinationSubproduct,
409
+ location = _ref14.location,
410
+ previewInvokeMethod = _ref14.previewInvokeMethod,
411
+ status = _ref14.status;
524
412
  return {
525
413
  action: 'viewed',
526
414
  actionSubject: 'hoverCard',
@@ -538,17 +426,17 @@ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCa
538
426
  })
539
427
  };
540
428
  };
541
- var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref21) {
542
- var id = _ref21.id,
543
- previewDisplay = _ref21.previewDisplay,
544
- hoverTime = _ref21.hoverTime,
545
- extensionKey = _ref21.extensionKey,
546
- definitionId = _ref21.definitionId,
547
- destinationProduct = _ref21.destinationProduct,
548
- destinationSubproduct = _ref21.destinationSubproduct,
549
- location = _ref21.location,
550
- previewInvokeMethod = _ref21.previewInvokeMethod,
551
- status = _ref21.status;
429
+ var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref15) {
430
+ var id = _ref15.id,
431
+ previewDisplay = _ref15.previewDisplay,
432
+ hoverTime = _ref15.hoverTime,
433
+ extensionKey = _ref15.extensionKey,
434
+ definitionId = _ref15.definitionId,
435
+ destinationProduct = _ref15.destinationProduct,
436
+ destinationSubproduct = _ref15.destinationSubproduct,
437
+ location = _ref15.location,
438
+ previewInvokeMethod = _ref15.previewInvokeMethod,
439
+ status = _ref15.status;
552
440
  return {
553
441
  action: 'dismissed',
554
442
  actionSubject: 'hoverCard',
@@ -567,15 +455,15 @@ var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiH
567
455
  })
568
456
  };
569
457
  };
570
- var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref22) {
571
- var id = _ref22.id,
572
- previewDisplay = _ref22.previewDisplay,
573
- extensionKey = _ref22.extensionKey,
574
- definitionId = _ref22.definitionId,
575
- destinationProduct = _ref22.destinationProduct,
576
- destinationSubproduct = _ref22.destinationSubproduct,
577
- location = _ref22.location,
578
- previewInvokeMethod = _ref22.previewInvokeMethod;
458
+ var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref16) {
459
+ var id = _ref16.id,
460
+ previewDisplay = _ref16.previewDisplay,
461
+ extensionKey = _ref16.extensionKey,
462
+ definitionId = _ref16.definitionId,
463
+ destinationProduct = _ref16.destinationProduct,
464
+ destinationSubproduct = _ref16.destinationSubproduct,
465
+ location = _ref16.location,
466
+ previewInvokeMethod = _ref16.previewInvokeMethod;
579
467
  return {
580
468
  action: 'clicked',
581
469
  actionSubject: 'button',
@@ -602,15 +490,15 @@ var uiLearnMoreLinkClickedEvent = exports.uiLearnMoreLinkClickedEvent = function
602
490
  attributes: _objectSpread({}, context)
603
491
  };
604
492
  };
605
- var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(_ref23) {
606
- var display = _ref23.display,
607
- error = _ref23.error,
608
- errorInfo = _ref23.errorInfo,
609
- extensionKey = _ref23.extensionKey,
610
- definitionId = _ref23.definitionId,
611
- destinationProduct = _ref23.destinationProduct,
612
- destinationSubproduct = _ref23.destinationSubproduct,
613
- location = _ref23.location;
493
+ var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(_ref17) {
494
+ var display = _ref17.display,
495
+ error = _ref17.error,
496
+ errorInfo = _ref17.errorInfo,
497
+ extensionKey = _ref17.extensionKey,
498
+ definitionId = _ref17.definitionId,
499
+ destinationProduct = _ref17.destinationProduct,
500
+ destinationSubproduct = _ref17.destinationSubproduct,
501
+ location = _ref17.location;
614
502
  return {
615
503
  action: 'chunkLoadFailed',
616
504
  actionSubject: 'smartLink',
@@ -654,9 +542,9 @@ var uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusOpenPre
654
542
  attributes: _objectSpread({}, context)
655
543
  };
656
544
  };
657
- var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref24) {
545
+ var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref18) {
658
546
  var _SmartLinkActionTypeU2;
659
- var smartLinkActionType = _ref24.smartLinkActionType;
547
+ var smartLinkActionType = _ref18.smartLinkActionType;
660
548
  return {
661
549
  action: 'clicked',
662
550
  actionSubject: 'button',
@@ -65,18 +65,6 @@ Object.defineProperty(exports, "screenAuthPopupEvent", {
65
65
  return _analytics.screenAuthPopupEvent;
66
66
  }
67
67
  });
68
- Object.defineProperty(exports, "trackAppAccountAuthStarted", {
69
- enumerable: true,
70
- get: function get() {
71
- return _analytics.trackAppAccountAuthStarted;
72
- }
73
- });
74
- Object.defineProperty(exports, "trackAppAccountConnected", {
75
- enumerable: true,
76
- get: function get() {
77
- return _analytics.trackAppAccountConnected;
78
- }
79
- });
80
68
  Object.defineProperty(exports, "uiActionClickedEvent", {
81
69
  enumerable: true,
82
70
  get: function get() {
@@ -11,7 +11,6 @@ var _react = require("react");
11
11
  var _react2 = require("@emotion/react");
12
12
  var _reactIntlNext = require("react-intl-next");
13
13
  var _linkExtractors = require("@atlaskit/link-extractors");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _useAnalyticsEvents2 = require("../../../../common/analytics/generated/use-analytics-events");
16
15
  var _messages = require("../../../../messages");
17
16
  var _helpers = require("../../../../state/helpers");
@@ -39,14 +38,13 @@ var contentStyles = (0, _react2.css)({
39
38
  * @see FlexibleCardProps
40
39
  */
41
40
  var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
42
- var _getExtensionKey, _cardState$details, _extractProvider;
41
+ var _cardState$details, _extractProvider;
43
42
  var _ref$testId = _ref.testId,
44
43
  testId = _ref$testId === void 0 ? 'smart-block-unauthorized-view' : _ref$testId,
45
44
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
46
45
  var analytics = props.analytics,
47
46
  cardState = props.cardState,
48
47
  onAuthorize = props.onAuthorize;
49
- var extensionKey = (_getExtensionKey = (0, _helpers.getExtensionKey)(cardState === null || cardState === void 0 ? void 0 : cardState.details)) !== null && _getExtensionKey !== void 0 ? _getExtensionKey : '';
50
48
  var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
51
49
  var providerName = (_extractProvider = (0, _linkExtractors.extractProvider)(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
52
50
  var isProductIntegrationSupported = (0, _helpers.hasAuthScopeOverrides)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
@@ -54,16 +52,10 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
54
52
  fireEvent = _useAnalyticsEvents.fireEvent;
55
53
  var handleAuthorize = (0, _react.useCallback)(function () {
56
54
  if (onAuthorize) {
57
- if ((0, _platformFeatureFlags.fg)('smart-card-migrate-track-analytics')) {
58
- fireEvent('track.applicationAccount.authStarted', {});
59
- } else {
60
- analytics === null || analytics === void 0 || analytics.track.appAccountAuthStarted({
61
- extensionKey: extensionKey
62
- });
63
- }
55
+ fireEvent('track.applicationAccount.authStarted', {});
64
56
  onAuthorize();
65
57
  }
66
- }, [onAuthorize, extensionKey, analytics === null || analytics === void 0 ? void 0 : analytics.track, fireEvent]);
58
+ }, [onAuthorize, fireEvent]);
67
59
  var content = (0, _react.useMemo)(function () {
68
60
  return onAuthorize ? (0, _react2.jsx)(_UnauthorisedViewContent.default, {
69
61
  providerName: providerName,