@atlaskit/smart-card 30.3.0 → 30.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +146 -216
  3. package/dist/cjs/utils/analytics/analytics.js +78 -140
  4. package/dist/cjs/utils/analytics/index.js +0 -6
  5. package/dist/cjs/view/BlockCard/components/Name.js +1 -3
  6. package/dist/cjs/view/BlockCard/views/ResolvingView.js +1 -2
  7. package/dist/cjs/view/CardWithUrl/component.js +14 -41
  8. package/dist/cjs/view/EmbedCard/components/styled.js +4 -11
  9. package/dist/cjs/view/EmbedCard/views/ErroredView.js +2 -2
  10. package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -1
  11. package/dist/cjs/view/EmbedModal/components/link-info/styled.js +2 -3
  12. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -6
  13. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -4
  14. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +1 -1
  15. package/dist/cjs/view/LinkUrl/index.js +1 -1
  16. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +1 -69
  17. package/dist/es2019/utils/analytics/analytics.js +1 -63
  18. package/dist/es2019/utils/analytics/index.js +1 -1
  19. package/dist/es2019/view/BlockCard/components/Name.js +1 -3
  20. package/dist/es2019/view/BlockCard/views/ResolvingView.js +1 -2
  21. package/dist/es2019/view/CardWithUrl/component.js +14 -41
  22. package/dist/es2019/view/EmbedCard/components/styled.js +4 -11
  23. package/dist/es2019/view/EmbedCard/views/ErroredView.js +2 -2
  24. package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -1
  25. package/dist/es2019/view/EmbedModal/components/link-info/styled.js +2 -3
  26. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -6
  27. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -4
  28. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -1
  29. package/dist/es2019/view/LinkUrl/index.js +1 -1
  30. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +147 -217
  31. package/dist/esm/utils/analytics/analytics.js +77 -139
  32. package/dist/esm/utils/analytics/index.js +1 -1
  33. package/dist/esm/view/BlockCard/components/Name.js +1 -3
  34. package/dist/esm/view/BlockCard/views/ResolvingView.js +1 -2
  35. package/dist/esm/view/CardWithUrl/component.js +14 -41
  36. package/dist/esm/view/EmbedCard/components/styled.js +4 -11
  37. package/dist/esm/view/EmbedCard/views/ErroredView.js +2 -2
  38. package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -1
  39. package/dist/esm/view/EmbedModal/components/link-info/styled.js +2 -3
  40. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +1 -6
  41. package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -4
  42. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +1 -1
  43. package/dist/esm/view/LinkUrl/index.js +1 -1
  44. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -29
  45. package/dist/types/state/hooks/useSmartLink.d.ts +0 -2
  46. package/dist/types/utils/analytics/analytics.d.ts +1 -9
  47. package/dist/types/utils/analytics/index.d.ts +1 -1
  48. package/dist/types/utils/analytics/types.d.ts +0 -12
  49. package/dist/types/utils/mocks.d.ts +0 -2
  50. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -29
  51. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -2
  52. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -9
  53. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  54. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -12
  55. package/dist/types-ts4.5/utils/mocks.d.ts +0 -2
  56. package/package.json +2 -5
@@ -4,7 +4,7 @@ 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.uiIframeFocusedEvent = exports.uiIframeDwelledEvent = 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;
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
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "30.3.0"
25
+ packageVersion: "30.3.1"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -392,77 +392,15 @@ var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEven
392
392
  })
393
393
  };
394
394
  };
