@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
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "30.3.0"
18
+ packageVersion: "30.3.1"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -385,77 +385,15 @@ export var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
385
385
  })
386
386
  };
387
387
  };
388
-
389
- /**
390
- * @deprecated
391
- */
392
- export var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
388
+ export var uiActionClickedEvent = function uiActionClickedEvent(_ref15) {
393
389
  var id = _ref15.id,
390
+ actionType = _ref15.actionType,
391
+ extensionKey = _ref15.extensionKey,
394
392
  display = _ref15.display,
395
- status = _ref15.status,
396
393
  definitionId = _ref15.definitionId,
397
- extensionKey = _ref15.extensionKey,
398
- location = _ref15.location,
399
394
  destinationProduct = _ref15.destinationProduct,
400
395
  destinationSubproduct = _ref15.destinationSubproduct,
401
- dwellTime = _ref15.dwellTime,
402
- dwellPercentVisible = _ref15.dwellPercentVisible;
403
- return {
404
- action: 'dwelled',
405
- actionSubject: 'smartLinkIframe',
406
- eventType: 'ui',
407
- attributes: _objectSpread(_objectSpread({}, context), {}, {
408
- id: id,
409
- status: status,
410
- definitionId: definitionId,
411
- extensionKey: extensionKey,
412
- display: display,
413
- location: location,
414
- destinationProduct: destinationProduct,
415
- destinationSubproduct: destinationSubproduct,
416
- dwellTime: dwellTime,
417
- dwellPercentVisible: dwellPercentVisible
418
- })
419
- };
420
- };
421
-
422
- /**
423
- * @deprecated
424
- */
425
- export var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref16) {
426
- var id = _ref16.id,
427
- display = _ref16.display,
428
- status = _ref16.status,
429
- definitionId = _ref16.definitionId,
430
- extensionKey = _ref16.extensionKey,
431
- location = _ref16.location,
432
- destinationProduct = _ref16.destinationProduct,
433
- destinationSubproduct = _ref16.destinationSubproduct;
434
- return {
435
- action: 'focused',
436
- actionSubject: 'smartLinkIframe',
437
- eventType: 'ui',
438
- attributes: _objectSpread(_objectSpread({}, context), {}, {
439
- id: id,
440
- status: status,
441
- definitionId: definitionId,
442
- extensionKey: extensionKey,
443
- display: display,
444
- location: location,
445
- destinationProduct: destinationProduct,
446
- destinationSubproduct: destinationSubproduct
447
- })
448
- };
449
- };
450
- export var uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
451
- var id = _ref17.id,
452
- actionType = _ref17.actionType,
453
- extensionKey = _ref17.extensionKey,
454
- display = _ref17.display,
455
- definitionId = _ref17.definitionId,
456
- destinationProduct = _ref17.destinationProduct,
457
- destinationSubproduct = _ref17.destinationSubproduct,
458
- location = _ref17.location;
396
+ location = _ref15.location;
459
397
  return {
460
398
  action: 'clicked',
461
399
  actionSubject: 'button',
@@ -473,13 +411,13 @@ export var uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
473
411
  })
474
412
  };
475
413
  };
476
- export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
477
- var display = _ref18.display,
478
- extensionKey = _ref18.extensionKey,
479
- definitionId = _ref18.definitionId,
480
- destinationProduct = _ref18.destinationProduct,
481
- destinationSubproduct = _ref18.destinationSubproduct,
482
- location = _ref18.location;
414
+ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref16) {
415
+ var display = _ref16.display,
416
+ extensionKey = _ref16.extensionKey,
417
+ definitionId = _ref16.definitionId,
418
+ destinationProduct = _ref16.destinationProduct,
419
+ destinationSubproduct = _ref16.destinationSubproduct,
420
+ location = _ref16.location;
483
421
  return {
484
422
  action: 'closed',
485
423
  actionSubject: 'consentModal',
@@ -494,12 +432,12 @@ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
494
432
  })
495
433
  };
496
434
  };
