@atlaskit/smart-card 23.11.2 → 23.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/messages.js +5 -0
  3. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +216 -146
  4. package/dist/cjs/utils/analytics/analytics.js +134 -74
  5. package/dist/cjs/utils/analytics/index.js +6 -0
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/cjs/view/CardWithUrl/component.js +27 -1
  8. package/dist/cjs/view/EmbedCard/components/Frame.js +110 -5
  9. package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +75 -0
  10. package/dist/cjs/view/EmbedCard/index.js +6 -2
  11. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +6 -2
  12. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +49 -2
  13. package/dist/es2019/messages.js +5 -0
  14. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +69 -1
  15. package/dist/es2019/utils/analytics/analytics.js +52 -0
  16. package/dist/es2019/utils/analytics/index.js +1 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/es2019/view/CardWithUrl/component.js +27 -1
  19. package/dist/es2019/view/EmbedCard/components/Frame.js +91 -6
  20. package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +57 -0
  21. package/dist/es2019/view/EmbedCard/index.js +6 -2
  22. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +6 -2
  23. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +13 -1
  24. package/dist/esm/messages.js +5 -0
  25. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +217 -147
  26. package/dist/esm/utils/analytics/analytics.js +127 -73
  27. package/dist/esm/utils/analytics/index.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/esm/view/CardWithUrl/component.js +27 -1
  30. package/dist/esm/view/EmbedCard/components/Frame.js +110 -6
  31. package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +62 -0
  32. package/dist/esm/view/EmbedCard/index.js +6 -2
  33. package/dist/esm/view/EmbedCard/views/ResolvedView.js +6 -2
  34. package/dist/esm/view/HoverCard/components/HoverCardContent.js +43 -1
  35. package/dist/types/messages.d.ts +1 -1
  36. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +27 -1
  37. package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
  38. package/dist/types/state/hooks/useSmartLink.d.ts +2 -0
  39. package/dist/types/utils/analytics/analytics.d.ts +3 -1
  40. package/dist/types/utils/analytics/index.d.ts +1 -1
  41. package/dist/types/utils/analytics/types.d.ts +12 -0
  42. package/dist/types/utils/mocks.d.ts +2 -0
  43. package/dist/types/utils/types.d.ts +2 -2
  44. package/dist/types/view/EmbedCard/components/Frame.d.ts +2 -0
  45. package/dist/types/view/EmbedCard/components/IframeDwellTracker.d.ts +8 -0
  46. package/dist/types/view/EmbedCard/types.d.ts +2 -0
  47. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +4 -0
  48. package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -0
  49. package/package.json +2 -2
  50. package/report.api.md +42 -1
  51. package/tmp/api-report-tmp.d.ts +20 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 23.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d5a9fd04c02`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d5a9fd04c02) - Analytics to track dwell time and focus on smart links embedded iframes
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 23.11.3
14
+
15
+ ### Patch Changes
16
+
17
+ - [`08ef315c46d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/08ef315c46d) - [ux] Add a copy url button to hover cards.
18
+
3
19
  ## 23.11.2
4
20
 
5
21
  ### Patch Changes
@@ -93,6 +93,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
93
93
  defaultMessage: 'Connect to Atlassian to view more details from your work and collaboration from one place.',
94
94
  description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view and we do not have the providers name.'
95
95
  },
96
+ copy_url_to_clipboard: {
97
+ id: 'fabric.linking.download',
98
+ defaultMessage: 'Copy link',
99
+ description: ''
100
+ },
96
101
  could_not_load_link: {
97
102
  id: 'fabric.linking.couldnt_load_link',
98
103
  defaultMessage: "We couldn't load this link for an unknown reason.",
@@ -190,26 +190,96 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
190
190
  },
191
191
 