395
-
396
- /**
397
- * @deprecated
398
- */
399
- var uiIframeDwelledEvent = exports.uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
395
+ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref15) {
400
396
  var id = _ref15.id,
397
+ actionType = _ref15.actionType,
398
+ extensionKey = _ref15.extensionKey,
401
399
  display = _ref15.display,
402
- status = _ref15.status,
403
400
  definitionId = _ref15.definitionId,
404
- extensionKey = _ref15.extensionKey,
405
- location = _ref15.location,
406
401
  destinationProduct = _ref15.destinationProduct,
407
402
  destinationSubproduct = _ref15.destinationSubproduct,
408
- dwellTime = _ref15.dwellTime,
409
- dwellPercentVisible = _ref15.dwellPercentVisible;
410
- return {
411
- action: 'dwelled',
412
- actionSubject: 'smartLinkIframe',
413
- eventType: 'ui',
414
- attributes: _objectSpread(_objectSpread({}, context), {}, {
415
- id: id,
416
- status: status,
417
- definitionId: definitionId,
418
- extensionKey: extensionKey,
419
- display: display,
420
- location: location,
421
- destinationProduct: destinationProduct,
422
- destinationSubproduct: destinationSubproduct,
423
- dwellTime: dwellTime,
424
- dwellPercentVisible: dwellPercentVisible
425
- })
426
- };
427
- };
428
-
429
- /**
430
- * @deprecated
431
- */
432
- var uiIframeFocusedEvent = exports.uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref16) {
433
- var id = _ref16.id,
434
- display = _ref16.display,
435
- status = _ref16.status,
436
- definitionId = _ref16.definitionId,
437
- extensionKey = _ref16.extensionKey,
438
- location = _ref16.location,
439
- destinationProduct = _ref16.destinationProduct,
440
- destinationSubproduct = _ref16.destinationSubproduct;
441
- return {
442
- action: 'focused',
443
- actionSubject: 'smartLinkIframe',
444
- eventType: 'ui',
445
- attributes: _objectSpread(_objectSpread({}, context), {}, {
446
- id: id,
447
- status: status,
448
- definitionId: definitionId,
449
- extensionKey: extensionKey,
450
- display: display,
451
- location: location,
452
- destinationProduct: destinationProduct,
453
- destinationSubproduct: destinationSubproduct
454
- })
455
- };
456
- };
457
- var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
458
- var id = _ref17.id,
459
- actionType = _ref17.actionType,
460
- extensionKey = _ref17.extensionKey,
461
- display = _ref17.display,
462
- definitionId = _ref17.definitionId,
463
- destinationProduct = _ref17.destinationProduct,
464
- destinationSubproduct = _ref17.destinationSubproduct,
465
- location = _ref17.location;
403
+ location = _ref15.location;
466
404
  return {
467
405
  action: 'clicked',
468
406
  actionSubject: 'button',
@@ -480,13 +418,13 @@ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClick
480
418
  })
481
419
  };
482
420
  };
483
- var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
484
- var display = _ref18.display,
485
- extensionKey = _ref18.extensionKey,
486
- definitionId = _ref18.definitionId,
487
- destinationProduct = _ref18.destinationProduct,
488
- destinationSubproduct = _ref18.destinationSubproduct,
489
- location = _ref18.location;
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;
490
428
  return {
491
429
  action: 'closed',
492
430
  actionSubject: 'consentModal',
@@ -501,12 +439,12 @@ var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_
501
439
  })
502
440
  };
503
441
  };
504
- var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
505
- var extensionKey = _ref19.extensionKey,
506
- definitionId = _ref19.definitionId,
507
- destinationProduct = _ref19.destinationProduct,
508
- destinationSubproduct = _ref19.destinationSubproduct,
509
- location = _ref19.location;
442
+ var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPopupEvent(_ref17) {
443
+ var extensionKey = _ref17.extensionKey,
444
+ definitionId = _ref17.definitionId,
445
+ destinationProduct = _ref17.destinationProduct,
446
+ destinationSubproduct = _ref17.destinationSubproduct,
447
+ location = _ref17.location;
510
448
  return {
511
449
  actionSubject: 'consentModal',
512
450
  eventType: 'screen',
@@ -519,15 +457,15 @@ var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPop
519
457
  })
520
458
  };
521
459
  };
522
- var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
523
- var display = _ref20.display,
524
- status = _ref20.status,
525
- extensionKey = _ref20.extensionKey,
526
- definitionId = _ref20.definitionId,
527
- destinationProduct = _ref20.destinationProduct,
528
- destinationSubproduct = _ref20.destinationSubproduct,
529
- location = _ref20.location,
530
- canBeDatasource = _ref20.canBeDatasource;
460
+ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref18) {
461
+ var display = _ref18.display,
462
+ status = _ref18.status,
463
+ extensionKey = _ref18.extensionKey,
464
+ definitionId = _ref18.definitionId,
465
+ destinationProduct = _ref18.destinationProduct,
466
+ destinationSubproduct = _ref18.destinationSubproduct,
467
+ location = _ref18.location,
468
+ canBeDatasource = _ref18.canBeDatasource;
531
469
  return {
532
470
  action: 'renderSuccess',
533
471
  actionSubject: 'smartLink',
@@ -544,15 +482,15 @@ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSucce
544
482
  })