497
- export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
498
- var extensionKey = _ref19.extensionKey,
499
- definitionId = _ref19.definitionId,
500
- destinationProduct = _ref19.destinationProduct,
501
- destinationSubproduct = _ref19.destinationSubproduct,
502
- location = _ref19.location;
435
+ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref17) {
436
+ var extensionKey = _ref17.extensionKey,
437
+ definitionId = _ref17.definitionId,
438
+ destinationProduct = _ref17.destinationProduct,
439
+ destinationSubproduct = _ref17.destinationSubproduct,
440
+ location = _ref17.location;
503
441
  return {
504
442
  actionSubject: 'consentModal',
505
443
  eventType: 'screen',
@@ -512,15 +450,15 @@ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
512
450
  })
513
451
  };
514
452
  };
515
- export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
516
- var display = _ref20.display,
517
- status = _ref20.status,
518
- extensionKey = _ref20.extensionKey,
519
- definitionId = _ref20.definitionId,
520
- destinationProduct = _ref20.destinationProduct,
521
- destinationSubproduct = _ref20.destinationSubproduct,
522
- location = _ref20.location,
523
- canBeDatasource = _ref20.canBeDatasource;
453
+ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref18) {
454
+ var display = _ref18.display,
455
+ status = _ref18.status,
456
+ extensionKey = _ref18.extensionKey,
457
+ definitionId = _ref18.definitionId,
458
+ destinationProduct = _ref18.destinationProduct,
459
+ destinationSubproduct = _ref18.destinationSubproduct,
460
+ location = _ref18.location,
461
+ canBeDatasource = _ref18.canBeDatasource;
524
462
  return {
525
463
  action: 'renderSuccess',
526
464
  actionSubject: 'smartLink',
@@ -537,15 +475,15 @@ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
537
475
  })
538
476
  };
539
477
  };
540
- export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
541
- var display = _ref21.display,
542
- error = _ref21.error,
543
- errorInfo = _ref21.errorInfo,
544
- extensionKey = _ref21.extensionKey,
545
- definitionId = _ref21.definitionId,
546
- destinationProduct = _ref21.destinationProduct,
547
- destinationSubproduct = _ref21.destinationSubproduct,
548
- location = _ref21.location;
478
+ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref19) {
479
+ var display = _ref19.display,
480
+ error = _ref19.error,
481
+ errorInfo = _ref19.errorInfo,
482
+ extensionKey = _ref19.extensionKey,
483
+ definitionId = _ref19.definitionId,
484
+ destinationProduct = _ref19.destinationProduct,
485
+ destinationSubproduct = _ref19.destinationSubproduct,
486
+ location = _ref19.location;
549
487
  return {
550
488
  actionSubject: 'smartLink',
551
489
  action: 'renderFailed',
@@ -562,16 +500,16 @@ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
562
500
  })
563
501
  };
564
502
  };
565
- export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
566
- var id = _ref22.id,
567
- previewDisplay = _ref22.previewDisplay,
568
- extensionKey = _ref22.extensionKey,
569
- definitionId = _ref22.definitionId,
570
- destinationProduct = _ref22.destinationProduct,
571
- destinationSubproduct = _ref22.destinationSubproduct,
572
- location = _ref22.location,
573
- previewInvokeMethod = _ref22.previewInvokeMethod,
574
- status = _ref22.status;
503
+ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref20) {
504
+ var id = _ref20.id,
505
+ previewDisplay = _ref20.previewDisplay,
506
+ extensionKey = _ref20.extensionKey,
507
+ definitionId = _ref20.definitionId,
508
+ destinationProduct = _ref20.destinationProduct,
509
+ destinationSubproduct = _ref20.destinationSubproduct,
510
+ location = _ref20.location,
511
+ previewInvokeMethod = _ref20.previewInvokeMethod,
512
+ status = _ref20.status;
575
513
  return {
576
514
  action: 'viewed',
577
515
  actionSubject: 'hoverCard',
@@ -589,17 +527,17 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
589
527
  })
590
528
  };
591
529
  };
