@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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +216 -146
- package/dist/cjs/utils/analytics/analytics.js +134 -74
- package/dist/cjs/utils/analytics/index.js +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +27 -1
- package/dist/cjs/view/EmbedCard/components/Frame.js +110 -5
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +75 -0
- package/dist/cjs/view/EmbedCard/index.js +6 -2
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +6 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +49 -2
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +69 -1
- package/dist/es2019/utils/analytics/analytics.js +52 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +27 -1
- package/dist/es2019/view/EmbedCard/components/Frame.js +91 -6
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +57 -0
- package/dist/es2019/view/EmbedCard/index.js +6 -2
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +6 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +13 -1
- package/dist/esm/messages.js +5 -0
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +217 -147
- package/dist/esm/utils/analytics/analytics.js +127 -73
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +27 -1
- package/dist/esm/view/EmbedCard/components/Frame.js +110 -6
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +62 -0
- package/dist/esm/view/EmbedCard/index.js +6 -2
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +6 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +43 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +27 -1
- package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +2 -0
- package/dist/types/utils/analytics/analytics.d.ts +3 -1
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +12 -0
- package/dist/types/utils/mocks.d.ts +2 -0
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/Frame.d.ts +2 -0
- package/dist/types/view/EmbedCard/components/IframeDwellTracker.d.ts +8 -0
- package/dist/types/view/EmbedCard/types.d.ts +2 -0
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +4 -0
- package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -0
- package/package.json +2 -2
- package/report.api.md +42 -1
- package/tmp/api-report-tmp.d.ts +20 -2
|
@@ -11,7 +11,7 @@ import { chunkloadFailedEvent as _chunkloadFailedEvent, connectFailedEvent as _c
|
|
|
11
11
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
12
12
|
import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getSubproduct } from '../helpers';
|
|
13
13
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
14
|
-
import { trackLinkUpdated } from '../../utils/analytics/analytics';
|
|
14
|
+
import { trackLinkUpdated, uiIframeDwelledEvent, uiIframeFocusedEvent } from '../../utils/analytics/analytics';
|
|
15
15
|
|
|
16
16
|
var applyCommonAttributes = function applyCommonAttributes(event, commonAttributes) {
|
|
17
17
|
if (event && event.attributes) {
|
|
@@ -174,26 +174,96 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
174
174
|
},
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* This fires an event that represents when a user
|
|
178
|
-
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
177
|
+
* This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
|
|
179
178
|
* @param id The unique ID for this Smart Link.
|
|
180
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
181
|
-
* @param actionType The type of the action that was clicked, e.g. PreviewAction
|
|
182
179
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
183
|
-
* @param
|
|
180
|
+
* @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
|
|
181
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
182
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
183
|
+
* @param location Where the Smart Link is currently rendered.
|
|
184
|
+
* @param destinationProduct The product the Smart Link is linked to.
|
|
185
|
+
* @param dwellTime Total seconds that the user has dwelled on this iframe
|
|
186
|
+
* @param dwellPercentVisible Percentage element was visible at end of dwell
|
|
184
187
|
* @returns
|
|
185
188
|
*/
|
|
186
|
-
|
|
189
|
+
iframeDwelledEvent: function iframeDwelledEvent(_ref4) {
|
|
187
190
|
var id = _ref4.id,
|
|
188
|
-
actionType = _ref4.actionType,
|
|
189
191
|
display = _ref4.display,
|
|
190
|
-
|
|
191
|
-
extensionKey = _ref4.extensionKey,
|
|
192
|
+
status = _ref4.status,
|
|
192
193
|
definitionId = _ref4.definitionId,
|
|
193
|
-
|
|
194
|
+
extensionKey = _ref4.extensionKey,
|
|
195
|
+
location = _ref4.location,
|
|
194
196
|
destinationProduct = _ref4.destinationProduct,
|
|
195
197
|
destinationSubproduct = _ref4.destinationSubproduct,
|
|
196
|
-
|
|
198
|
+
dwellTime = _ref4.dwellTime,
|
|
199
|
+
dwellPercentVisible = _ref4.dwellPercentVisible;
|
|
200
|
+
return dispatchAnalytics(applyCommonAttributes(uiIframeDwelledEvent({
|
|
201
|
+
id: id,
|
|
202
|
+
display: display,
|
|
203
|
+
status: status,
|
|
204
|
+
definitionId: definitionId,
|
|
205
|
+
extensionKey: extensionKey,
|
|
206
|
+
location: location,
|
|
207
|
+
destinationProduct: destinationProduct,
|
|
208
|
+
destinationSubproduct: destinationSubproduct,
|
|
209
|
+
dwellTime: dwellTime,
|
|
210
|
+
dwellPercentVisible: dwellPercentVisible
|
|
211
|
+
}), commonAttributes));
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
|
|
216
|
+
* @param id The unique ID for this Smart Link.
|
|
217
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
218
|
+
* @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
|
|
219
|
+
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
220
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
221
|
+
* @param location Where the Smart Link is currently rendered.
|
|
222
|
+
* @param destinationProduct The product the Smart Link is linked to.
|
|
223
|
+
* @returns
|
|
224
|
+
*/
|
|
225
|
+
iframeFocusedEvent: function iframeFocusedEvent(_ref5) {
|
|
226
|
+
var id = _ref5.id,
|
|
227
|
+
display = _ref5.display,
|
|
228
|
+
status = _ref5.status,
|
|
229
|
+
definitionId = _ref5.definitionId,
|
|
230
|
+
extensionKey = _ref5.extensionKey,
|
|
231
|
+
location = _ref5.location,
|
|
232
|
+
destinationProduct = _ref5.destinationProduct,
|
|
233
|
+
destinationSubproduct = _ref5.destinationSubproduct;
|
|
234
|
+
return dispatchAnalytics(applyCommonAttributes(uiIframeFocusedEvent({
|
|
235
|
+
id: id,
|
|
236
|
+
display: display,
|
|
237
|
+
status: status,
|
|
238
|
+
definitionId: definitionId,
|
|
239
|
+
extensionKey: extensionKey,
|
|
240
|
+
location: location,
|
|
241
|
+
destinationProduct: destinationProduct,
|
|
242
|
+
destinationSubproduct: destinationSubproduct
|
|
243
|
+
}), commonAttributes));
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
248
|
+
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
249
|
+
* @param id The unique ID for this Smart Link.
|
|
250
|
+
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
251
|
+
* @param actionType The type of the action that was clicked, e.g. PreviewAction
|
|
252
|
+
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
253
|
+
* @param invokeType Whether the action invoked made a call to a server.
|
|
254
|
+
* @returns
|
|
255
|
+
*/
|
|
256
|
+
actionClickedEvent: function actionClickedEvent(_ref6) {
|
|
257
|
+
var id = _ref6.id,
|
|
258
|
+
actionType = _ref6.actionType,
|
|
259
|
+
display = _ref6.display,
|
|
260
|
+
invokeType = _ref6.invokeType,
|
|
261
|
+
extensionKey = _ref6.extensionKey,
|
|
262
|
+
definitionId = _ref6.definitionId,
|
|
263
|
+
resourceType = _ref6.resourceType,
|
|
264
|
+
destinationProduct = _ref6.destinationProduct,
|
|
265
|
+
destinationSubproduct = _ref6.destinationSubproduct,
|
|
266
|
+
location = _ref6.location;
|
|
197
267
|
startUfoExperience('smart-link-action-invocation', id, {
|
|
198
268
|
actionType: actionType,
|
|
199
269
|
display: display,
|
|
@@ -221,14 +291,14 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
221
291
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
222
292
|
* @param previewInvokeMethod How the preview was triggered.
|
|
223
293
|
*/
|
|
224
|
-
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(
|
|
225
|
-
var previewDisplay =
|
|
226
|
-
definitionId =
|
|
227
|
-
extensionKey =
|
|
228
|
-
destinationProduct =
|
|
229
|
-
destinationSubproduct =
|
|
230
|
-
location =
|
|
231
|
-
previewInvokeMethod =
|
|
294
|
+
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref7) {
|
|
295
|
+
var previewDisplay = _ref7.previewDisplay,
|
|
296
|
+
definitionId = _ref7.definitionId,
|
|
297
|
+
extensionKey = _ref7.extensionKey,
|
|
298
|
+
destinationProduct = _ref7.destinationProduct,
|
|
299
|
+
destinationSubproduct = _ref7.destinationSubproduct,
|
|
300
|
+
location = _ref7.location,
|
|
301
|
+
previewInvokeMethod = _ref7.previewInvokeMethod;
|
|
232
302
|
dispatchAnalytics(applyCommonAttributes(uiHoverCardOpenLinkClickedEvent({
|
|
233
303
|
id: defaultId,
|
|
234
304
|
previewDisplay: previewDisplay,
|
|
@@ -248,14 +318,14 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
248
318
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
249
319
|
* @returns
|
|
250
320
|
*/
|
|
251
|
-
closedAuthEvent: function closedAuthEvent(
|
|
252
|
-
var display =
|
|
253
|
-
extensionKey =
|
|
254
|
-
definitionId =
|
|
255
|
-
resourceType =
|
|
256
|
-
destinationProduct =
|
|
257
|
-
destinationSubproduct =
|
|
258
|
-
location =
|
|
321
|
+
closedAuthEvent: function closedAuthEvent(_ref8) {
|
|
322
|
+
var display = _ref8.display,
|
|
323
|
+
extensionKey = _ref8.extensionKey,
|
|
324
|
+
definitionId = _ref8.definitionId,
|
|
325
|
+
resourceType = _ref8.resourceType,
|
|
326
|
+
destinationProduct = _ref8.destinationProduct,
|
|
327
|
+
destinationSubproduct = _ref8.destinationSubproduct,
|
|
328
|
+
location = _ref8.location;
|
|
259
329
|
return dispatchAnalytics(applyCommonAttributes(uiClosedAuthEvent({
|
|
260
330
|
display: display,
|
|
261
331
|
extensionKey: extensionKey,
|
|
@@ -289,16 +359,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
289
359
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
290
360
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
291
361
|
*/
|
|
292
|
-
renderSuccessEvent: function renderSuccessEvent(
|
|
293
|
-
var display =
|
|
294
|
-
status =
|
|
295
|
-
id =
|
|
296
|
-
extensionKey =
|
|
297
|
-
definitionId =
|
|
298
|
-
resourceType =
|
|
299
|
-
destinationProduct =
|
|
300
|
-
destinationSubproduct =
|
|
301
|
-
location =
|
|
362
|
+
renderSuccessEvent: function renderSuccessEvent(_ref9) {
|
|
363
|
+
var display = _ref9.display,
|
|
364
|
+
status = _ref9.status,
|
|
365
|
+
id = _ref9.id,
|
|
366
|
+
extensionKey = _ref9.extensionKey,
|
|
367
|
+
definitionId = _ref9.definitionId,
|
|
368
|
+
resourceType = _ref9.resourceType,
|
|
369
|
+
destinationProduct = _ref9.destinationProduct,
|
|
370
|
+
destinationSubproduct = _ref9.destinationSubproduct,
|
|
371
|
+
location = _ref9.location;
|
|
302
372
|
var experienceId = id ? id : defaultId;
|
|
303
373
|
succeedUfoExperience('smart-link-rendered', experienceId, {
|
|
304
374
|
extensionKey: extensionKey,
|
|
@@ -327,17 +397,17 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
327
397
|
* @param error: An error representing why the Smart Link render failed.
|
|
328
398
|
* @param errorInfo: Additional details about the error including the stack trace.
|
|
329
399
|
*/
|
|
330
|
-
renderFailedEvent: function renderFailedEvent(
|
|
331
|
-
var display =
|
|
332
|
-
id =
|
|
333
|
-
error =
|
|
334
|
-
errorInfo =
|
|
335
|
-
extensionKey =
|
|
336
|
-
definitionId =
|
|
337
|
-
resourceType =
|
|
338
|
-
destinationProduct =
|
|
339
|
-
destinationSubproduct =
|
|
340
|
-
location =
|
|
400
|
+
renderFailedEvent: function renderFailedEvent(_ref10) {
|
|
401
|
+
var display = _ref10.display,
|
|
402
|
+
id = _ref10.id,
|
|
403
|
+
error = _ref10.error,
|
|
404
|
+
errorInfo = _ref10.errorInfo,
|
|
405
|
+
extensionKey = _ref10.extensionKey,
|
|
406
|
+
definitionId = _ref10.definitionId,
|
|
407
|
+
resourceType = _ref10.resourceType,
|
|
408
|
+
destinationProduct = _ref10.destinationProduct,
|
|
409
|
+
destinationSubproduct = _ref10.destinationSubproduct,
|
|
410
|
+
location = _ref10.location;
|
|
341
411
|
var experienceId = id ? id : defaultId; // Start and fail the smart-link-rendered experience. If it has already
|
|
342
412
|
// been started nothing happens.
|
|
343
413
|
|
|
@@ -365,17 +435,17 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
365
435
|
* @param previewInvokeMethod How the preview was triggered.
|
|
366
436
|
* @returns
|
|
367
437
|
*/
|
|
368
|
-
hoverCardViewedEvent: function hoverCardViewedEvent(
|
|
369
|
-
var previewDisplay =
|
|
370
|
-
previewInvokeMethod =
|
|
371
|
-
id =
|
|
372
|
-
extensionKey =
|
|
373
|
-
definitionId =
|
|
374
|
-
resourceType =
|
|
375
|
-
destinationProduct =
|
|
376
|
-
destinationSubproduct =
|
|
377
|
-
location =
|
|
378
|
-
status =
|
|
438
|
+
hoverCardViewedEvent: function hoverCardViewedEvent(_ref11) {
|
|
439
|
+
var previewDisplay = _ref11.previewDisplay,
|
|
440
|
+
previewInvokeMethod = _ref11.previewInvokeMethod,
|
|
441
|
+
id = _ref11.id,
|
|
442
|
+
extensionKey = _ref11.extensionKey,
|
|
443
|
+
definitionId = _ref11.definitionId,
|
|
444
|
+
resourceType = _ref11.resourceType,
|
|
445
|
+
destinationProduct = _ref11.destinationProduct,
|
|
446
|
+
destinationSubproduct = _ref11.destinationSubproduct,
|
|
447
|
+
location = _ref11.location,
|
|
448
|
+
status = _ref11.status;
|
|
379
449
|
return dispatchAnalytics(applyCommonAttributes(uiHoverCardViewedEvent({
|
|
380
450
|
id: id,
|
|
381
451
|
previewDisplay: previewDisplay,
|
|
@@ -399,18 +469,18 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
399
469
|
* @param previewInvokeMethod How the preview was triggered.
|
|
400
470
|
* @returns
|
|
401
471
|
*/
|
|
402
|
-
hoverCardDismissedEvent: function hoverCardDismissedEvent(
|
|
403
|
-
var id =
|
|
404
|
-
previewDisplay =
|
|
405
|
-
hoverTime =
|
|
406
|
-
previewInvokeMethod =
|
|
407
|
-
extensionKey =
|
|
408
|
-
definitionId =
|
|
409
|
-
resourceType =
|
|
410
|
-
destinationProduct =
|
|
411
|
-
destinationSubproduct =
|
|
412
|
-
location =
|
|
413
|
-
status =
|
|
472
|
+
hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref12) {
|
|
473
|
+
var id = _ref12.id,
|
|
474
|
+
previewDisplay = _ref12.previewDisplay,
|
|
475
|
+
hoverTime = _ref12.hoverTime,
|
|
476
|
+
previewInvokeMethod = _ref12.previewInvokeMethod,
|
|
477
|
+
extensionKey = _ref12.extensionKey,
|
|
478
|
+
definitionId = _ref12.definitionId,
|
|
479
|
+
resourceType = _ref12.resourceType,
|
|
480
|
+
destinationProduct = _ref12.destinationProduct,
|
|
481
|
+
destinationSubproduct = _ref12.destinationSubproduct,
|
|
482
|
+
location = _ref12.location,
|
|
483
|
+
status = _ref12.status;
|
|
414
484
|
return dispatchAnalytics(applyCommonAttributes(uiHoverCardDismissedEvent({
|
|
415
485
|
previewDisplay: previewDisplay,
|
|
416
486
|
id: id,
|
|
@@ -447,16 +517,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
447
517
|
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
448
518
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
449
519
|
*/
|
|
450
|
-
invokeSucceededEvent: function invokeSucceededEvent(
|
|
451
|
-
var id =
|
|
452
|
-
actionType =
|
|
453
|
-
display =
|
|
454
|
-
extensionKey =
|
|
455
|
-
definitionId =
|
|
456
|
-
resourceType =
|
|
457
|
-
destinationProduct =
|
|
458
|
-
destinationSubproduct =
|
|
459
|
-
location =
|
|
520
|
+
invokeSucceededEvent: function invokeSucceededEvent(_ref13) {
|
|
521
|
+
var id = _ref13.id,
|
|
522
|
+
actionType = _ref13.actionType,
|
|
523
|
+
display = _ref13.display,
|
|
524
|
+
extensionKey = _ref13.extensionKey,
|
|
525
|
+
definitionId = _ref13.definitionId,
|
|
526
|
+
resourceType = _ref13.resourceType,
|
|
527
|
+
destinationProduct = _ref13.destinationProduct,
|
|
528
|
+
destinationSubproduct = _ref13.destinationSubproduct,
|
|
529
|
+
location = _ref13.location;
|
|
460
530
|
succeedUfoExperience('smart-link-action-invocation', id);
|
|
461
531
|
dispatchAnalytics(applyCommonAttributes(_invokeSucceededEvent({
|
|
462
532
|
id: id,
|
|
@@ -479,17 +549,17 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
479
549
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
480
550
|
* @param reason The reason the invocation failed.
|
|
481
551
|
*/
|
|
482
|
-
invokeFailedEvent: function invokeFailedEvent(
|
|
483
|
-
var id =
|
|
484
|
-
actionType =
|
|
485
|
-
display =
|
|
486
|
-
reason =
|
|
487
|
-
extensionKey =
|
|
488
|
-
definitionId =
|
|
489
|
-
resourceType =
|
|
490
|
-
destinationProduct =
|
|
491
|
-
destinationSubproduct =
|
|
492
|
-
location =
|
|
552
|
+
invokeFailedEvent: function invokeFailedEvent(_ref14) {
|
|
553
|
+
var id = _ref14.id,
|
|
554
|
+
actionType = _ref14.actionType,
|
|
555
|
+
display = _ref14.display,
|
|
556
|
+
reason = _ref14.reason,
|
|
557
|
+
extensionKey = _ref14.extensionKey,
|
|
558
|
+
definitionId = _ref14.definitionId,
|
|
559
|
+
resourceType = _ref14.resourceType,
|
|
560
|
+
destinationProduct = _ref14.destinationProduct,
|
|
561
|
+
destinationSubproduct = _ref14.destinationSubproduct,
|
|
562
|
+
location = _ref14.location;
|
|
493
563
|
failUfoExperience('smart-link-action-invocation', id);
|
|
494
564
|
dispatchAnalytics(applyCommonAttributes(_invokeFailedEvent({
|
|
495
565
|
id: id,
|
|
@@ -511,14 +581,14 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
511
581
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
512
582
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
513
583
|
*/
|
|
514
|
-
connectSucceededEvent: function connectSucceededEvent(
|
|
515
|
-
var id =
|
|
516
|
-
extensionKey =
|
|
517
|
-
definitionId =
|
|
518
|
-
resourceType =
|
|
519
|
-
destinationProduct =
|
|
520
|
-
destinationSubproduct =
|
|
521
|
-
location =
|
|
584
|
+
connectSucceededEvent: function connectSucceededEvent(_ref15) {
|
|
585
|
+
var id = _ref15.id,
|
|
586
|
+
extensionKey = _ref15.extensionKey,
|
|
587
|
+
definitionId = _ref15.definitionId,
|
|
588
|
+
resourceType = _ref15.resourceType,
|
|
589
|
+
destinationProduct = _ref15.destinationProduct,
|
|
590
|
+
destinationSubproduct = _ref15.destinationSubproduct,
|
|
591
|
+
location = _ref15.location;
|
|
522
592
|
var experienceId = id ? id : defaultId;
|
|
523
593
|
startUfoExperience('smart-link-authenticated', experienceId, {
|
|
524
594
|
extensionKey: extensionKey,
|
|
@@ -542,15 +612,15 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
542
612
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
543
613
|
* @param reason The reason why the Smart Link connect account failed.
|
|
544
614
|
*/
|
|
545
|
-
connectFailedEvent: function connectFailedEvent(
|
|
546
|
-
var id =
|
|
547
|
-
reason =
|
|
548
|
-
extensionKey =
|
|
549
|
-
definitionId =
|
|
550
|
-
resourceType =
|
|
551
|
-
destinationProduct =
|
|
552
|
-
destinationSubproduct =
|
|
553
|
-
location =
|
|
615
|
+
connectFailedEvent: function connectFailedEvent(_ref16) {
|
|
616
|
+
var id = _ref16.id,
|
|
617
|
+
reason = _ref16.reason,
|
|
618
|
+
extensionKey = _ref16.extensionKey,
|
|
619
|
+
definitionId = _ref16.definitionId,
|
|
620
|
+
resourceType = _ref16.resourceType,
|
|
621
|
+
destinationProduct = _ref16.destinationProduct,
|
|
622
|
+
destinationSubproduct = _ref16.destinationSubproduct,
|
|
623
|
+
location = _ref16.location;
|
|
554
624
|
var experienceId = id ? id : defaultId;
|
|
555
625
|
startUfoExperience('smart-link-authenticated', experienceId, {
|
|
556
626
|
extensionKey: extensionKey,
|
|
@@ -577,16 +647,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
577
647
|
* @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
|
|
578
648
|
* @param error An error representing why the Smart Link request failed.
|
|
579
649
|
*/
|
|
580
|
-
instrument: function instrument(
|
|
581
|
-
var id =
|
|
582
|
-
status =
|
|
583
|
-
extensionKey =
|
|
584
|
-
definitionId =
|
|
585
|
-
resourceType =
|
|
586
|
-
destinationProduct =
|
|
587
|
-
destinationSubproduct =
|
|
588
|
-
location =
|
|
589
|
-
error =
|
|
650
|
+
instrument: function instrument(_ref17) {
|
|
651
|
+
var id = _ref17.id,
|
|
652
|
+
status = _ref17.status,
|
|
653
|
+
extensionKey = _ref17.extensionKey,
|
|
654
|
+
definitionId = _ref17.definitionId,
|
|
655
|
+
resourceType = _ref17.resourceType,
|
|
656
|
+
destinationProduct = _ref17.destinationProduct,
|
|
657
|
+
destinationSubproduct = _ref17.destinationSubproduct,
|
|
658
|
+
location = _ref17.location,
|
|
659
|
+
error = _ref17.error;
|
|
590
660
|
var event = instrumentEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
591
661
|
id: id,
|
|
592
662
|
status: status,
|
|
@@ -611,16 +681,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
611
681
|
* @param error: An error representing why the Smart Link render failed.
|
|
612
682
|
* @param errorInfo: Additional details about the error including the stack trace.
|
|
613
683
|
*/
|
|
614
|
-
chunkloadFailedEvent: function chunkloadFailedEvent(
|
|
615
|
-
var display =
|
|
616
|
-
error =
|
|
617
|
-
errorInfo =
|
|
618
|
-
extensionKey =
|
|
619
|
-
definitionId =
|
|
620
|
-
resourceType =
|
|
621
|
-
destinationProduct =
|
|
622
|
-
destinationSubproduct =
|
|
623
|
-
location =
|
|
684
|
+
chunkloadFailedEvent: function chunkloadFailedEvent(_ref18) {
|
|
685
|
+
var display = _ref18.display,
|
|
686
|
+
error = _ref18.error,
|
|
687
|
+
errorInfo = _ref18.errorInfo,
|
|
688
|
+
extensionKey = _ref18.extensionKey,
|
|
689
|
+
definitionId = _ref18.definitionId,
|
|
690
|
+
resourceType = _ref18.resourceType,
|
|
691
|
+
destinationProduct = _ref18.destinationProduct,
|
|
692
|
+
destinationSubproduct = _ref18.destinationSubproduct,
|
|
693
|
+
location = _ref18.location;
|
|
624
694
|
dispatchAnalytics(applyCommonAttributes(_chunkloadFailedEvent({
|
|
625
695
|
display: display,
|
|
626
696
|
error: error,
|
|
@@ -645,13 +715,13 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
645
715
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
646
716
|
* @returns
|
|
647
717
|
*/
|
|
648
|
-
appAccountConnected: function appAccountConnected(
|
|
649
|
-
var extensionKey =
|
|
650
|
-
definitionId =
|
|
651
|
-
resourceType =
|
|
652
|
-
destinationProduct =
|
|
653
|
-
destinationSubproduct =
|
|
654
|
-
location =
|
|
718
|
+
appAccountConnected: function appAccountConnected(_ref19) {
|
|
719
|
+
var extensionKey = _ref19.extensionKey,
|
|
720
|
+
definitionId = _ref19.definitionId,
|
|
721
|
+
resourceType = _ref19.resourceType,
|
|
722
|
+
destinationProduct = _ref19.destinationProduct,
|
|
723
|
+
destinationSubproduct = _ref19.destinationSubproduct,
|
|
724
|
+
location = _ref19.location;
|
|
655
725
|
return dispatchAnalytics(applyCommonAttributes(trackAppAccountConnected(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
656
726
|
extensionKey: extensionKey,
|
|
657
727
|
definitionId: definitionId,
|
|
@@ -668,9 +738,9 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
668
738
|
* @param extensionKey The extensionKey of the Smart Link resolver invoked.
|
|
669
739
|
* @returns
|
|
670
740
|
*/
|
|
671
|
-
appAccountAuthStarted: function appAccountAuthStarted(
|
|
672
|
-
var extensionKey =
|
|
673
|
-
location =
|
|
741
|
+
appAccountAuthStarted: function appAccountAuthStarted(_ref20) {
|
|
742
|
+
var extensionKey = _ref20.extensionKey,
|
|
743
|
+
location = _ref20.location;
|
|
674
744
|
return dispatchAnalytics(applyCommonAttributes(trackAppAccountAuthStarted(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
675
745
|
extensionKey: extensionKey,
|
|
676
746
|
location: location
|
|
@@ -695,13 +765,13 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
695
765
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
696
766
|
* @returns
|
|
697
767
|
*/
|
|
698
|
-
authPopupEvent: function authPopupEvent(
|
|
699
|
-
var extensionKey =
|
|
700
|
-
definitionId =
|
|
701
|
-
resourceType =
|
|
702
|
-
destinationProduct =
|
|
703
|
-
destinationSubproduct =
|
|
704
|
-
location =
|
|
768
|
+
authPopupEvent: function authPopupEvent(_ref21) {
|
|
769
|
+
var extensionKey = _ref21.extensionKey,
|
|
770
|
+
definitionId = _ref21.definitionId,
|
|
771
|
+
resourceType = _ref21.resourceType,
|
|
772
|
+
destinationProduct = _ref21.destinationProduct,
|
|
773
|
+
destinationSubproduct = _ref21.destinationSubproduct,
|
|
774
|
+
location = _ref21.location;
|
|
705
775
|
return dispatchAnalytics(applyCommonAttributes(screenAuthPopupEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
706
776
|
extensionKey: extensionKey,
|
|
707
777
|
definitionId: definitionId,
|