545
483
  };
546
484
  };
547
- var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
548
- var display = _ref21.display,
549
- error = _ref21.error,
550
- errorInfo = _ref21.errorInfo,
551
- extensionKey = _ref21.extensionKey,
552
- definitionId = _ref21.definitionId,
553
- destinationProduct = _ref21.destinationProduct,
554
- destinationSubproduct = _ref21.destinationSubproduct,
555
- location = _ref21.location;
485
+ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref19) {
486
+ var display = _ref19.display,
487
+ error = _ref19.error,
488
+ errorInfo = _ref19.errorInfo,
489
+ extensionKey = _ref19.extensionKey,
490
+ definitionId = _ref19.definitionId,
491
+ destinationProduct = _ref19.destinationProduct,
492
+ destinationSubproduct = _ref19.destinationSubproduct,
493
+ location = _ref19.location;
556
494
  return {
557
495
  actionSubject: 'smartLink',
558
496
  action: 'renderFailed',
@@ -569,16 +507,16 @@ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedE
569
507
  })
570
508
  };
571
509
  };
572
- var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
573
- var id = _ref22.id,
574
- previewDisplay = _ref22.previewDisplay,
575
- extensionKey = _ref22.extensionKey,
576
- definitionId = _ref22.definitionId,
577
- destinationProduct = _ref22.destinationProduct,
578
- destinationSubproduct = _ref22.destinationSubproduct,
579
- location = _ref22.location,
580
- previewInvokeMethod = _ref22.previewInvokeMethod,
581
- status = _ref22.status;
510
+ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref20) {
511
+ var id = _ref20.id,
512
+ previewDisplay = _ref20.previewDisplay,
513
+ extensionKey = _ref20.extensionKey,
514
+ definitionId = _ref20.definitionId,
515
+ destinationProduct = _ref20.destinationProduct,
516
+ destinationSubproduct = _ref20.destinationSubproduct,
517
+ location = _ref20.location,
518
+ previewInvokeMethod = _ref20.previewInvokeMethod,
519
+ status = _ref20.status;
582
520
  return {
583
521
  action: 'viewed',
584
522
  actionSubject: 'hoverCard',
@@ -596,17 +534,17 @@ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCa
596
534
  })
597
535
  };
598
536
  };
599
- var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23) {
600
- var id = _ref23.id,
601
- previewDisplay = _ref23.previewDisplay,
602
- hoverTime = _ref23.hoverTime,
603
- extensionKey = _ref23.extensionKey,
604
- definitionId = _ref23.definitionId,
605
- destinationProduct = _ref23.destinationProduct,
606
- destinationSubproduct = _ref23.destinationSubproduct,
607
- location = _ref23.location,
608
- previewInvokeMethod = _ref23.previewInvokeMethod,
609
- status = _ref23.status;
537
+ var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref21) {
538
+ var id = _ref21.id,
539
+ previewDisplay = _ref21.previewDisplay,
540
+ hoverTime = _ref21.hoverTime,
541
+ extensionKey = _ref21.extensionKey,
542
+ definitionId = _ref21.definitionId,
543
+ destinationProduct = _ref21.destinationProduct,
544
+ destinationSubproduct = _ref21.destinationSubproduct,
545
+ location = _ref21.location,
546
+ previewInvokeMethod = _ref21.previewInvokeMethod,
547
+ status = _ref21.status;
610
548
  return {
611
549
  action: 'dismissed',
612
550
  actionSubject: 'hoverCard',
@@ -625,15 +563,15 @@ var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiH
625
563
  })
626
564
  };
627
565
  };