592
- export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23) {
593
- var id = _ref23.id,
594
- previewDisplay = _ref23.previewDisplay,
595
- hoverTime = _ref23.hoverTime,
596
- extensionKey = _ref23.extensionKey,
597
- definitionId = _ref23.definitionId,
598
- destinationProduct = _ref23.destinationProduct,
599
- destinationSubproduct = _ref23.destinationSubproduct,
600
- location = _ref23.location,
601
- previewInvokeMethod = _ref23.previewInvokeMethod,
602
- status = _ref23.status;
530
+ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref21) {
531
+ var id = _ref21.id,
532
+ previewDisplay = _ref21.previewDisplay,
533
+ hoverTime = _ref21.hoverTime,
534
+ extensionKey = _ref21.extensionKey,
535
+ definitionId = _ref21.definitionId,
536
+ destinationProduct = _ref21.destinationProduct,
537
+ destinationSubproduct = _ref21.destinationSubproduct,
538
+ location = _ref21.location,
539
+ previewInvokeMethod = _ref21.previewInvokeMethod,
540
+ status = _ref21.status;
603
541
  return {
604
542
  action: 'dismissed',
605
543
  actionSubject: 'hoverCard',
@@ -618,15 +556,15 @@ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23
618
556
  })
619
557
  };
620
558
  };
621
- export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref24) {
622
- var id = _ref24.id,
623
- previewDisplay = _ref24.previewDisplay,
624
- extensionKey = _ref24.extensionKey,
625
- definitionId = _ref24.definitionId,
626
- destinationProduct = _ref24.destinationProduct,
627
- destinationSubproduct = _ref24.destinationSubproduct,
628
- location = _ref24.location,
629
- previewInvokeMethod = _ref24.previewInvokeMethod;
559
+ export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref22) {
560
+ var id = _ref22.id,
561
+ previewDisplay = _ref22.previewDisplay,
562
+ extensionKey = _ref22.extensionKey,
563
+ definitionId = _ref22.definitionId,
564
+ destinationProduct = _ref22.destinationProduct,
565
+ destinationSubproduct = _ref22.destinationSubproduct,
566
+ location = _ref22.location,
567
+ previewInvokeMethod = _ref22.previewInvokeMethod;
630
568
  return {
631
569
  action: 'clicked',
632
570
  actionSubject: 'button',
@@ -653,15 +591,15 @@ export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent()
653
591
  attributes: _objectSpread({}, context)
654
592
  };
655
593
  };
656
- export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref25) {
657
- var display = _ref25.display,
658
- error = _ref25.error,
659
- errorInfo = _ref25.errorInfo,
660
- extensionKey = _ref25.extensionKey,
661
- definitionId = _ref25.definitionId,
662
- destinationProduct = _ref25.destinationProduct,
663
- destinationSubproduct = _ref25.destinationSubproduct,
664
- location = _ref25.location;
594
+ export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref23) {
595
+ var display = _ref23.display,
596
+ error = _ref23.error,
597
+ errorInfo = _ref23.errorInfo,
598
+ extensionKey = _ref23.extensionKey,
599
+ definitionId = _ref23.definitionId,
600
+ destinationProduct = _ref23.destinationProduct,
601
+ destinationSubproduct = _ref23.destinationSubproduct,
602
+ location = _ref23.location;
665
603
  return {
666
604
  action: 'chunkLoadFailed',
667
605
  actionSubject: 'smartLink',
@@ -705,9 +643,9 @@ export var uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatu
705
643
  attributes: _objectSpread({}, context)
706
644
  };
707
645
  };