192
192
  /**
193
- * This fires an event that represents when a user clicks on a Smart Link action.
194
- * Note: This also starts the UFO smart-link-action-invocation experience.
193
+ * This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
195
194
  * @param id The unique ID for this Smart Link.
196
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
197
- * @param actionType The type of the action that was clicked, e.g. PreviewAction
198
195
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
199
- * @param invokeType Whether the action invoked made a call to a server.
196
+ * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
197
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
198
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
199
+ * @param location Where the Smart Link is currently rendered.
200
+ * @param destinationProduct The product the Smart Link is linked to.
201
+ * @param dwellTime Total seconds that the user has dwelled on this iframe
202
+ * @param dwellPercentVisible Percentage element was visible at end of dwell
200
203
  * @returns
201
204
  */
202
- actionClickedEvent: function actionClickedEvent(_ref4) {
205
+ iframeDwelledEvent: function iframeDwelledEvent(_ref4) {
203
206
  var id = _ref4.id,
204
- actionType = _ref4.actionType,
205
207
  display = _ref4.display,
206
- invokeType = _ref4.invokeType,
207
- extensionKey = _ref4.extensionKey,
208
+ status = _ref4.status,
208
209
  definitionId = _ref4.definitionId,
209
- resourceType = _ref4.resourceType,
210
+ extensionKey = _ref4.extensionKey,
211
+ location = _ref4.location,
210
212
  destinationProduct = _ref4.destinationProduct,
211
213
  destinationSubproduct = _ref4.destinationSubproduct,
212
- location = _ref4.location;
214
+ dwellTime = _ref4.dwellTime,
215
+ dwellPercentVisible = _ref4.dwellPercentVisible;
216
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics2.uiIframeDwelledEvent)({
217
+ id: id,
218
+ display: display,
219
+ status: status,
220
+ definitionId: definitionId,
221
+ extensionKey: extensionKey,
222
+ location: location,
223
+ destinationProduct: destinationProduct,
224
+ destinationSubproduct: destinationSubproduct,
225
+ dwellTime: dwellTime,
226
+ dwellPercentVisible: dwellPercentVisible
227
+ }), commonAttributes));
228
+ },
229
+
230
+ /**
231
+ * This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
232
+ * @param id The unique ID for this Smart Link.
233
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
234
+ * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
235
+ * @param definitionId The definitionId of the Smart Link resolver invoked.
236
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
237
+ * @param location Where the Smart Link is currently rendered.
238
+ * @param destinationProduct The product the Smart Link is linked to.
239
+ * @returns
240
+ */
241
+ iframeFocusedEvent: function iframeFocusedEvent(_ref5) {
242
+ var id = _ref5.id,
243
+ display = _ref5.display,
244
+ status = _ref5.status,
245
+ definitionId = _ref5.definitionId,
246
+ extensionKey = _ref5.extensionKey,
247
+ location = _ref5.location,
248
+ destinationProduct = _ref5.destinationProduct,
249
+ destinationSubproduct = _ref5.destinationSubproduct;
250
+ return dispatchAnalytics(applyCommonAttributes((0, _analytics2.uiIframeFocusedEvent)({
251
+ id: id,
252
+ display: display,
253
+ status: status,
254
+ definitionId: definitionId,
255
+ extensionKey: extensionKey,
256
+ location: location,
257
+ destinationProduct: destinationProduct,
258
+ destinationSubproduct: destinationSubproduct
259
+ }), commonAttributes));
260
+ },
261
+
262
+ /**
263
+ * This fires an event that represents when a user clicks on a Smart Link action.
264
+ * Note: This also starts the UFO smart-link-action-invocation experience.
265
+ * @param id The unique ID for this Smart Link.
266
+ * @param extensionKey The extensionKey of the Smart Link resovler invoked.
267
+ * @param actionType The type of the action that was clicked, e.g. PreviewAction
268
+ * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
269
+ * @param invokeType Whether the action invoked made a call to a server.
270
+ * @returns
271
+ */
272
+ actionClickedEvent: function actionClickedEvent(_ref6) {
273
+ var id = _ref6.id,
274
+ actionType = _ref6.actionType,
275
+ display = _ref6.display,
276
+ invokeType = _ref6.invokeType,
277
+ extensionKey = _ref6.extensionKey,
278
+ definitionId = _ref6.definitionId,
279
+ resourceType = _ref6.resourceType,
280
+ destinationProduct = _ref6.destinationProduct,
281
+ destinationSubproduct = _ref6.destinationSubproduct,
282
+ location = _ref6.location;
213
283
  (0, _ufoExperiences.startUfoExperience)('smart-link-action-invocation', id, {
214
284
  actionType: actionType,
215
285
  display: display,
@@ -237,14 +307,14 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
237
307
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
238
308
  * @param previewInvokeMethod How the preview was triggered.
239
309
  */
240
- hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref5) {
241
- var previewDisplay = _ref5.previewDisplay,
242
- definitionId = _ref5.definitionId,
243
- extensionKey = _ref5.extensionKey,
244
- destinationProduct = _ref5.destinationProduct,
245
- destinationSubproduct = _ref5.destinationSubproduct,
246
- location = _ref5.location,
247
- previewInvokeMethod = _ref5.previewInvokeMethod;
310
+ hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref7) {
311
+ var previewDisplay = _ref7.previewDisplay,
312
+ definitionId = _ref7.definitionId,
313
+ extensionKey = _ref7.extensionKey,
314
+ destinationProduct = _ref7.destinationProduct,
315
+ destinationSubproduct = _ref7.destinationSubproduct,
316
+ location = _ref7.location,
317
+ previewInvokeMethod = _ref7.previewInvokeMethod;
248
318
  dispatchAnalytics(applyCommonAttributes((0, _analytics.uiHoverCardOpenLinkClickedEvent)({
249
319
  id: defaultId,
250
320
  previewDisplay: previewDisplay,
@@ -264,14 +334,14 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
264
334
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
265
335
  * @returns
266
336
  */
267
- closedAuthEvent: function closedAuthEvent(_ref6) {
268
- var display = _ref6.display,
269
- extensionKey = _ref6.extensionKey,
270
- definitionId = _ref6.definitionId,
271
- resourceType = _ref6.resourceType,
272
- destinationProduct = _ref6.destinationProduct,
273
- destinationSubproduct = _ref6.destinationSubproduct,
274
- location = _ref6.location;
337
+ closedAuthEvent: function closedAuthEvent(_ref8) {
338
+ var display = _ref8.display,
339
+ extensionKey = _ref8.extensionKey,
340
+ definitionId = _ref8.definitionId,
341
+ resourceType = _ref8.resourceType,
342
+ destinationProduct = _ref8.destinationProduct,
343
+ destinationSubproduct = _ref8.destinationSubproduct,
344
+ location = _ref8.location;
275
345
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiClosedAuthEvent)({
276
346
  display: display,
277
347
  extensionKey: extensionKey,
@@ -305,16 +375,16 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
305
375
  * @param definitionId The definitionId of the Smart Link resolver invoked.
306
376
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
307
377
  */
308
- renderSuccessEvent: function renderSuccessEvent(_ref7) {
309
- var display = _ref7.display,
310
- status = _ref7.status,
311
- id = _ref7.id,
312
- extensionKey = _ref7.extensionKey,
313
- definitionId = _ref7.definitionId,
314
- resourceType = _ref7.resourceType,
315
- destinationProduct = _ref7.destinationProduct,
316
- destinationSubproduct = _ref7.destinationSubproduct,
317
- location = _ref7.location;
378
+ renderSuccessEvent: function renderSuccessEvent(_ref9) {
379
+ var display = _ref9.display,
380
+ status = _ref9.status,
381
+ id = _ref9.id,
382
+ extensionKey = _ref9.extensionKey,
383
+ definitionId = _ref9.definitionId,
384
+ resourceType = _ref9.resourceType,
385
+ destinationProduct = _ref9.destinationProduct,
386
+ destinationSubproduct = _ref9.destinationSubproduct,
387
+ location = _ref9.location;
318
388
  var experienceId = id ? id : defaultId;
319
389
  (0, _ufoExperiences.succeedUfoExperience)('smart-link-rendered', experienceId, {
320
390
  extensionKey: extensionKey,
@@ -343,17 +413,17 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
343
413
  * @param error: An error representing why the Smart Link render failed.
344
414
  * @param errorInfo: Additional details about the error including the stack trace.
345
415
  */
346
- renderFailedEvent: function renderFailedEvent(_ref8) {
347
- var display = _ref8.display,
348
- id = _ref8.id,
349
- error = _ref8.error,
350
- errorInfo = _ref8.errorInfo,
351
- extensionKey = _ref8.extensionKey,
352
- definitionId = _ref8.definitionId,
353
- resourceType = _ref8.resourceType,
354
- destinationProduct = _ref8.destinationProduct,
355
- destinationSubproduct = _ref8.destinationSubproduct,
356
- location = _ref8.location;
416
+ renderFailedEvent: function renderFailedEvent(_ref10) {
417
+ var display = _ref10.display,
418
+ id = _ref10.id,
419
+ error = _ref10.error,
420
+ errorInfo = _ref10.errorInfo,
421
+ extensionKey = _ref10.extensionKey,
422
+ definitionId = _ref10.definitionId,
423
+ resourceType = _ref10.resourceType,
424
+ destinationProduct = _ref10.destinationProduct,
425
+ destinationSubproduct = _ref10.destinationSubproduct,
426
+ location = _ref10.location;
357
427
  var experienceId = id ? id : defaultId; // Start and fail the smart-link-rendered experience. If it has already
358
428
  // been started nothing happens.
359
429
 
@@ -381,17 +451,17 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
381
451
  * @param previewInvokeMethod How the preview was triggered.
382
452
  * @returns
383
453
  */
384
- hoverCardViewedEvent: function hoverCardViewedEvent(_ref9) {
385
- var previewDisplay = _ref9.previewDisplay,
386
- previewInvokeMethod = _ref9.previewInvokeMethod,
387
- id = _ref9.id,
388
- extensionKey = _ref9.extensionKey,
389
- definitionId = _ref9.definitionId,
390
- resourceType = _ref9.resourceType,
391
- destinationProduct = _ref9.destinationProduct,
392
- destinationSubproduct = _ref9.destinationSubproduct,
393
- location = _ref9.location,
394
- status = _ref9.status;
454
+ hoverCardViewedEvent: function hoverCardViewedEvent(_ref11) {
455
+ var previewDisplay = _ref11.previewDisplay,
456
+ previewInvokeMethod = _ref11.previewInvokeMethod,
457
+ id = _ref11.id,
458
+ extensionKey = _ref11.extensionKey,
459
+ definitionId = _ref11.definitionId,
460
+ resourceType = _ref11.resourceType,
461
+ destinationProduct = _ref11.destinationProduct,
462
+ destinationSubproduct = _ref11.destinationSubproduct,
463
+ location = _ref11.location,
464
+ status = _ref11.status;
395
465
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiHoverCardViewedEvent)({
396
466
  id: id,
397
467
  previewDisplay: previewDisplay,
@@ -415,18 +485,18 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
415
485
  * @param previewInvokeMethod How the preview was triggered.
416
486
  * @returns
417
487
  */
418
- hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref10) {
419
- var id = _ref10.id,
420
- previewDisplay = _ref10.previewDisplay,
421
- hoverTime = _ref10.hoverTime,
422
- previewInvokeMethod = _ref10.previewInvokeMethod,
423
- extensionKey = _ref10.extensionKey,
424
- definitionId = _ref10.definitionId,
425
- resourceType = _ref10.resourceType,
426
- destinationProduct = _ref10.destinationProduct,
427
- destinationSubproduct = _ref10.destinationSubproduct,
428
- location = _ref10.location,
429
- status = _ref10.status;
488
+ hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref12) {
489
+ var id = _ref12.id,
490
+ previewDisplay = _ref12.previewDisplay,
491
+ hoverTime = _ref12.hoverTime,
492
+ previewInvokeMethod = _ref12.previewInvokeMethod,
493
+ extensionKey = _ref12.extensionKey,
494
+ definitionId = _ref12.definitionId,
495
+ resourceType = _ref12.resourceType,
496
+ destinationProduct = _ref12.destinationProduct,
497
+ destinationSubproduct = _ref12.destinationSubproduct,
498
+ location = _ref12.location,
499
+ status = _ref12.status;
430
500
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiHoverCardDismissedEvent)({
431
501
  previewDisplay: previewDisplay,
432
502
  id: id,
@@ -463,16 +533,16 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
463
533
  * @param actionType The type of action invoked, e.g. PreviewAction
464
534
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
465
535
  */
466
- invokeSucceededEvent: function invokeSucceededEvent(_ref11) {
467
- var id = _ref11.id,
468
- actionType = _ref11.actionType,
469
- display = _ref11.display,
470
- extensionKey = _ref11.extensionKey,
471
- definitionId = _ref11.definitionId,
472
- resourceType = _ref11.resourceType,
473
- destinationProduct = _ref11.destinationProduct,
474
- destinationSubproduct = _ref11.destinationSubproduct,
475
- location = _ref11.location;
536
+ invokeSucceededEvent: function invokeSucceededEvent(_ref13) {
537
+ var id = _ref13.id,
538
+ actionType = _ref13.actionType,
539
+ display = _ref13.display,
540
+ extensionKey = _ref13.extensionKey,
541
+ definitionId = _ref13.definitionId,
542
+ resourceType = _ref13.resourceType,
543
+ destinationProduct = _ref13.destinationProduct,
544
+ destinationSubproduct = _ref13.destinationSubproduct,
545
+ location = _ref13.location;
476
546
  (0, _ufoExperiences.succeedUfoExperience)('smart-link-action-invocation', id);
477
547
  dispatchAnalytics(applyCommonAttributes((0, _analytics.invokeSucceededEvent)({
478
548
  id: id,
@@ -495,17 +565,17 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
495
565
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
496
566
  * @param reason The reason the invocation failed.
497
567
  */
498
- invokeFailedEvent: function invokeFailedEvent(_ref12) {
499
- var id = _ref12.id,
500
- actionType = _ref12.actionType,
501
- display = _ref12.display,
502
- reason = _ref12.reason,
503
- extensionKey = _ref12.extensionKey,
504
- definitionId = _ref12.definitionId,
505
- resourceType = _ref12.resourceType,
506
- destinationProduct = _ref12.destinationProduct,
507
- destinationSubproduct = _ref12.destinationSubproduct,
508
- location = _ref12.location;
568
+ invokeFailedEvent: function invokeFailedEvent(_ref14) {
569
+ var id = _ref14.id,
570
+ actionType = _ref14.actionType,
571
+ display = _ref14.display,
572
+ reason = _ref14.reason,
573
+ extensionKey = _ref14.extensionKey,
574
+ definitionId = _ref14.definitionId,
575
+ resourceType = _ref14.resourceType,
576
+ destinationProduct = _ref14.destinationProduct,
577
+ destinationSubproduct = _ref14.destinationSubproduct,
578
+ location = _ref14.location;
509
579
  (0, _ufoExperiences.failUfoExperience)('smart-link-action-invocation', id);
510
580
  dispatchAnalytics(applyCommonAttributes((0, _analytics.invokeFailedEvent)({
511
581
  id: id,
@@ -527,14 +597,14 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
527
597
  * @param definitionId The definitionId of the Smart Link resolver invoked.
528
598
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
529
599
  */
530
- connectSucceededEvent: function connectSucceededEvent(_ref13) {
531
- var id = _ref13.id,
532
- extensionKey = _ref13.extensionKey,
533
- definitionId = _ref13.definitionId,
534
- resourceType = _ref13.resourceType,
535
- destinationProduct = _ref13.destinationProduct,
536
- destinationSubproduct = _ref13.destinationSubproduct,
537
- location = _ref13.location;
600
+ connectSucceededEvent: function connectSucceededEvent(_ref15) {
601
+ var id = _ref15.id,
602
+ extensionKey = _ref15.extensionKey,
603
+ definitionId = _ref15.definitionId,
604
+ resourceType = _ref15.resourceType,
605
+ destinationProduct = _ref15.destinationProduct,
606
+ destinationSubproduct = _ref15.destinationSubproduct,
607
+ location = _ref15.location;
538
608
  var experienceId = id ? id : defaultId;
539
609
  (0, _ufoExperiences.startUfoExperience)('smart-link-authenticated', experienceId, {
540
610
  extensionKey: extensionKey,
@@ -558,15 +628,15 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
558
628
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
559
629
  * @param reason The reason why the Smart Link connect account failed.
560
630
  */
561
- connectFailedEvent: function connectFailedEvent(_ref14) {
562
- var id = _ref14.id,
563
- reason = _ref14.reason,
564
- extensionKey = _ref14.extensionKey,
565
- definitionId = _ref14.definitionId,
566
- resourceType = _ref14.resourceType,
567
- destinationProduct = _ref14.destinationProduct,
568
- destinationSubproduct = _ref14.destinationSubproduct,
569
- location = _ref14.location;
631
+ connectFailedEvent: function connectFailedEvent(_ref16) {
632
+ var id = _ref16.id,
633
+ reason = _ref16.reason,
634
+ extensionKey = _ref16.extensionKey,
635
+ definitionId = _ref16.definitionId,
636
+ resourceType = _ref16.resourceType,
637
+ destinationProduct = _ref16.destinationProduct,
638
+ destinationSubproduct = _ref16.destinationSubproduct,
639
+ location = _ref16.location;
570
640
  var experienceId = id ? id : defaultId;
571
641
  (0, _ufoExperiences.startUfoExperience)('smart-link-authenticated', experienceId, {
572
642
  extensionKey: extensionKey,
@@ -593,16 +663,16 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
593
663
  * @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
594
664
  * @param error An error representing why the Smart Link request failed.
595
665
  */
596
- instrument: function instrument(_ref15) {
597
- var id = _ref15.id,
598
- status = _ref15.status,
599
- extensionKey = _ref15.extensionKey,
600
- definitionId = _ref15.definitionId,
601
- resourceType = _ref15.resourceType,
602
- destinationProduct = _ref15.destinationProduct,
603
- destinationSubproduct = _ref15.destinationSubproduct,
604
- location = _ref15.location,
605
- error = _ref15.error;
666
+ instrument: function instrument(_ref17) {
667
+ var id = _ref17.id,
668
+ status = _ref17.status,
669
+ extensionKey = _ref17.extensionKey,
670
+ definitionId = _ref17.definitionId,
671
+ resourceType = _ref17.resourceType,
672
+ destinationProduct = _ref17.destinationProduct,
673
+ destinationSubproduct = _ref17.destinationSubproduct,
674
+ location = _ref17.location,
675
+ error = _ref17.error;
606
676
  var event = (0, _analytics.instrumentEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
607
677
  id: id,
608
678
  status: status,
@@ -627,16 +697,16 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
627
697
  * @param error: An error representing why the Smart Link render failed.
628
698
  * @param errorInfo: Additional details about the error including the stack trace.
629
699
  */
630
- chunkloadFailedEvent: function chunkloadFailedEvent(_ref16) {
631
- var display = _ref16.display,
632
- error = _ref16.error,
633
- errorInfo = _ref16.errorInfo,
634
- extensionKey = _ref16.extensionKey,
635
- definitionId = _ref16.definitionId,
636
- resourceType = _ref16.resourceType,
637
- destinationProduct = _ref16.destinationProduct,
638
- destinationSubproduct = _ref16.destinationSubproduct,
639
- location = _ref16.location;
700
+ chunkloadFailedEvent: function chunkloadFailedEvent(_ref18) {
701
+ var display = _ref18.display,
702
+ error = _ref18.error,
703
+ errorInfo = _ref18.errorInfo,
704
+ extensionKey = _ref18.extensionKey,
705
+ definitionId = _ref18.definitionId,
706
+ resourceType = _ref18.resourceType,
707
+ destinationProduct = _ref18.destinationProduct,
708
+ destinationSubproduct = _ref18.destinationSubproduct,
709
+ location = _ref18.location;
640
710
  dispatchAnalytics(applyCommonAttributes((0, _analytics.chunkloadFailedEvent)({
641
711
  display: display,
642
712
  error: error,
@@ -661,13 +731,13 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
661
731
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
662
732
  * @returns
663
733
  */
664
- appAccountConnected: function appAccountConnected(_ref17) {
665
- var extensionKey = _ref17.extensionKey,
666
- definitionId = _ref17.definitionId,
667
- resourceType = _ref17.resourceType,
668
- destinationProduct = _ref17.destinationProduct,
669
- destinationSubproduct = _ref17.destinationSubproduct,
670
- location = _ref17.location;
734
+ appAccountConnected: function appAccountConnected(_ref19) {
735
+ var extensionKey = _ref19.extensionKey,
736
+ definitionId = _ref19.definitionId,
737
+ resourceType = _ref19.resourceType,
738
+ destinationProduct = _ref19.destinationProduct,
739
+ destinationSubproduct = _ref19.destinationSubproduct,
740
+ location = _ref19.location;
671
741
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.trackAppAccountConnected)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
672
742
  extensionKey: extensionKey,
673
743
  definitionId: definitionId,
@@ -684,9 +754,9 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
684
754
  * @param extensionKey The extensionKey of the Smart Link resolver invoked.
685
755
  * @returns
686
756
  */
687
- appAccountAuthStarted: function appAccountAuthStarted(_ref18) {
688
- var extensionKey = _ref18.extensionKey,
689
- location = _ref18.location;
757
+ appAccountAuthStarted: function appAccountAuthStarted(_ref20) {
758
+ var extensionKey = _ref20.extensionKey,
759
+ location = _ref20.location;
690
760
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.trackAppAccountAuthStarted)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
691
761
  extensionKey: extensionKey,
692
762
  location: location
@@ -711,13 +781,13 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
711
781
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
712
782
  * @returns
713
783
  */
714
- authPopupEvent: function authPopupEvent(_ref19) {
715
- var extensionKey = _ref19.extensionKey,
716
- definitionId = _ref19.definitionId,
717
- resourceType = _ref19.resourceType,
718
- destinationProduct = _ref19.destinationProduct,
719
- destinationSubproduct = _ref19.destinationSubproduct,
720
- location = _ref19.location;
784
+ authPopupEvent: function authPopupEvent(_ref21) {
785
+ var extensionKey = _ref21.extensionKey,
786
+ definitionId = _ref21.definitionId,
787
+ resourceType = _ref21.resourceType,
788
+ destinationProduct = _ref21.destinationProduct,
789
+ destinationSubproduct = _ref21.destinationSubproduct,
790
+ location = _ref21.location;
721
791
  return dispatchAnalytics(applyCommonAttributes((0, _analytics.screenAuthPopupEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
722
792
  extensionKey: extensionKey,
723
793
  definitionId: definitionId,