@atlaskit/smart-card 26.0.1 → 26.1.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 +6 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +37 -0
- package/dist/cjs/state/hooks/use-invoke/index.js +28 -8
- package/dist/cjs/utils/analytics/analytics.js +198 -126
- package/dist/cjs/utils/analytics/index.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
- package/dist/cjs/view/CardWithUrl/component.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/index.js +43 -30
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +37 -3
- package/dist/es2019/state/hooks/use-invoke/index.js +23 -9
- package/dist/es2019/utils/analytics/analytics.js +66 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
- package/dist/es2019/view/CardWithUrl/component.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/index.js +29 -18
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +39 -2
- package/dist/esm/state/hooks/use-invoke/index.js +28 -8
- package/dist/esm/utils/analytics/analytics.js +190 -124
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -0
- package/dist/esm/view/CardWithUrl/component.js +2 -1
- package/dist/esm/view/FlexibleCard/components/common/lozenge-action/index.js +43 -30
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +31 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +24 -0
- package/dist/types/state/hooks/use-invoke/index.d.ts +7 -1
- package/dist/types/state/hooks/useSmartLink.d.ts +12 -0
- package/dist/types/utils/analytics/analytics.d.ts +13 -0
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +1 -0
- package/dist/types/utils/mocks.d.ts +12 -0
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/common/lozenge-action/types.d.ts +1 -1
- package/package.json +1 -1
- package/report.api.md +20 -1
- package/tmp/api-report-tmp.d.ts +17 -2
|
@@ -2,7 +2,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
var _excluded = ["actionSubjectId"]
|
|
5
|
+
var _excluded = ["actionSubjectId"],
|
|
6
|
+
_excluded2 = ["smartLinkActionType"],
|
|
7
|
+
_excluded3 = ["smartLinkActionType"],
|
|
8
|
+
_excluded4 = ["smartLinkActionType"];
|
|
6
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
11
|
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
@@ -236,13 +239,49 @@ export var trackLinkUpdated = function trackLinkUpdated(_ref8) {
|
|
|
236
239
|
attributes: _objectSpread(_objectSpread({}, context), attributes)
|
|
237
240
|
};
|
|
238
241
|
};
|
|
239
|
-
export var
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
export var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref9) {
|
|
243
|
+
var smartLinkActionType = _ref9.smartLinkActionType,
|
|
244
|
+
attributes = _objectWithoutProperties(_ref9, _excluded2);
|
|
245
|
+
return {
|
|
246
|
+
action: 'started',
|
|
247
|
+
actionSubject: 'smartLinkQuickAction',
|
|
248
|
+
eventType: 'track',
|
|
249
|
+
attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
|
|
250
|
+
smartLinkActionType: smartLinkActionType
|
|
251
|
+
})
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
export var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref10) {
|
|
255
|
+
var smartLinkActionType = _ref10.smartLinkActionType,
|
|
256
|
+
attributes = _objectWithoutProperties(_ref10, _excluded3);
|
|
257
|
+
return {
|
|
258
|
+
action: 'success',
|
|
259
|
+
actionSubject: 'smartLinkQuickAction',
|
|
260
|
+
eventType: 'track',
|
|
261
|
+
attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
|
|
262
|
+
smartLinkActionType: smartLinkActionType
|
|
263
|
+
})
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
export var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref11) {
|
|
267
|
+
var smartLinkActionType = _ref11.smartLinkActionType,
|
|
268
|
+
attributes = _objectWithoutProperties(_ref11, _excluded4);
|
|
269
|
+
return {
|
|
270
|
+
action: 'failed',
|
|
271
|
+
actionSubject: 'smartLinkQuickAction',
|
|
272
|
+
eventType: 'track',
|
|
273
|
+
attributes: _objectSpread(_objectSpread(_objectSpread({}, context), attributes), {}, {
|
|
274
|
+
smartLinkActionType: smartLinkActionType
|
|
275
|
+
})
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
export var uiAuthEvent = function uiAuthEvent(_ref12) {
|
|
279
|
+
var definitionId = _ref12.definitionId,
|
|
280
|
+
extensionKey = _ref12.extensionKey,
|
|
281
|
+
destinationProduct = _ref12.destinationProduct,
|
|
282
|
+
destinationSubproduct = _ref12.destinationSubproduct,
|
|
283
|
+
location = _ref12.location,
|
|
284
|
+
display = _ref12.display;
|
|
246
285
|
return {
|
|
247
286
|
action: 'clicked',
|
|
248
287
|
actionSubject: 'button',
|
|
@@ -258,13 +297,13 @@ export var uiAuthEvent = function uiAuthEvent(_ref9) {
|
|
|
258
297
|
})
|
|
259
298
|
};
|
|
260
299
|
};
|
|
261
|
-
export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(
|
|
262
|
-
var definitionId =
|
|
263
|
-
extensionKey =
|
|
264
|
-
destinationProduct =
|
|
265
|
-
destinationSubproduct =
|
|
266
|
-
location =
|
|
267
|
-
display =
|
|
300
|
+
export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref13) {
|
|
301
|
+
var definitionId = _ref13.definitionId,
|
|
302
|
+
extensionKey = _ref13.extensionKey,
|
|
303
|
+
destinationProduct = _ref13.destinationProduct,
|
|
304
|
+
destinationSubproduct = _ref13.destinationSubproduct,
|
|
305
|
+
location = _ref13.location,
|
|
306
|
+
display = _ref13.display;
|
|
268
307
|
return {
|
|
269
308
|
action: 'clicked',
|
|
270
309
|
actionSubject: 'smartLink',
|
|
@@ -280,17 +319,17 @@ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_r
|
|
|
280
319
|
})
|
|
281
320
|
};
|
|
282
321
|
};
|
|
283
|
-
export var uiCardClickedEvent = function uiCardClickedEvent(
|
|
284
|
-
var id =
|
|
285
|
-
display =
|
|
286
|
-
status =
|
|
287
|
-
definitionId =
|
|
288
|
-
extensionKey =
|
|
289
|
-
isModifierKeyPressed =
|
|
290
|
-
location =
|
|
291
|
-
destinationProduct =
|
|
292
|
-
destinationSubproduct =
|
|
293
|
-
actionSubjectId =
|
|
322
|
+
export var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
|
|
323
|
+
var id = _ref14.id,
|
|
324
|
+
display = _ref14.display,
|
|
325
|
+
status = _ref14.status,
|
|
326
|
+
definitionId = _ref14.definitionId,
|
|
327
|
+
extensionKey = _ref14.extensionKey,
|
|
328
|
+
isModifierKeyPressed = _ref14.isModifierKeyPressed,
|
|
329
|
+
location = _ref14.location,
|
|
330
|
+
destinationProduct = _ref14.destinationProduct,
|
|
331
|
+
destinationSubproduct = _ref14.destinationSubproduct,
|
|
332
|
+
actionSubjectId = _ref14.actionSubjectId;
|
|
294
333
|
return {
|
|
295
334
|
action: 'clicked',
|
|
296
335
|
actionSubject: 'smartLink',
|
|
@@ -309,17 +348,17 @@ export var uiCardClickedEvent = function uiCardClickedEvent(_ref11) {
|
|
|
309
348
|
})
|
|
310
349
|
};
|
|
311
350
|
};
|
|
312
|
-
export var uiIframeDwelledEvent = function uiIframeDwelledEvent(
|
|
313
|
-
var id =
|
|
314
|
-
display =
|
|
315
|
-
status =
|
|
316
|
-
definitionId =
|
|
317
|
-
extensionKey =
|
|
318
|
-
location =
|
|
319
|
-
destinationProduct =
|
|
320
|
-
destinationSubproduct =
|
|
321
|
-
dwellTime =
|
|
322
|
-
dwellPercentVisible =
|
|
351
|
+
export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
|
|
352
|
+
var id = _ref15.id,
|
|
353
|
+
display = _ref15.display,
|
|
354
|
+
status = _ref15.status,
|
|
355
|
+
definitionId = _ref15.definitionId,
|
|
356
|
+
extensionKey = _ref15.extensionKey,
|
|
357
|
+
location = _ref15.location,
|
|
358
|
+
destinationProduct = _ref15.destinationProduct,
|
|
359
|
+
destinationSubproduct = _ref15.destinationSubproduct,
|
|
360
|
+
dwellTime = _ref15.dwellTime,
|
|
361
|
+
dwellPercentVisible = _ref15.dwellPercentVisible;
|
|
323
362
|
return {
|
|
324
363
|
action: 'dwelled',
|
|
325
364
|
actionSubject: 'smartLinkIframe',
|
|
@@ -338,15 +377,15 @@ export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref12) {
|
|
|
338
377
|
})
|
|
339
378
|
};
|
|
340
379
|
};
|
|
341
|
-
export var uiIframeFocusedEvent = function uiIframeFocusedEvent(
|
|
342
|
-
var id =
|
|
343
|
-
display =
|
|
344
|
-
status =
|
|
345
|
-
definitionId =
|
|
346
|
-
extensionKey =
|
|
347
|
-
location =
|
|
348
|
-
destinationProduct =
|
|
349
|
-
destinationSubproduct =
|
|
380
|
+
export var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref16) {
|
|
381
|
+
var id = _ref16.id,
|
|
382
|
+
display = _ref16.display,
|
|
383
|
+
status = _ref16.status,
|
|
384
|
+
definitionId = _ref16.definitionId,
|
|
385
|
+
extensionKey = _ref16.extensionKey,
|
|
386
|
+
location = _ref16.location,
|
|
387
|
+
destinationProduct = _ref16.destinationProduct,
|
|
388
|
+
destinationSubproduct = _ref16.destinationSubproduct;
|
|
350
389
|
return {
|
|
351
390
|
action: 'focused',
|
|
352
391
|
actionSubject: 'smartLinkIframe',
|
|
@@ -363,15 +402,15 @@ export var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref13) {
|
|
|
363
402
|
})
|
|
364
403
|
};
|
|
365
404
|
};
|
|
366
|
-
export var uiActionClickedEvent = function uiActionClickedEvent(
|
|
367
|
-
var id =
|
|
368
|
-
actionType =
|
|
369
|
-
extensionKey =
|
|
370
|
-
display =
|
|
371
|
-
definitionId =
|
|
372
|
-
destinationProduct =
|
|
373
|
-
destinationSubproduct =
|
|
374
|
-
location =
|
|
405
|
+
export var uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
|
|
406
|
+
var id = _ref17.id,
|
|
407
|
+
actionType = _ref17.actionType,
|
|
408
|
+
extensionKey = _ref17.extensionKey,
|
|
409
|
+
display = _ref17.display,
|
|
410
|
+
definitionId = _ref17.definitionId,
|
|
411
|
+
destinationProduct = _ref17.destinationProduct,
|
|
412
|
+
destinationSubproduct = _ref17.destinationSubproduct,
|
|
413
|
+
location = _ref17.location;
|
|
375
414
|
return {
|
|
376
415
|
action: 'clicked',
|
|
377
416
|
actionSubject: 'button',
|
|
@@ -389,13 +428,13 @@ export var uiActionClickedEvent = function uiActionClickedEvent(_ref14) {
|
|
|
389
428
|
})
|
|
390
429
|
};
|
|
391
430
|
};
|
|
392
|
-
export var uiClosedAuthEvent = function uiClosedAuthEvent(
|
|
393
|
-
var display =
|
|
394
|
-
extensionKey =
|
|
395
|
-
definitionId =
|
|
396
|
-
destinationProduct =
|
|
397
|
-
destinationSubproduct =
|
|
398
|
-
location =
|
|
431
|
+
export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
|
|
432
|
+
var display = _ref18.display,
|
|
433
|
+
extensionKey = _ref18.extensionKey,
|
|
434
|
+
definitionId = _ref18.definitionId,
|
|
435
|
+
destinationProduct = _ref18.destinationProduct,
|
|
436
|
+
destinationSubproduct = _ref18.destinationSubproduct,
|
|
437
|
+
location = _ref18.location;
|
|
399
438
|
return {
|
|
400
439
|
action: 'closed',
|
|
401
440
|
actionSubject: 'consentModal',
|
|
@@ -410,12 +449,12 @@ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref15) {
|
|
|
410
449
|
})
|
|
411
450
|
};
|
|
412
451
|
};
|
|
413
|
-
export var screenAuthPopupEvent = function screenAuthPopupEvent(
|
|
414
|
-
var extensionKey =
|
|
415
|
-
definitionId =
|
|
416
|
-
destinationProduct =
|
|
417
|
-
destinationSubproduct =
|
|
418
|
-
location =
|
|
452
|
+
export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
|
|
453
|
+
var extensionKey = _ref19.extensionKey,
|
|
454
|
+
definitionId = _ref19.definitionId,
|
|
455
|
+
destinationProduct = _ref19.destinationProduct,
|
|
456
|
+
destinationSubproduct = _ref19.destinationSubproduct,
|
|
457
|
+
location = _ref19.location;
|
|
419
458
|
return {
|
|
420
459
|
actionSubject: 'consentModal',
|
|
421
460
|
eventType: 'screen',
|
|
@@ -428,14 +467,14 @@ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref16) {
|
|
|
428
467
|
})
|
|
429
468
|
};
|
|
430
469
|
};
|
|
431
|
-
export var uiRenderSuccessEvent = function uiRenderSuccessEvent(
|
|
432
|
-
var display =
|
|
433
|
-
status =
|
|
434
|
-
extensionKey =
|
|
435
|
-
definitionId =
|
|
436
|
-
destinationProduct =
|
|
437
|
-
destinationSubproduct =
|
|
438
|
-
location =
|
|
470
|
+
export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
|
|
471
|
+
var display = _ref20.display,
|
|
472
|
+
status = _ref20.status,
|
|
473
|
+
extensionKey = _ref20.extensionKey,
|
|
474
|
+
definitionId = _ref20.definitionId,
|
|
475
|
+
destinationProduct = _ref20.destinationProduct,
|
|
476
|
+
destinationSubproduct = _ref20.destinationSubproduct,
|
|
477
|
+
location = _ref20.location;
|
|
439
478
|
return {
|
|
440
479
|
action: 'renderSuccess',
|
|
441
480
|
actionSubject: 'smartLink',
|
|
@@ -451,15 +490,15 @@ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref17) {
|
|
|
451
490
|
})
|
|
452
491
|
};
|
|
453
492
|
};
|
|
454
|
-
export var uiRenderFailedEvent = function uiRenderFailedEvent(
|
|
455
|
-
var display =
|
|
456
|
-
error =
|
|
457
|
-
errorInfo =
|
|
458
|
-
extensionKey =
|
|
459
|
-
definitionId =
|
|
460
|
-
destinationProduct =
|
|
461
|
-
destinationSubproduct =
|
|
462
|
-
location =
|
|
493
|
+
export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
|
|
494
|
+
var display = _ref21.display,
|
|
495
|
+
error = _ref21.error,
|
|
496
|
+
errorInfo = _ref21.errorInfo,
|
|
497
|
+
extensionKey = _ref21.extensionKey,
|
|
498
|
+
definitionId = _ref21.definitionId,
|
|
499
|
+
destinationProduct = _ref21.destinationProduct,
|
|
500
|
+
destinationSubproduct = _ref21.destinationSubproduct,
|
|
501
|
+
location = _ref21.location;
|
|
463
502
|
return {
|
|
464
503
|
actionSubject: 'smartLink',
|
|
465
504
|
action: 'renderFailed',
|
|
@@ -476,16 +515,16 @@ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref18) {
|
|
|
476
515
|
})
|
|
477
516
|
};
|
|
478
517
|
};
|
|
479
|
-
export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(
|
|
480
|
-
var id =
|
|
481
|
-
previewDisplay =
|
|
482
|
-
extensionKey =
|
|
483
|
-
definitionId =
|
|
484
|
-
destinationProduct =
|
|
485
|
-
destinationSubproduct =
|
|
486
|
-
location =
|
|
487
|
-
previewInvokeMethod =
|
|
488
|
-
status =
|
|
518
|
+
export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
|
|
519
|
+
var id = _ref22.id,
|
|
520
|
+
previewDisplay = _ref22.previewDisplay,
|
|
521
|
+
extensionKey = _ref22.extensionKey,
|
|
522
|
+
definitionId = _ref22.definitionId,
|
|
523
|
+
destinationProduct = _ref22.destinationProduct,
|
|
524
|
+
destinationSubproduct = _ref22.destinationSubproduct,
|
|
525
|
+
location = _ref22.location,
|
|
526
|
+
previewInvokeMethod = _ref22.previewInvokeMethod,
|
|
527
|
+
status = _ref22.status;
|
|
489
528
|
return {
|
|
490
529
|
action: 'viewed',
|
|
491
530
|
actionSubject: 'hoverCard',
|
|
@@ -503,17 +542,17 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref19) {
|
|
|
503
542
|
})
|
|
504
543
|
};
|
|
505
544
|
};
|
|
506
|
-
export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(
|
|
507
|
-
var id =
|
|
508
|
-
previewDisplay =
|
|
509
|
-
hoverTime =
|
|
510
|
-
extensionKey =
|
|
511
|
-
definitionId =
|
|
512
|
-
destinationProduct =
|
|
513
|
-
destinationSubproduct =
|
|
514
|
-
location =
|
|
515
|
-
previewInvokeMethod =
|
|
516
|
-
status =
|
|
545
|
+
export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23) {
|
|
546
|
+
var id = _ref23.id,
|
|
547
|
+
previewDisplay = _ref23.previewDisplay,
|
|
548
|
+
hoverTime = _ref23.hoverTime,
|
|
549
|
+
extensionKey = _ref23.extensionKey,
|
|
550
|
+
definitionId = _ref23.definitionId,
|
|
551
|
+
destinationProduct = _ref23.destinationProduct,
|
|
552
|
+
destinationSubproduct = _ref23.destinationSubproduct,
|
|
553
|
+
location = _ref23.location,
|
|
554
|
+
previewInvokeMethod = _ref23.previewInvokeMethod,
|
|
555
|
+
status = _ref23.status;
|
|
517
556
|
return {
|
|
518
557
|
action: 'dismissed',
|
|
519
558
|
actionSubject: 'hoverCard',
|
|
@@ -532,15 +571,15 @@ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref20
|
|
|
532
571
|
})
|
|
533
572
|
};
|
|
534
573
|
};
|
|
535
|
-
export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(
|
|
536
|
-
var id =
|
|
537
|
-
previewDisplay =
|
|
538
|
-
extensionKey =
|
|
539
|
-
definitionId =
|
|
540
|
-
destinationProduct =
|
|
541
|
-
destinationSubproduct =
|
|
542
|
-
location =
|
|
543
|
-
previewInvokeMethod =
|
|
574
|
+
export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref24) {
|
|
575
|
+
var id = _ref24.id,
|
|
576
|
+
previewDisplay = _ref24.previewDisplay,
|
|
577
|
+
extensionKey = _ref24.extensionKey,
|
|
578
|
+
definitionId = _ref24.definitionId,
|
|
579
|
+
destinationProduct = _ref24.destinationProduct,
|
|
580
|
+
destinationSubproduct = _ref24.destinationSubproduct,
|
|
581
|
+
location = _ref24.location,
|
|
582
|
+
previewInvokeMethod = _ref24.previewInvokeMethod;
|
|
544
583
|
return {
|
|
545
584
|
action: 'clicked',
|
|
546
585
|
actionSubject: 'button',
|
|
@@ -567,15 +606,15 @@ export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent()
|
|
|
567
606
|
attributes: _objectSpread({}, context)
|
|
568
607
|
};
|
|
569
608
|
};
|
|
570
|
-
export var chunkloadFailedEvent = function chunkloadFailedEvent(
|
|
571
|
-
var display =
|
|
572
|
-
error =
|
|
573
|
-
errorInfo =
|
|
574
|
-
extensionKey =
|
|
575
|
-
definitionId =
|
|
576
|
-
destinationProduct =
|
|
577
|
-
destinationSubproduct =
|
|
578
|
-
location =
|
|
609
|
+
export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref25) {
|
|
610
|
+
var display = _ref25.display,
|
|
611
|
+
error = _ref25.error,
|
|
612
|
+
errorInfo = _ref25.errorInfo,
|
|
613
|
+
extensionKey = _ref25.extensionKey,
|
|
614
|
+
definitionId = _ref25.definitionId,
|
|
615
|
+
destinationProduct = _ref25.destinationProduct,
|
|
616
|
+
destinationSubproduct = _ref25.destinationSubproduct,
|
|
617
|
+
location = _ref25.location;
|
|
579
618
|
return {
|
|
580
619
|
action: 'chunkLoadFailed',
|
|
581
620
|
actionSubject: 'smartLink',
|
|
@@ -591,4 +630,31 @@ export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref22) {
|
|
|
591
630
|
location: location
|
|
592
631
|
})
|
|
593
632
|
};
|
|
633
|
+
};
|
|
634
|
+
export var uiSmartLinkStatusLozengeButtonClicked = function uiSmartLinkStatusLozengeButtonClicked() {
|
|
635
|
+
return {
|
|
636
|
+
action: 'clicked',
|
|
637
|
+
actionSubject: 'button',
|
|
638
|
+
actionSubjectId: 'smartLinkStatusLozenge',
|
|
639
|
+
eventType: 'ui',
|
|
640
|
+
attributes: _objectSpread({}, context)
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
export var uiSmartLinkStatusListItemButtonClicked = function uiSmartLinkStatusListItemButtonClicked() {
|
|
644
|
+
return {
|
|
645
|
+
action: 'clicked',
|
|
646
|
+
actionSubject: 'button',
|
|
647
|
+
actionSubjectId: 'smartLinkStatusListItem',
|
|
648
|
+
eventType: 'ui',
|
|
649
|
+
attributes: _objectSpread({}, context)
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
export var uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatusOpenPreviewButtonClicked() {
|
|
653
|
+
return {
|
|
654
|
+
action: 'clicked',
|
|
655
|
+
actionSubject: 'button',
|
|
656
|
+
actionSubjectId: 'smartLinkStatusOpenPreview',
|
|
657
|
+
eventType: 'ui',
|
|
658
|
+
attributes: _objectSpread({}, context)
|
|
659
|
+
};
|
|
594
660
|
};
|
|
@@ -3,7 +3,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
import { getMeasure } from '../performance';
|
|
5
5
|
import { resolvedEvent, unresolvedEvent } from './analytics';
|
|
6
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiIframeDwelledEvent } from './analytics';
|
|
6
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiIframeDwelledEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';
|
|
7
7
|
export var instrumentEvent = function instrumentEvent(_ref) {
|
|
8
8
|
var id = _ref.id,
|
|
9
9
|
status = _ref.status,
|
package/dist/esm/version.json
CHANGED
|
@@ -61,6 +61,7 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
61
61
|
name: ElementName.ModifiedBy
|
|
62
62
|
}].concat(baseMetadata);
|
|
63
63
|
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
64
|
+
analytics: analytics,
|
|
64
65
|
appearance: "block",
|
|
65
66
|
cardState: cardState,
|
|
66
67
|
onClick: onClick,
|
|
@@ -16,6 +16,7 @@ import extractLozengeActionItems from '../../../../../extractors/action/extract-
|
|
|
16
16
|
import createStatusUpdateRequest from '../../../../../utils/actions/create-status-update-request';
|
|
17
17
|
import useResolve from '../../../../../state/hooks/use-resolve';
|
|
18
18
|
import { LozengeActionErrorMessages } from './lozenge-action-error/types';
|
|
19
|
+
import { useFlexibleUiAnalyticsContext } from '../../../../../state/flexible-ui-context';
|
|
19
20
|
var validateItems = function validateItems() {
|
|
20
21
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
21
22
|
var text = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -61,14 +62,20 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
61
62
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
62
63
|
errorMessage = _useState12[0],
|
|
63
64
|
setErrorMessage = _useState12[1];
|
|
65
|
+
var reload = useResolve();
|
|
66
|
+
//TODO EDM-6583 Replace usage of useFlexibleUiAnalyticsContext with linking platform analytics context from find team.
|
|
67
|
+
var analytics = useFlexibleUiAnalyticsContext();
|
|
68
|
+
var invoke = useInvoke({
|
|
69
|
+
started: analytics === null || analytics === void 0 ? void 0 : analytics.track.smartLinkQuickActionStarted,
|
|
70
|
+
success: analytics === null || analytics === void 0 ? void 0 : analytics.track.smartLinkQuickActionSuccess,
|
|
71
|
+
failed: analytics === null || analytics === void 0 ? void 0 : analytics.track.smartLinkQuickActionFailed
|
|
72
|
+
});
|
|
64
73
|
useEffect(function () {
|
|
65
74
|
setSelected({
|
|
66
75
|
text: text,
|
|
67
76
|
appearance: appearance
|
|
68
77
|
});
|
|
69
78
|
}, [text, appearance]);
|
|
70
|
-
var invoke = useInvoke();
|
|
71
|
-
var reload = useResolve();
|
|
72
79
|
var _ref2 = (action === null || action === void 0 ? void 0 : (_action$update = action.update) === null || _action$update === void 0 ? void 0 : _action$update.details) || {},
|
|
73
80
|
url = _ref2.url,
|
|
74
81
|
linkId = _ref2.id,
|
|
@@ -80,15 +87,20 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
80
87
|
while (1) switch (_context.prev = _context.next) {
|
|
81
88
|
case 0:
|
|
82
89
|
setIsOpen(args.isOpen);
|
|
83
|
-
if (!
|
|
84
|
-
_context.next =
|
|
90
|
+
if (!args.isOpen) {
|
|
91
|
+
_context.next = 22;
|
|
85
92
|
break;
|
|
86
93
|
}
|
|
87
|
-
|
|
94
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.ui.smartLinkLozengeActionClickedEvent();
|
|
95
|
+
if (!(!isLoaded && action !== null && action !== void 0 && action.read)) {
|
|
96
|
+
_context.next = 22;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
_context.prev = 4;
|
|
88
100
|
setIsLoading(true);
|
|
89
|
-
_context.next =
|
|
101
|
+
_context.next = 8;
|
|
90
102
|
return invoke(action.read, extractLozengeActionItems);
|
|
91
|
-
case
|
|
103
|
+
case 8:
|
|
92
104
|
responseItems = _context.sent;
|
|
93
105
|
validItems = typeof text === 'string' ? validateItems(responseItems, text) : responseItems;
|
|
94
106
|
setItems(validItems);
|
|
@@ -97,31 +109,31 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
97
109
|
setErrorMessage(LozengeActionErrorMessages.noData);
|
|
98
110
|
setIsLoaded(false);
|
|
99
111
|
}
|
|
100
|
-
_context.next =
|
|
112
|
+
_context.next = 19;
|
|
101
113
|
break;
|
|
102
|
-
case
|
|
103
|
-
_context.prev =
|
|
104
|
-
_context.t0 = _context["catch"](
|
|
114
|
+
case 15:
|
|
115
|
+
_context.prev = 15;
|
|
116
|
+
_context.t0 = _context["catch"](4);
|
|
105
117
|
setErrorMessage(LozengeActionErrorMessages.unknown);
|
|
106
118
|
setIsLoaded(false);
|
|
107
|
-
case
|
|
108
|
-
_context.prev =
|
|
119
|
+
case 19:
|
|
120
|
+
_context.prev = 19;
|
|
109
121
|
setIsLoading(false);
|
|
110
|
-
return _context.finish(
|
|
111
|
-
case
|
|
122
|
+
return _context.finish(19);
|
|
123
|
+
case 22:
|
|
112
124
|
if (!args.isOpen) {
|
|
113
125
|
setErrorMessage(undefined);
|
|
114
126
|
}
|
|
115
|
-
case
|
|
127
|
+
case 23:
|
|
116
128
|
case "end":
|
|
117
129
|
return _context.stop();
|
|
118
130
|
}
|
|
119
|
-
}, _callee, null, [[
|
|
131
|
+
}, _callee, null, [[4, 15, 19, 22]]);
|
|
120
132
|
}));
|
|
121
133
|
return function (_x) {
|
|
122
134
|
return _ref3.apply(this, arguments);
|
|
123
135
|
};
|
|
124
|
-
}(), [action
|
|
136
|
+
}(), [action.read, analytics, invoke, isLoaded, text]);
|
|
125
137
|
var trigger = useCallback(function (props) {
|
|
126
138
|
return jsx(LozengeActionTrigger, _extends({}, props, {
|
|
127
139
|
appearance: selected.appearance,
|
|
@@ -136,16 +148,17 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
136
148
|
while (1) switch (_context2.prev = _context2.next) {
|
|
137
149
|
case 0:
|
|
138
150
|
_context2.prev = 0;
|
|
151
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.ui.smartLinkLozengeActionListItemClickedEvent();
|
|
139
152
|
updateAction = action === null || action === void 0 ? void 0 : action.update;
|
|
140
153
|
if (!(updateAction && id)) {
|
|
141
|
-
_context2.next =
|
|
154
|
+
_context2.next = 16;
|
|
142
155
|
break;
|
|
143
156
|
}
|
|
144
157
|
setIsLoading(true);
|
|
145
158
|
request = createStatusUpdateRequest(updateAction, id);
|
|
146
|
-
_context2.next =
|
|
159
|
+
_context2.next = 8;
|
|
147
160
|
return invoke(request);
|
|
148
|
-
case
|
|
161
|
+
case 8:
|
|
149
162
|
setSelected({
|
|
150
163
|
appearance: appearance,
|
|
151
164
|
text: text
|
|
@@ -155,16 +168,16 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
155
168
|
setIsOpen(false);
|
|
156
169
|
setItems([]);
|
|
157
170
|
if (!url) {
|
|
158
|
-
_context2.next =
|
|
171
|
+
_context2.next = 16;
|
|
159
172
|
break;
|
|
160
173
|
}
|
|
161
|
-
_context2.next =
|
|
174
|
+
_context2.next = 16;
|
|
162
175
|
return reload(url, true, undefined, linkId);
|
|
163
|
-
case
|
|
164
|
-
_context2.next =
|
|
176
|
+
case 16:
|
|
177
|
+
_context2.next = 22;
|
|
165
178
|
break;
|
|
166
|
-
case
|
|
167
|
-
_context2.prev =
|
|
179
|
+
case 18:
|
|
180
|
+
_context2.prev = 18;
|
|
168
181
|
_context2.t0 = _context2["catch"](0);
|
|
169
182
|
setIsLoading(false);
|
|
170
183
|
if (isInvokeCustomError(_context2.t0)) {
|
|
@@ -172,16 +185,16 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
172
185
|
} else {
|
|
173
186
|
setErrorMessage(LozengeActionErrorMessages.updateFailed);
|
|
174
187
|
}
|
|
175
|
-
case
|
|
188
|
+
case 22:
|
|
176
189
|
case "end":
|
|
177
190
|
return _context2.stop();
|
|
178
191
|
}
|
|
179
|
-
}, _callee2, null, [[0,
|
|
192
|
+
}, _callee2, null, [[0, 18]]);
|
|
180
193
|
}));
|
|
181
194
|
return function (_x2, _x3, _x4) {
|
|
182
195
|
return _ref4.apply(this, arguments);
|
|
183
196
|
};
|
|
184
|
-
}(), [action === null || action === void 0 ? void 0 : action.update, invoke, linkId, reload, url]);
|
|
197
|
+
}(), [action === null || action === void 0 ? void 0 : action.update, analytics === null || analytics === void 0 ? void 0 : analytics.ui, invoke, linkId, reload, url]);
|
|
185
198
|
var dropdownItemGroup = useMemo(function () {
|
|
186
199
|
if (errorMessage) {
|
|
187
200
|
return jsx(LozengeActionError, {
|
|
@@ -131,7 +131,8 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
131
131
|
showServerActions: showServerActions,
|
|
132
132
|
ui: flexibleUiOptions,
|
|
133
133
|
url: url,
|
|
134
|
-
children: {}
|
|
134
|
+
children: {},
|
|
135
|
+
analytics: analytics
|
|
135
136
|
};
|
|
136
137
|
var onClickStopPropagation = useCallback(function (e) {
|
|
137
138
|
return e.stopPropagation();
|