708
- export var uiServerActionClicked = function uiServerActionClicked(_ref26) {
646
+ export var uiServerActionClicked = function uiServerActionClicked(_ref24) {
709
647
  var _SmartLinkActionTypeU2;
710
- var smartLinkActionType = _ref26.smartLinkActionType;
648
+ var smartLinkActionType = _ref24.smartLinkActionType;
711
649
  return {
712
650
  action: 'clicked',
713
651
  actionSubject: 'button',
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
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, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } 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, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';
7
7
  export var instrumentEvent = function instrumentEvent(_ref) {
8
8
  var id = _ref.id,
9
9
  status = _ref.status,
@@ -4,7 +4,6 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
- import { fontSize } from '@atlaskit/theme/constants';
8
7
  import { gs } from '../../common/utils';
9
8
  /**
10
9
  * Class name for selecting non-flexible block card header name
@@ -14,8 +13,7 @@ import { gs } from '../../common/utils';
14
13
  */
15
14
  export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
16
15
  var baseStyles = css({
17
- fontSize: "".concat(fontSize(), "px"),
18
- fontWeight: 500,
16
+ 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)",
19
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
20
18
  lineHeight: gs(2.5),
21
19
  // Spec: show max two lines.
@@ -7,7 +7,6 @@ import { css, jsx } from '@emotion/react';
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import DocumentFilledIcon from '@atlaskit/icon/core/migration/file--editor-file';
9
9
  import { N50, N90 } from '@atlaskit/theme/colors';
10
- import { fontSize } from '@atlaskit/theme/constants';
11
10
  import { messages } from '../../../messages';
12
11
  import { gs } from '../../common/utils';
13
12
  import { Frame } from '../components/Frame';
@@ -19,7 +18,7 @@ import { Frame } from '../components/Frame';
19
18
  */
20
19
  export var blockCardResolvingViewClassName = 'block-card-resolving-view';
21
20
  var messageStyles = css({
22
- fontSize: "".concat(fontSize(), "px"),
21
+ 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)",
23
22
  color: "var(--ds-text-subtlest, ".concat(N90, ")"),
24
23
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
24
  marginLeft: gs(0.5)
@@ -1,6 +1,5 @@
1
1
  import React, { useCallback, useEffect, useMemo } from 'react';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
5
4
  import { CardDisplay } from '../../constants';
6
5
  import { useSmartLink } from '../../state';
@@ -150,47 +149,21 @@ function Component(_ref) {
150
149
  }
151
150
  }, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource]);
152
151
  var onIframeDwell = useCallback(function (dwellTime, dwellPercentVisible) {
153
- if (fg('smart-card-migrate-smartlinkiframe-analytics')) {
154
- fireEvent('ui.smartLinkIframe.dwelled', {
155
- id: id,
156
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
157
- display: isFlexibleUi ? 'flexible' : appearance,
158
- dwellPercentVisible: dwellPercentVisible,
159
- dwellTime: dwellTime
160
- });
161
- } else {
162
- analytics.ui.iframeDwelledEvent({
163
- id: id,
164
- display: isFlexibleUi ? 'flexible' : appearance,
165
- status: state.status,
166
- definitionId: definitionId,
167
- extensionKey: extensionKey,
168
- destinationProduct: product,
169
- destinationSubproduct: subproduct,
170
- dwellTime: dwellTime,
171
- dwellPercentVisible: dwellPercentVisible
172
- });
173
- }
174
- }, [id, state.status, analytics.ui, appearance, definitionId, extensionKey, isFlexibleUi, product, subproduct, fireEvent]);
152
+ fireEvent('ui.smartLinkIframe.dwelled', {
153
+ id: id,
154
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
155
+ display: isFlexibleUi ? 'flexible' : appearance,
156
+ dwellPercentVisible: dwellPercentVisible,
157
+ dwellTime: dwellTime
158
+ });
159
+ }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
175
160
  var onIframeFocus = useCallback(function () {
176
- if (fg('smart-card-migrate-smartlinkiframe-analytics')) {
177
- fireEvent('ui.smartLinkIframe.focus', {
178
- id: id,
179
- definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
180
- display: isFlexibleUi ? 'flexible' : appearance
181
- });
182
- } else {
183
- analytics.ui.iframeFocusedEvent({
184
- id: id,
185
- display: isFlexibleUi ? 'flexible' : appearance,
186
- status: state.status,
187
- definitionId: definitionId,
188
- extensionKey: extensionKey,
189
- destinationProduct: product,
190
- destinationSubproduct: subproduct
191
- });
192
- }
193
- }, [id, state.status, analytics.ui, appearance, definitionId, extensionKey, isFlexibleUi, product, subproduct, fireEvent]);
161
+ fireEvent('ui.smartLinkIframe.focus', {
162
+ id: id,
163
+ definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
164
+ display: isFlexibleUi ? 'flexible' : appearance
165
+ });
166
+ }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
194
167
  if (isFlexibleUi) {
195
168
  var cardState = state;
196
169
  if (error) {
@@ -131,8 +131,7 @@ function (_ref10) {
131
131
  }, {
132
132
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
133
133
  color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
134
- fontSize: '12px',
135
- lineHeight: '16px'
134
+ 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)"
136
135
  },
137
136
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
138
137
  ellipsis('none'));