628
- var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref24) {
629
- var id = _ref24.id,
630
- previewDisplay = _ref24.previewDisplay,
631
- extensionKey = _ref24.extensionKey,
632
- definitionId = _ref24.definitionId,
633
- destinationProduct = _ref24.destinationProduct,
634
- destinationSubproduct = _ref24.destinationSubproduct,
635
- location = _ref24.location,
636
- previewInvokeMethod = _ref24.previewInvokeMethod;
566
+ var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref22) {
567
+ var id = _ref22.id,
568
+ previewDisplay = _ref22.previewDisplay,
569
+ extensionKey = _ref22.extensionKey,
570
+ definitionId = _ref22.definitionId,
571
+ destinationProduct = _ref22.destinationProduct,
572
+ destinationSubproduct = _ref22.destinationSubproduct,
573
+ location = _ref22.location,
574
+ previewInvokeMethod = _ref22.previewInvokeMethod;
637
575
  return {
638
576
  action: 'clicked',
639
577
  actionSubject: 'button',
@@ -660,15 +598,15 @@ var uiLearnMoreLinkClickedEvent = exports.uiLearnMoreLinkClickedEvent = function
660
598
  attributes: _objectSpread({}, context)
661
599
  };
662
600
  };
663
- var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(_ref25) {
664
- var display = _ref25.display,
665
- error = _ref25.error,
666
- errorInfo = _ref25.errorInfo,
667
- extensionKey = _ref25.extensionKey,
668
- definitionId = _ref25.definitionId,
669
- destinationProduct = _ref25.destinationProduct,
670
- destinationSubproduct = _ref25.destinationSubproduct,
671
- location = _ref25.location;
601
+ var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(_ref23) {
602
+ var display = _ref23.display,
603
+ error = _ref23.error,
604
+ errorInfo = _ref23.errorInfo,
605
+ extensionKey = _ref23.extensionKey,
606
+ definitionId = _ref23.definitionId,
607
+ destinationProduct = _ref23.destinationProduct,
608
+ destinationSubproduct = _ref23.destinationSubproduct,
609
+ location = _ref23.location;
672
610
  return {
673
611
  action: 'chunkLoadFailed',
674
612
  actionSubject: 'smartLink',
@@ -712,9 +650,9 @@ var uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusOpenPre
712
650
  attributes: _objectSpread({}, context)
713
651
  };
714
652
  };
715
- var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref26) {
653
+ var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref24) {
716
654
  var _SmartLinkActionTypeU2;
717
- var smartLinkActionType = _ref26.smartLinkActionType;
655
+ var smartLinkActionType = _ref24.smartLinkActionType;
718
656
  return {
719
657
  action: 'clicked',
720
658
  actionSubject: 'button',
@@ -125,12 +125,6 @@ Object.defineProperty(exports, "uiHoverCardViewedEvent", {
125
125
  return _analytics.uiHoverCardViewedEvent;
126
126
  }
127
127
  });
128
- Object.defineProperty(exports, "uiIframeDwelledEvent", {
129
- enumerable: true,
130
- get: function get() {
131
- return _analytics.uiIframeDwelledEvent;
132
- }
133
- });
134
128
  Object.defineProperty(exports, "uiLearnMoreLinkClickedEvent", {
135
129
  enumerable: true,
136
130
  get: function get() {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.blockCardContentHeaderNameClassName = exports.Name = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _constants = require("@atlaskit/theme/constants");
9
8
  var _utils = require("../../common/utils");
10
9
  /**
11
10
  * @jsxRuntime classic
@@ -21,8 +20,7 @@ var _utils = require("../../common/utils");
21
20
  */
22
21
  var blockCardContentHeaderNameClassName = exports.blockCardContentHeaderNameClassName = 'block-card-content-header-name';
23
22
  var baseStyles = (0, _react.css)({
24
- fontSize: "".concat((0, _constants.fontSize)(), "px"),
25
- fontWeight: 500,
23
+ font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
26
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
25
  lineHeight: (0, _utils.gs)(2.5),
28
26
  // Spec: show max two lines.
@@ -9,7 +9,6 @@ var _react = require("@emotion/react");
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _fileEditorFile = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--editor-file"));
11
11
  var _colors = require("@atlaskit/theme/colors");
12
- var _constants = require("@atlaskit/theme/constants");
13
12
  var _messages = require("../../../messages");
14
13
  var _utils = require("../../common/utils");
15
14
  var _Frame = require("../components/Frame");
@@ -27,7 +26,7 @@ var _Frame = require("../components/Frame");
27
26
  */
28
27
  var blockCardResolvingViewClassName = exports.blockCardResolvingViewClassName = 'block-card-resolving-view';
29
28
  var messageStyles = (0, _react.css)({
30
- fontSize: "".concat((0, _constants.fontSize)(), "px"),
29
+ font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
31
30
  color: "var(--ds-text-subtlest, ".concat(_colors.N90, ")"),
32
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
33
32
  marginLeft: (0, _utils.gs)(0.5)
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.CardWithUrlContent = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
13
12
  var _constants = require("../../constants");
14
13
  var _state = require("../../state");
@@ -160,47 +159,21 @@ function Component(_ref) {
160
159
  }
161
160
  }, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource]);
162
161
  var onIframeDwell = (0, _react.useCallback)(function (dwellTime, dwellPercentVisible) {
163
- if ((0, _platformFeatureFlags.fg)('smart-card-migrate-smartlinkiframe-analytics')) {
164
- fireEvent('ui.smartLinkIframe.dwelled', {
165
- id: id,
166
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
167
- display: isFlexibleUi ? 'flexible' : appearance,
168
- dwellPercentVisible: dwellPercentVisible,
169
- dwellTime: dwellTime
170
- });
171
- } else {
172
- analytics.ui.iframeDwelledEvent({
173
- id: id,
174
- display: isFlexibleUi ? 'flexible' : appearance,
175
- status: state.status,
176
- definitionId: definitionId,
177
- extensionKey: extensionKey,
178
- destinationProduct: product,
179
- destinationSubproduct: subproduct,
180
- dwellTime: dwellTime,
181
- dwellPercentVisible: dwellPercentVisible
182
- });
183
- }
184
- }, [id, state.status, analytics.ui, appearance, definitionId, extensionKey, isFlexibleUi, product, subproduct, fireEvent]);
162
+ fireEvent('ui.smartLinkIframe.dwelled', {
163
+ id: id,
164
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
165
+ display: isFlexibleUi ? 'flexible' : appearance,
166
+ dwellPercentVisible: dwellPercentVisible,
167
+ dwellTime: dwellTime
168
+ });
169
+ }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
185
170
  var onIframeFocus = (0, _react.useCallback)(function () {
186
- if ((0, _platformFeatureFlags.fg)('smart-card-migrate-smartlinkiframe-analytics')) {
187
- fireEvent('ui.smartLinkIframe.focus', {
188
- id: id,
189
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
190
- display: isFlexibleUi ? 'flexible' : appearance
191
- });
192
- } else {
193
- analytics.ui.iframeFocusedEvent({
194
- id: id,
195
- display: isFlexibleUi ? 'flexible' : appearance,
196
- status: state.status,
197
- definitionId: definitionId,
198
- extensionKey: extensionKey,
199
- destinationProduct: product,
200
- destinationSubproduct: subproduct
201
- });
202
- }
203
- }, [id, state.status, analytics.ui, appearance, definitionId, extensionKey, isFlexibleUi, product, subproduct, fireEvent]);
171
+ fireEvent('ui.smartLinkIframe.focus', {
172
+ id: id,
173
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
174
+ display: isFlexibleUi ? 'flexible' : appearance
175
+ });
176
+ }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
204
177
  if (isFlexibleUi) {
205
178
  var cardState = state;
206
179
  if (error) {
@@ -140,8 +140,7 @@ function (_ref10) {
140
140
  }, {
141
141
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
142
142
  color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
143
- fontSize: '12px',
144
- lineHeight: '16px'
143
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
145
144
  },
146
145
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
147
146
  ellipsis('none'));
@@ -189,9 +188,7 @@ var ContentWrapper = exports.ContentWrapper = _styled.default.div({
189
188
  var Title = exports.Title = _styled.default.div({
190
189
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
191
190
  color: "var(--ds-text, ".concat(colors.N900, ")"),
192
- fontSize: '16px',
193
- fontWeight: 500,
194
- lineHeight: 20 / 16,
191
+ font: "var(--ds-font-heading-small, normal 600 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
195
192
  maxHeight: "".concat(20 * 4, "px"),
196
193
  overflow: 'hidden'
197
194
  });
@@ -201,9 +198,7 @@ var Byline = exports.Byline = _styled.default.div({
201
198
  marginTop: "var(--ds-space-050, 4px)",
202
199
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
203
200
  color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
204
- fontSize: '12px',
205
- fontWeight: 'normal',
206
- lineHeight: 16 / 12
201
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
207
202
  },
208
203
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
209
204
  ellipsis('100%'));
@@ -213,9 +208,7 @@ var Description = exports.Description = _styled.default.div({
213
208
  marginTop: "calc(".concat("var(--ds-space-100, 8px)", " - 1px)"),
214
209
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
215
210
  color: "var(--ds-text, ".concat(colors.N800, ")"),
216
- fontSize: '12px',
217
- fontWeight: 'normal',
218
- lineHeight: 18 / 12,
211
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
219
212
  maxHeight: "".concat(18 * 3, "px"),
220
213
  overflow: 'hidden'
221
214
  });
@@ -10,7 +10,6 @@ var _reactIntlNext = require("react-intl-next");
10
10
  var _button = _interopRequireDefault(require("@atlaskit/button"));
11
11
  var _error = _interopRequireDefault(require("@atlaskit/icon/core/migration/error"));
12
12
  var _colors = require("@atlaskit/theme/colors");
13
- var _constants = require("@atlaskit/theme/constants");
14
13
  var _messages = require("../../../messages");
15
14
  var _Frame = require("../../BlockCard/components/Frame");
16
15
  var _utils = require("../../common/utils");
@@ -21,7 +20,8 @@ var _utils = require("../../common/utils");
21
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
21
 
23
22
  var messageStyles = (0, _react.css)({
24
- fontSize: "".concat((0, _constants.fontSize)(), "px"),
23
+ font: "var(--ds-font-heading-xsmall, normal 600 14px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
24
+ fontWeight: "var(--ds-font-weight-regular, 400)",
25
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
26
  marginLeft: (0, _utils.gs)(0.5),
27
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -37,7 +37,7 @@ var contentStyles = (0, _react2.css)({
37
37
  maxWidth: (0, _utils.gs)(50)
38
38
  });
39
39
  var descriptionStyles = (0, _react2.css)({
40
- fontSize: '1em',
40
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
41
41
  textAlign: 'center'
42
42
  });
43
43
  var imageStyles = (0, _react2.css)({
@@ -41,9 +41,8 @@ var titleCss = exports.titleCss = (0, _react.css)({
41
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
42
42
  h3: {
43
43
  flex: '1 1 auto',
44
- fontSize: '16px',
45
- fontWeight: 400,
46
- lineHeight: height,
44
+ font: "var(--ds-font-heading-small, normal 600 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
45
+ fontWeight: "var(--ds-font-weight-regular, 400)",
47
46
  display: '-webkit-box',
48
47
  marginBottom: 0,
49
48
  overflow: 'hidden',
@@ -27,12 +27,7 @@ var buttonStyles = (0, _primitives.xcss)({
27
27
  });
28
28
  var contentStyles = (0, _primitives.xcss)({
29
29
  color: 'color.text',
30
- // Replace with font token once it becomes stable (currently alpha)
31
- // font: 'font.body.small',
32
- fontSize: '12px',
33
- fontStyle: 'normal',
34
- fontWeight: '400',
35
- lineHeight: '20px'
30
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
36
31
  });
37
32
  var ActionButton = function ActionButton(_ref) {
38
33
  var content = _ref.content,
@@ -30,10 +30,7 @@ var errorContentStyles = (0, _primitives.xcss)({
30
30
  });
31
31
  var titleStyles = (0, _primitives.xcss)({
32
32
  color: 'color.text.subtle',
33
- fontSize: '12px',
34
- fontStyle: 'normal',
35
- fontWeight: '400',
36
- lineHeight: '16px'
33
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
37
34
  });
38
35
  var getIcon = function getIcon(appearance) {
39
36
  switch (appearance) {
@@ -41,7 +41,7 @@ var getThemeStyles = function getThemeStyles(theme) {
41
41
  color: "var(--ds-text-subtlest, #626F86)",
42
42
  textDecoration: 'underline'
43
43
  },
44
- fontSize: '12px'
44
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
45
45
  }
46
46
  });
47
47
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "30.3.0",
20
+ packageVersion: "30.3.1",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
2
2
  import { useSmartLinkContext } from '@atlaskit/link-provider';
3
3
  import { getUrl } from '@atlaskit/linking-common';
4
4
  import { chunkloadFailedEvent, connectFailedEvent, connectSucceededEvent, context, instrumentEvent, invokeFailedEvent, invokeSucceededEvent, screenAuthPopupEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from '../../utils/analytics';
5
- import { trackHoverCardResolutionStarted, trackSmartLinkQuickActionFailed, trackSmartLinkQuickActionStarted, trackSmartLinkQuickActionSuccess, uiIframeDwelledEvent, uiIframeFocusedEvent, uiServerActionClicked } from '../../utils/analytics/analytics';
5
+ import { trackHoverCardResolutionStarted, trackSmartLinkQuickActionFailed, trackSmartLinkQuickActionStarted, trackSmartLinkQuickActionSuccess, uiServerActionClicked } from '../../utils/analytics/analytics';
6
6
  import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getStatusDetails, getSubproduct } from '../helpers';
7
7
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
8
8
  import { useDispatchAnalytics } from './useDispatchAnalytics';
@@ -157,74 +157,6 @@ export const useSmartLinkAnalytics = (url, id, defaultLocation) => {
157
157
  destinationSubproduct,
158
158
  actionSubjectId
159
159
  }), commonAttributes)),
160
- /**
161
- * This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
162
- * @param id The unique ID for this Smart Link.
163
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
164
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
165
- * @param definitionId The definitionId of the Smart Link resolver invoked.
166
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
167
- * @param location Where the Smart Link is currently rendered.
168
- * @param destinationProduct The product the Smart Link is linked to.
169
- * @param dwellTime Total seconds that the user has dwelled on this iframe
170
- * @param dwellPercentVisible Percentage element was visible at end of dwell
171
- * @returns
172
- * @deprecated
173
- */
174
- iframeDwelledEvent: ({
175
- id,
176
- display,
177
- status,
178
- definitionId,
179
- extensionKey,
180
- location,
181
- destinationProduct,
182
- destinationSubproduct,
183
- dwellTime,
184
- dwellPercentVisible
185
- }) => dispatchAnalytics(applyCommonAttributes(uiIframeDwelledEvent({
186
- id,
187
- display,
188
- status,
189
- definitionId,
190
- extensionKey,
191
- location,
192
- destinationProduct,
193
- destinationSubproduct,
194
- dwellTime,
195
- dwellPercentVisible
196
- }), commonAttributes)),
197
- /**
198
- * This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
199
- * @param id The unique ID for this Smart Link.
200
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
201
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
202
- * @param definitionId The definitionId of the Smart Link resolver invoked.
203
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
204
- * @param location Where the Smart Link is currently rendered.
205
- * @param destinationProduct The product the Smart Link is linked to.
206
- * @returns
207
- * @deprecated
208
- */
209
- iframeFocusedEvent: ({
210
- id,
211
- display,
212
- status,
213
- definitionId,
214
- extensionKey,
215
- location,
216
- destinationProduct,
217
- destinationSubproduct
218
- }) => dispatchAnalytics(applyCommonAttributes(uiIframeFocusedEvent({
219
- id,
220
- display,
221
- status,
222
- definitionId,
223
- extensionKey,
224
- location,
225
- destinationProduct,
226
- destinationSubproduct
227
- }), commonAttributes)),
228
160
  /**
229
161
  * This fires an event that represents when a user clicks on a Smart Link action.
230
162
  * Note: This also starts the UFO smart-link-action-invocation experience.