@@ -180,9 +179,7 @@ export var ContentWrapper = styled.div({
180
179
  export var Title = styled.div({
181
180
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
182
181
  color: "var(--ds-text, ".concat(colors.N900, ")"),
183
- fontSize: '16px',
184
- fontWeight: 500,
185
- lineHeight: 20 / 16,
182
+ 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)",
186
183
  maxHeight: "".concat(20 * 4, "px"),
187
184
  overflow: 'hidden'
188
185
  });
@@ -192,9 +189,7 @@ export var Byline = styled.div({
192
189
  marginTop: "var(--ds-space-050, 4px)",
193
190
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
194
191
  color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
195
- fontSize: '12px',
196
- fontWeight: 'normal',
197
- lineHeight: 16 / 12
192
+ 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)"
198
193
  },
199
194
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
200
195
  ellipsis('100%'));
@@ -204,9 +199,7 @@ export var Description = styled.div({
204
199
  marginTop: "calc(".concat("var(--ds-space-100, 8px)", " - 1px)"),
205
200
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
206
201
  color: "var(--ds-text, ".concat(colors.N800, ")"),
207
- fontSize: '12px',
208
- fontWeight: 'normal',
209
- lineHeight: 18 / 12,
202
+ 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)",
210
203
  maxHeight: "".concat(18 * 3, "px"),
211
204
  overflow: 'hidden'
212
205
  });
@@ -8,12 +8,12 @@ import { FormattedMessage } from 'react-intl-next';
8
8
  import Button from '@atlaskit/button';
9
9
  import ErrorIcon from '@atlaskit/icon/core/migration/error';
10
10
  import { R300 } from '@atlaskit/theme/colors';
11
- import { fontSize } from '@atlaskit/theme/constants';
12
11
  import { messages } from '../../../messages';
13
12
  import { Frame } from '../../BlockCard/components/Frame';
14
13
  import { gs } from '../../common/utils';
15
14
  var messageStyles = css({
16
- fontSize: "".concat(fontSize(), "px"),
15
+ 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)",
16
+ fontWeight: "var(--ds-font-weight-regular, 400)",
17
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
18
  marginLeft: gs(0.5),
19
19
  // 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,7 +26,7 @@ var contentStyles = css({
26
26
  maxWidth: gs(50)
27
27
  });
28
28
  var descriptionStyles = css({
29
- fontSize: '1em',
29
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
30
30
  textAlign: 'center'
31
31
  });
32
32
  var imageStyles = css({
@@ -34,9 +34,8 @@ export var titleCss = css({
34
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
35
35
  h3: {
36
36
  flex: '1 1 auto',
37
- fontSize: '16px',
38
- fontWeight: 400,
39
- lineHeight: height,
37
+ 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)",
38
+ fontWeight: "var(--ds-font-weight-regular, 400)",
40
39
  display: '-webkit-box',
41
40
  marginBottom: 0,
42
41
  overflow: 'hidden',
@@ -17,12 +17,7 @@ var buttonStyles = xcss({
17
17
  });
18
18
  var contentStyles = xcss({
19
19
  color: 'color.text',
20
- // Replace with font token once it becomes stable (currently alpha)
21
- // font: 'font.body.small',
22
- fontSize: '12px',
23
- fontStyle: 'normal',
24
- fontWeight: '400',
25
- lineHeight: '20px'
20
+ 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)"
26
21
  });
27
22
  var ActionButton = function ActionButton(_ref) {
28
23
  var content = _ref.content,
@@ -23,10 +23,7 @@ var errorContentStyles = xcss({
23
23
  });
24
24
  var titleStyles = xcss({
25
25
  color: 'color.text.subtle',
26
- fontSize: '12px',
27
- fontStyle: 'normal',
28
- fontWeight: '400',
29
- lineHeight: '16px'
26
+ 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)"
30
27
  });
31
28
  var getIcon = function getIcon(appearance) {
32
29
  switch (appearance) {
@@ -30,7 +30,7 @@ var getThemeStyles = function getThemeStyles(theme) {
30
30
  color: "var(--ds-text-subtlest, #626F86)",
31
31
  textDecoration: 'underline'
32
32
  },
33
- fontSize: '12px'
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)"
34
34
  }
35
35
  });
36
36
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "30.3.0",
13
+ packageVersion: "30.3.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -1,6 +1,6 @@
1
1
  import { type SmartLinkActionType } from '@atlaskit/linking-types';
2
2
  import { type TrackQuickActionFailureReason, type TrackQuickActionType } from '../../utils/analytics/analytics';
3
- import { type ConnectFailedEventProps, type ConnectSucceededEventProps, type InstrumentEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiIframeDwelledEventProps, type UiIframeFocusedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps } from '../../utils/analytics/types';
3
+ import { type ConnectFailedEventProps, type ConnectSucceededEventProps, type InstrumentEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps } from '../../utils/analytics/types';
4
4
  import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
5
5
  /**
6
6
  * This hook provides usage of Smart Link analytics outside of the Card component.
@@ -52,34 +52,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
52
52
  * @returns
53
53
  */
54
54
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
55
- /**
56
- * This fires an event that represents when a user dwells their cursor on a Smart Link's iframe.
57
- * @param id The unique ID for this Smart Link.
58
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
59
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
60
- * @param definitionId The definitionId of the Smart Link resolver invoked.
61
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
62
- * @param location Where the Smart Link is currently rendered.
63
- * @param destinationProduct The product the Smart Link is linked to.
64
- * @param dwellTime Total seconds that the user has dwelled on this iframe
65
- * @param dwellPercentVisible Percentage element was visible at end of dwell
66
- * @returns
67
- * @deprecated
68
- */
69
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
70
- /**
71
- * This fires an event that represents when a user clicks or tabs into a Smart Link's iframe.
72
- * @param id The unique ID for this Smart Link.
73
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
74
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
75
- * @param definitionId The definitionId of the Smart Link resolver invoked.
76
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
77
- * @param location Where the Smart Link is currently rendered.
78
- * @param destinationProduct The product the Smart Link is linked to.
79
- * @returns
80
- * @deprecated
81
- */
82
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
83
55
  /**
84
56
  * This fires an event that represents when a user clicks on a Smart Link action.
85
57
  * Note: This also starts the UFO smart-link-action-invocation experience.
@@ -16,8 +16,6 @@ export declare function useSmartLink(id: string, url: string): {
16
16
  actionSubjectId: string;
17
17
  }) => void;
18
18
  cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
19
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
20
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
21
19
  actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
22
20
  hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
23
21
  closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
@@ -2,7 +2,7 @@ import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import { SmartLinkActionType } from '@atlaskit/linking-types';
3
3
  import { type CardInnerAppearance } from '../../view/Card/types';
4
4
  import { type AnalyticsPayload } from '../types';
5
- import { type CommonEventProps, type ConnectFailedEventProps, type ConnectSucceededEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ResolvedEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiIframeDwelledEventProps, type UiIframeFocusedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps, type UnresolvedEventProps } from './types';
5
+ import { type CommonEventProps, type ConnectFailedEventProps, type ConnectSucceededEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ResolvedEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps, type UnresolvedEventProps } from './types';
6
6
  export declare const ANALYTICS_CHANNEL = "media";
7
7
  export declare const context: {
8
8
  componentName: string;
@@ -62,14 +62,6 @@ export declare const trackHoverCardResolutionStarted: ({ display, ...attributes
62
62
  export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
63
63
  export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
64
64
  export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
65
- /**
66
- * @deprecated
67
- */
68
- export declare const uiIframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => AnalyticsPayload;
69
- /**
70
- * @deprecated
71
- */
72
- export declare const uiIframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => AnalyticsPayload;
73
65
  export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
74
66
  export declare const uiClosedAuthEvent: ({ display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => AnalyticsPayload;
75
67
  export declare const screenAuthPopupEvent: ({ extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => AnalyticsPayload;
@@ -1,4 +1,4 @@
1
1
  import { type AnalyticsPayload } from '../types';
2
2
  import { type InstrumentEventProps } from './types';
3
- 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';
3
+ 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, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
4
4
  export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;