@atlaskit/smart-card 33.1.0 → 33.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +1 -20
  3. package/dist/cjs/extractors/flexible/actions/extract-download-action.js +1 -23
  4. package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +1 -34
  5. package/dist/cjs/extractors/flexible/actions/index.js +2 -15
  6. package/dist/cjs/extractors/flexible/extract-state.js +1 -5
  7. package/dist/cjs/extractors/flexible/index.js +3 -7
  8. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +18 -190
  9. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +21 -44
  10. package/dist/cjs/state/hooks-external/useSmartLinkActions.js +4 -18
  11. package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
  12. package/dist/cjs/utils/analytics/analytics.js +1 -1
  13. package/dist/cjs/view/CardWithUrl/component.js +12 -25
  14. package/dist/cjs/view/CardWithUrl/loader.js +10 -22
  15. package/dist/cjs/view/EmbedModal/components/analytics/index.js +40 -89
  16. package/dist/cjs/view/EmbedModal/index.js +8 -65
  17. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
  18. package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +4 -40
  19. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
  20. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  21. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -26
  22. package/dist/cjs/view/FlexibleCard/components/utils.js +1 -28
  23. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +13 -30
  24. package/dist/cjs/view/HoverCard/index.js +10 -22
  25. package/dist/cjs/view/LinkUrl/index.js +1 -1
  26. package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +0 -19
  27. package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -21
  28. package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -34
  29. package/dist/es2019/extractors/flexible/actions/index.js +4 -23
  30. package/dist/es2019/extractors/flexible/extract-state.js +1 -5
  31. package/dist/es2019/extractors/flexible/index.js +3 -4
  32. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -172
  33. package/dist/es2019/state/hooks/use-invoke-client-action/index.js +21 -44
  34. package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -18
  35. package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +3 -40
  36. package/dist/es2019/utils/analytics/analytics.js +1 -1
  37. package/dist/es2019/view/CardWithUrl/component.js +13 -26
  38. package/dist/es2019/view/CardWithUrl/loader.js +11 -23
  39. package/dist/es2019/view/EmbedModal/components/analytics/index.js +39 -88
  40. package/dist/es2019/view/EmbedModal/index.js +10 -33
  41. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +11 -32
  42. package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +4 -22
  43. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +4 -27
  44. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  45. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -24
  46. package/dist/es2019/view/FlexibleCard/components/utils.js +0 -25
  47. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -25
  48. package/dist/es2019/view/HoverCard/index.js +11 -23
  49. package/dist/es2019/view/LinkUrl/index.js +1 -1
  50. package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +0 -19
  51. package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -23
  52. package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -34
  53. package/dist/esm/extractors/flexible/actions/index.js +4 -17
  54. package/dist/esm/extractors/flexible/extract-state.js +1 -5
  55. package/dist/esm/extractors/flexible/index.js +3 -4
  56. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +19 -191
  57. package/dist/esm/state/hooks/use-invoke-client-action/index.js +21 -44
  58. package/dist/esm/state/hooks-external/useSmartLinkActions.js +4 -18
  59. package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
  60. package/dist/esm/utils/analytics/analytics.js +1 -1
  61. package/dist/esm/view/CardWithUrl/component.js +13 -26
  62. package/dist/esm/view/CardWithUrl/loader.js +10 -22
  63. package/dist/esm/view/EmbedModal/components/analytics/index.js +40 -89
  64. package/dist/esm/view/EmbedModal/index.js +10 -67
  65. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
  66. package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +4 -40
  67. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
  68. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  69. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -26
  70. package/dist/esm/view/FlexibleCard/components/utils.js +0 -27
  71. package/dist/esm/view/HoverCard/components/views/resolved/index.js +13 -30
  72. package/dist/esm/view/HoverCard/index.js +10 -22
  73. package/dist/esm/view/LinkUrl/index.js +1 -1
  74. package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
  75. package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +0 -7
  76. package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
  77. package/dist/types/extractors/flexible/actions/index.d.ts +0 -6
  78. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
  79. package/dist/types/state/flexible-ui-context/types.d.ts +4 -19
  80. package/dist/types/state/hooks/use-invoke/types.d.ts +0 -6
  81. package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +1 -1
  82. package/dist/types/state/hooks/useSmartLink.d.ts +1 -16
  83. package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
  84. package/dist/types/utils/mocks.d.ts +1 -16
  85. package/dist/types/view/EmbedModal/index.d.ts +0 -2
  86. package/dist/types/view/EmbedModal/types.d.ts +0 -3
  87. package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
  88. package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
  89. package/dist/types/view/FlexibleCard/components/utils.d.ts +0 -6
  90. package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  91. package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  92. package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
  93. package/dist/types-ts4.5/extractors/flexible/actions/extract-download-action.d.ts +0 -7
  94. package/dist/types-ts4.5/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
  95. package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +0 -6
  96. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
  97. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -19
  98. package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +0 -6
  99. package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +1 -1
  100. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +1 -16
  101. package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
  102. package/dist/types-ts4.5/utils/mocks.d.ts +1 -16
  103. package/dist/types-ts4.5/view/EmbedModal/index.d.ts +0 -2
  104. package/dist/types-ts4.5/view/EmbedModal/types.d.ts +0 -3
  105. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
  106. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
  107. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +0 -6
  108. package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  109. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  110. package/package.json +1 -4
  111. package/dist/cjs/extractors/action/extractDownloadActionProps.js +0 -32
  112. package/dist/cjs/extractors/action/extractPreviewActionProps.js +0 -47
  113. package/dist/cjs/extractors/action/extractViewActionProps.js +0 -31
  114. package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -27
  115. package/dist/es2019/extractors/action/extractDownloadActionProps.js +0 -24
  116. package/dist/es2019/extractors/action/extractPreviewActionProps.js +0 -36
  117. package/dist/es2019/extractors/action/extractViewActionProps.js +0 -23
  118. package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -20
  119. package/dist/esm/extractors/action/extractDownloadActionProps.js +0 -27
  120. package/dist/esm/extractors/action/extractPreviewActionProps.js +0 -41
  121. package/dist/esm/extractors/action/extractViewActionProps.js +0 -26
  122. package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -22
  123. package/dist/types/extractors/action/extractDownloadActionProps.d.ts +0 -7
  124. package/dist/types/extractors/action/extractPreviewActionProps.d.ts +0 -7
  125. package/dist/types/extractors/action/extractViewActionProps.d.ts +0 -7
  126. package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +0 -7
  127. package/dist/types/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
  128. package/dist/types-ts4.5/extractors/action/extractDownloadActionProps.d.ts +0 -7
  129. package/dist/types-ts4.5/extractors/action/extractPreviewActionProps.d.ts +0 -7
  130. package/dist/types-ts4.5/extractors/action/extractViewActionProps.d.ts +0 -7
  131. package/dist/types-ts4.5/extractors/flexible/actions/extract-view-action.d.ts +0 -7
  132. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  import React, { useCallback, useState } from 'react';
11
11
  import { FormattedMessage } from 'react-intl-next';
12
12
  import LinkIcon from '@atlaskit/icon/core/migration/link';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { ActionName } from '../../../../../constants';
15
14
  import { messages } from '../../../../../messages';
16
15
  import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
@@ -31,69 +30,33 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
31
30
  tooltipMessage = _useState2[0],
32
31
  setTooltipMessage = _useState2[1];
33
32
  var onClick = useCallback(function () {
34
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
35
- if (data !== null && data !== void 0 && data.invokeAction) {
36
- invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
37
- actionFn: function () {
38
- var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
39
- var _data$invokeAction;
40
- return _regeneratorRuntime.wrap(function _callee$(_context) {
41
- while (1) switch (_context.prev = _context.next) {
42
- case 0:
43
- _context.next = 2;
44
- return (_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.actionFn();
45
- case 2:
46
- setTooltipMessage(messages.copied_url_to_clipboard);
47
- case 3:
48
- case "end":
49
- return _context.stop();
50
- }
51
- }, _callee);
52
- }));
53
- function actionFn() {
54
- return _actionFn.apply(this, arguments);
55
- }
56
- return actionFn;
57
- }()
58
- }));
59
- onClickCallback === null || onClickCallback === void 0 || onClickCallback();
60
- }
61
- } else {
62
- if (data && data.url) {
63
- invoke({
64
- actionType: ActionName.CopyLinkAction,
65
- actionFn: function () {
66
- var _actionFn2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
67
- var _data$url;
68
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
69
- while (1) switch (_context2.prev = _context2.next) {
70
- case 0:
71
- _context2.next = 2;
72
- return navigator.clipboard.writeText((_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : '');
73
- case 2:
74
- setTooltipMessage(messages.copied_url_to_clipboard);
75
- case 3:
76
- case "end":
77
- return _context2.stop();
78
- }
79
- }, _callee2);
80
- }));
81
- function actionFn() {
82
- return _actionFn2.apply(this, arguments);
83
- }
84
- return actionFn;
85
- }(),
86
- // These values have already been set in analytics context.
87
- // We only pass these here for ufo experience.
88
- display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
89
- extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
90
- });
91
- }
92
- if (onClickCallback) {
93
- onClickCallback();
94
- }
33
+ if (data !== null && data !== void 0 && data.invokeAction) {
34
+ invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
35
+ actionFn: function () {
36
+ var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
37
+ var _data$invokeAction;
38
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
39
+ while (1) switch (_context.prev = _context.next) {
40
+ case 0:
41
+ _context.next = 2;
42
+ return (_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.actionFn();
43
+ case 2:
44
+ setTooltipMessage(messages.copied_url_to_clipboard);
45
+ case 3:
46
+ case "end":
47
+ return _context.stop();
48
+ }
49
+ }, _callee);
50
+ }));
51
+ function actionFn() {
52
+ return _actionFn.apply(this, arguments);
53
+ }
54
+ return actionFn;
55
+ }()
56
+ }));
57
+ onClickCallback === null || onClickCallback === void 0 || onClickCallback();
95
58
  }
96
- }, [analytics, data, invoke, onClickCallback]);
59
+ }, [data, invoke, onClickCallback]);
97
60
  return data ? /*#__PURE__*/React.createElement(Action, _extends({
98
61
  content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
99
62
  icon: /*#__PURE__*/React.createElement(LinkIcon, {
@@ -1,17 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
3
  var _excluded = ["onClick"];
5
- import _regeneratorRuntime from "@babel/runtime/regenerator";
6
4
  import React, { useCallback } from 'react';
7
5
  import { FormattedMessage } from 'react-intl-next';
8
6
  import DownloadIcon from '@atlaskit/icon/core/migration/download';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
7
  import { ActionName } from '../../../../../constants';
11
8
  import { messages } from '../../../../../messages';
12
9
  import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
13
10
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
14
- import { downloadUrl as download } from '../../../../../utils';
15
11
  import Action from '../action';
16
12
  var DownloadAction = function DownloadAction(_ref) {
17
13
  var _context$actions;
@@ -24,43 +20,11 @@ var DownloadAction = function DownloadAction(_ref) {
24
20
  });
25
21
  var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.DownloadAction];
26
22
  var onClick = useCallback(function () {
27
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
28
- if (data !== null && data !== void 0 && data.invokeAction) {
29
- invoke(data.invokeAction);
30
- onClickCallback === null || onClickCallback === void 0 || onClickCallback();
31
- }
32
- } else {
33
- if (data !== null && data !== void 0 && data.downloadUrl) {
34
- invoke({
35
- actionType: ActionName.DownloadAction,
36
- actionFn: function () {
37
- var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
38
- return _regeneratorRuntime.wrap(function _callee$(_context) {
39
- while (1) switch (_context.prev = _context.next) {
40
- case 0:
41
- return _context.abrupt("return", download(data === null || data === void 0 ? void 0 : data.downloadUrl));
42
- case 1:
43
- case "end":
44
- return _context.stop();
45
- }
46
- }, _callee);
47
- }));
48
- function actionFn() {
49
- return _actionFn.apply(this, arguments);
50
- }
51
- return actionFn;
52
- }(),
53
- // These values have already been set in analytics context.
54
- // We only pass these here for ufo experience.
55
- display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
56
- extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
57
- });
58
- if (onClickCallback) {
59
- onClickCallback();
60
- }
61
- }
23
+ if (data !== null && data !== void 0 && data.invokeAction) {
24
+ invoke(data.invokeAction);
25
+ onClickCallback === null || onClickCallback === void 0 || onClickCallback();
62
26
  }
63
- }, [analytics, data, invoke, onClickCallback]);
27
+ }, [data, invoke, onClickCallback]);
64
28
  var isStackItem = props.as === 'stack-item';
65
29
  var label = isStackItem ? messages.download_file : messages.download;
66
30
  var tooltipMessage = isStackItem ? messages.download_description : messages.download;
@@ -1,20 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
3
  var _excluded = ["onClick"];
6
- import _regeneratorRuntime from "@babel/runtime/regenerator";
7
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
- 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; }
9
4
  import React, { useCallback } from 'react';
10
5
  import { FormattedMessage } from 'react-intl-next';
11
6
  import MediaServicesActualSizeIcon from '@atlaskit/icon/core/migration/grow-diagonal--media-services-actual-size';
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
7
  import { ActionName } from '../../../../../constants';
14
8
  import { messages } from '../../../../../messages';
15
9
  import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
16
10
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
17
- import { openEmbedModalWithFlexibleUiIcon } from '../../utils';
18
11
  import Action from '../action';
19
12
  var PreviewAction = function PreviewAction(_ref) {
20
13
  var _context$actions;
@@ -27,47 +20,11 @@ var PreviewAction = function PreviewAction(_ref) {
27
20
  });
28
21
  var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
29
22
  var onClick = useCallback(function () {
30
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
31
- if (data !== null && data !== void 0 && data.invokeAction) {
32
- invoke(data.invokeAction);
33
- onClickCallback === null || onClickCallback === void 0 || onClickCallback();
34
- }
35
- } else {
36
- if (data) {
37
- invoke({
38
- actionType: ActionName.PreviewAction,
39
- actionFn: function () {
40
- var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
41
- return _regeneratorRuntime.wrap(function _callee$(_context) {
42
- while (1) switch (_context.prev = _context.next) {
43
- case 0:
44
- return _context.abrupt("return", openEmbedModalWithFlexibleUiIcon(_objectSpread({
45
- download: data === null || data === void 0 ? void 0 : data.downloadUrl,
46
- extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey,
47
- analytics: analytics
48
- }, data)));
49
- case 1:
50
- case "end":
51
- return _context.stop();
52
- }
53
- }, _callee);
54
- }));
55
- function actionFn() {
56
- return _actionFn.apply(this, arguments);
57
- }
58
- return actionFn;
59
- }(),
60
- // These values have already been set in analytics context.
61
- // We only pass these here for ufo experience.
62
- display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
63
- extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
64
- });
65
- }
66
- if (onClickCallback) {
67
- onClickCallback();
68
- }
23
+ if (data !== null && data !== void 0 && data.invokeAction) {
24
+ invoke(data.invokeAction);
25
+ onClickCallback === null || onClickCallback === void 0 || onClickCallback();
69
26
  }
70
- }, [analytics, data, invoke, onClickCallback]);
27
+ }, [data, invoke, onClickCallback]);
71
28
  var isStackItem = props.as === 'stack-item';
72
29
  var tooltipMessage = isStackItem ? messages.preview_description : messages.preview_improved;
73
30
  return data ? /*#__PURE__*/React.createElement(Action, _extends({
@@ -79,7 +79,7 @@ var LozengeAction = function LozengeAction(_ref) {
79
79
  var _ref2 = (action === null || action === void 0 || (_action$update = action.update) === null || _action$update === void 0 ? void 0 : _action$update.details) || {},
80
80
  url = _ref2.url,
81
81
  linkId = _ref2.id,
82
- previewData = _ref2.previewData;
82
+ invokePreviewAction = _ref2.invokePreviewAction;
83
83
  var handleOpenChange = useCallback( /*#__PURE__*/function () {
84
84
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(args) {
85
85
  var responseItems, validItems;
@@ -212,7 +212,7 @@ var LozengeAction = function LozengeAction(_ref) {
212
212
  errorMessage: errorMessage,
213
213
  testId: testId,
214
214
  url: url,
215
- previewData: previewData
215
+ invokePreviewAction: invokePreviewAction
216
216
  });
217
217
  }
218
218
  if (items && items.length > 0) {
@@ -222,7 +222,7 @@ var LozengeAction = function LozengeAction(_ref) {
222
222
  onClick: handleItemClick
223
223
  });
224
224
  }
225
- }, [errorMessage, handleItemClick, items, previewData, testId, url]);
225
+ }, [errorMessage, handleItemClick, items, invokePreviewAction, testId, url]);
226
226
  return jsx(DropdownMenu, {
227
227
  isLoading: isLoading,
228
228
  isOpen: isOpen,
@@ -1,6 +1,3 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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
1
  /**
5
2
  * @jsxRuntime classic
6
3
  * @jsx jsx
@@ -12,14 +9,11 @@ import { jsx } from '@emotion/react';
12
9
  import { FormattedMessage } from 'react-intl-next';
13
10
  import { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
14
11
  import ErrorIcon from '@atlaskit/icon/core/migration/error';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
12
  import { R50, R500 } from '@atlaskit/theme/colors';
17
13
  import { useAnalyticsEvents } from '../../../../../../../common/analytics/generated/use-analytics-events';
18
14
  import { messages } from '../../../../../../../messages';
19
- import { useFlexibleUiAnalyticsContext } from '../../../../../../../state/flexible-ui-context';
20
15
  import useInvokeClientAction from '../../../../../../../state/hooks/use-invoke-client-action';
21
- import useResolve from '../../../../../../../state/hooks/use-resolve';
22
- import { getFormattedMessage, openEmbedModalWithFlexibleUiIcon } from '../../../../utils';
16
+ import { getFormattedMessage } from '../../../../utils';
23
17
  import { contentStyles, dropdownItemGroupStyles, linkStyles, textStyles } from './styled';
24
18
  var MAX_LINE_NUMBER = 8;
25
19
  var LozengeActionError = function LozengeActionError(_ref) {
@@ -27,33 +21,19 @@ var LozengeActionError = function LozengeActionError(_ref) {
27
21
  testId = _ref.testId,
28
22
  _ref$maxLineNumber = _ref.maxLineNumber,
29
23
  maxLineNumber = _ref$maxLineNumber === void 0 ? MAX_LINE_NUMBER : _ref$maxLineNumber,
30
- invokePreviewAction = _ref.invokePreviewAction,
31
- url = _ref.url,
32
- previewData = _ref.previewData;
24
+ invokePreviewAction = _ref.invokePreviewAction;
33
25
  var _useAnalyticsEvents = useAnalyticsEvents(),
34
26
  fireEvent = _useAnalyticsEvents.fireEvent;
35
- var reload = useResolve();
36
- var analytics = useFlexibleUiAnalyticsContext();
37
27
  var invoke = useInvokeClientAction({});
38
- var isPreviewAvailable = fg('platform-smart-card-migrate-embed-modal-analytics') ? invokePreviewAction !== undefined : previewData && previewData.src !== undefined;
39
- var handlePreviewClose = useCallback(function () {
40
- if (url) {
41
- reload(url, true);
42
- }
43
- }, [reload, url]);
28
+ var isPreviewAvailable = invokePreviewAction !== undefined;
44
29
  var handlePreviewOpen = useCallback(function () {
45
30
  if (isPreviewAvailable) {
46
31
  fireEvent('ui.button.clicked.smartLinkStatusOpenPreview', {});
47
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
48
- invokePreviewAction && invoke(invokePreviewAction);
49
- } else {
50
- return openEmbedModalWithFlexibleUiIcon(_objectSpread(_objectSpread({}, previewData), {}, {
51
- analytics: analytics,
52
- onClose: handlePreviewClose
53
- }));
32
+ if (invokePreviewAction) {
33
+ invoke(invokePreviewAction);
54
34
  }
55
35
  }
56
- }, [analytics, handlePreviewClose, isPreviewAvailable, invoke, invokePreviewAction, previewData, fireEvent]);
36
+ }, [isPreviewAvailable, invoke, invokePreviewAction, fireEvent]);
57
37
  var content = useMemo(function () {
58
38
  return jsx(Fragment, null, jsx("div", {
59
39
  css: contentStyles
@@ -1,11 +1,7 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
2
  import _extends from "@babel/runtime/helpers/extends";
4
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
- var _excluded = ["linkIcon"];
6
4
  var _templateObject;
7
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
- 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; }
9
5
  import React from 'react';
10
6
 
11
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -13,8 +9,6 @@ import { css } from '@emotion/react';
13
9
  import { FormattedMessage } from 'react-intl-next';
14
10
  import Loadable from 'react-loadable';
15
11
  import { SmartLinkSize } from '../../../constants';
16
- import { openEmbedModal } from '../../EmbedModal/utils';
17
- import Icon from './elements/icon';
18
12
  export var sizeToButtonSpacing = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, SmartLinkSize.Small, 'none'), SmartLinkSize.Medium, 'compact'), SmartLinkSize.Large, 'compact'), SmartLinkSize.XLarge, 'default');
19
13
  export var getFormattedMessage = function getFormattedMessage(message) {
20
14
  if (message) {
@@ -193,25 +187,4 @@ export var getTruncateStyles = function getTruncateStyles(maxLines) {
193
187
  };
194
188
  export var hasWhiteSpace = function hasWhiteSpace(str) {
195
189
  return str.search(/\s/) >= 0;
196
- };
197
-
198
- /**
199
- * TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
200
- */
201
- export var openEmbedModalWithFlexibleUiIcon = function openEmbedModalWithFlexibleUiIcon(_ref) {
202
- var linkIcon = _ref.linkIcon,
203
- props = _objectWithoutProperties(_ref, _excluded);
204
- var icon = {
205
- icon: /*#__PURE__*/React.createElement(Icon, _extends({}, linkIcon, {
206
- size: SmartLinkSize.Large
207
- })),
208
- isFlexibleUi: true
209
- };
210
- return openEmbedModal(_objectSpread(_objectSpread({}, props), {}, {
211
- icon: icon,
212
- // Flex should not send origin as block card. It should be able to support
213
- // its internal parent components like hover card, block card and
214
- // itself as a standalone. To be investigated and fix in EDM-7520.
215
- origin: 'smartLinkCard'
216
- }));
217
190
  };
@@ -1,10 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
5
4
  import { CardDisplay, SmartLinkPosition, SmartLinkSize, SmartLinkStatus } from '../../../../../constants';
6
5
  import { succeedUfoExperience } from '../../../../../state/analytics';
7
- import { getCanBeDatasource, getDefinitionId } from '../../../../../state/helpers';
8
6
  import FlexibleCard from '../../../../FlexibleCard';
9
7
  import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
10
8
  import { getMetadata } from '../../../utils';
@@ -12,8 +10,7 @@ import ImagePreview from '../../ImagePreview';
12
10
  import { hiddenSnippetStyles, metadataBlockCss } from './styled';
13
11
  var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
14
12
  var _cardState$details;
15
- var analytics = _ref.analytics,
16
- cardState = _ref.cardState,
13
+ var cardState = _ref.cardState,
17
14
  extensionKey = _ref.extensionKey,
18
15
  flexibleCardProps = _ref.flexibleCardProps,
19
16
  isAISummaryEnabled = _ref.isAISummaryEnabled,
@@ -22,36 +19,22 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
22
19
  id = _ref.id;
23
20
  var _useAnalyticsEvents = useAnalyticsEvents(),
24
21
  fireEvent = _useAnalyticsEvents.fireEvent;
25
- var definitionId = React.useMemo(function () {
26
- return getDefinitionId(cardState.details);
27
- }, [cardState.details]);
28
- var canBeDatasource = React.useMemo(function () {
29
- return getCanBeDatasource(cardState.details);
30
- }, [cardState.details]);
31
22
  useEffect(function () {
32
23
  // Since this hover view is only rendered on resolved status,
33
24
  // there is no need to check for statuses.
34
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
35
- succeedUfoExperience('smart-link-rendered', id || 'NULL', {
36
- extensionKey: extensionKey,
37
- display: CardDisplay.HoverCardPreview
38
- });
25
+ succeedUfoExperience('smart-link-rendered', id || 'NULL', {
26
+ extensionKey: extensionKey,
27
+ display: CardDisplay.HoverCardPreview
28
+ });
39
29
 
40
- // UFO will disregard this if authentication experience has not yet been started
41
- succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
42
- display: CardDisplay.HoverCardPreview
43
- });
44
- fireEvent('ui.smartLink.renderSuccess', {
45
- display: CardDisplay.HoverCardPreview
46
- });
47
- } else {
48
- analytics.ui.renderSuccessEvent({
49
- display: CardDisplay.HoverCardPreview,
50
- status: cardState.status,
51
- canBeDatasource: canBeDatasource
52
- });
53
- }
54
- }, [analytics.ui, cardState.status, canBeDatasource, fireEvent, definitionId, extensionKey, id]);
30
+ // UFO will disregard this if authentication experience has not yet been started
31
+ succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
32
+ display: CardDisplay.HoverCardPreview
33
+ });
34
+ fireEvent('ui.smartLink.renderSuccess', {
35
+ display: CardDisplay.HoverCardPreview
36
+ });
37
+ }, [extensionKey, fireEvent, id]);
55
38
  var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
56
39
  var _useMemo = useMemo(function () {
57
40
  return getMetadata(extensionKey, data);
@@ -12,10 +12,8 @@ import { jsx } from '@emotion/react';
12
12
  import { ErrorBoundary } from 'react-error-boundary';
13
13
  import { di } from 'react-magnetic-di';
14
14
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
17
16
  import { CardDisplay } from '../../constants';
18
- import { useSmartLinkAnalytics } from '../../state';
19
17
  import { failUfoExperience, startUfoExperience } from '../../state/analytics';
20
18
  import { SmartLinkModalProvider } from '../../state/modal';
21
19
  import { useSmartLinkAnalyticsContext } from '../../utils/analytics/SmartLinkAnalyticsContext';
@@ -26,7 +24,6 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
26
24
  var url = props.url,
27
25
  id = props.id,
28
26
  children = props.children;
29
- var analytics = useSmartLinkAnalytics(url, id);
30
27
  var analyticsContext = useSmartLinkAnalyticsContext({
31
28
  display: CardDisplay.HoverCardPreview,
32
29
  id: id,
@@ -34,25 +31,16 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
34
31
  url: url
35
32
  });
36
33
  var onError = useCallback(function (error, info) {
37
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
38
- startUfoExperience('smart-link-rendered', id || 'NULL');
39
- failUfoExperience('smart-link-rendered', id || 'NULL');
40
- failUfoExperience('smart-link-authenticated', id || 'NULL');
41
- fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
42
- display: CardDisplay.HoverCardPreview,
43
- id: id !== null && id !== void 0 ? id : null,
44
- error: error,
45
- errorInfo: info
46
- }));
47
- } else {
48
- analytics.ui.renderFailedEvent({
49
- display: CardDisplay.HoverCardPreview,
50
- id: id,
51
- error: error,
52
- errorInfo: info
53
- });
54
- }
55
- }, [analytics.ui, analyticsContext, id, fireEvent]);
34
+ startUfoExperience('smart-link-rendered', id || 'NULL');
35
+ failUfoExperience('smart-link-rendered', id || 'NULL');
36
+ failUfoExperience('smart-link-authenticated', id || 'NULL');
37
+ fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
38
+ display: CardDisplay.HoverCardPreview,
39
+ id: id !== null && id !== void 0 ? id : null,
40
+ error: error,
41
+ errorInfo: info
42
+ }));
43
+ }, [analyticsContext, id, fireEvent]);
56
44
  return jsx(ErrorBoundary, {
57
45
  fallback: children,
58
46
  onError: onError
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "33.1.0",
16
+ packageVersion: "33.2.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -1,10 +1,3 @@
1
- import { type JsonLd } from 'json-ld-types';
2
1
  import { type CopyLinkActionData } from '../../../state/flexible-ui-context/types';
3
- import { type CardActionOptions } from '../../../view/Card/types';
4
2
  import { type ExtractClientActionsParam } from '../../action/types';
5
- /**
6
- * TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
7
- * Replaced with extractCopyLinkClientAction()
8
- */
9
- export declare const extractCopyLinkAction: (data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions) => CopyLinkActionData | undefined;
10
3
  export declare const extractCopyLinkClientAction: (param: ExtractClientActionsParam) => CopyLinkActionData | undefined;
@@ -1,10 +1,3 @@
1
- import { type JsonLd } from 'json-ld-types';
2
1
  import { type DownloadActionData } from '../../../state/flexible-ui-context/types';
3
- import { type CardActionOptions } from '../../../view/Card/types';
4
2
  import { type ExtractClientActionsParam } from '../../action/types';
5
- /**
6
- * TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
7
- * Replaced with extractDownloadClientAction()
8
- */
9
- export declare const extractDownloadAction: (data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions) => DownloadActionData | undefined;
10
3
  export declare const extractDownloadClientAction: (param: ExtractClientActionsParam) => DownloadActionData | undefined;
@@ -1,10 +1,3 @@
1
- import { type JsonLd } from 'json-ld-types';
2
1
  import { type PreviewActionData } from '../../../state/flexible-ui-context/types';
3
- import { type CardActionOptions } from '../../../view/Card/types';
4
2
  import { type ExtractInvokePreviewActionParam } from '../../action/extract-invoke-preview-action';
5
- /**
6
- * TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
7
- * Replaced with extractPreviewClientAction()
8
- */
9
- export declare const extractPreviewAction: (response: JsonLd.Response, actionOptions?: CardActionOptions) => PreviewActionData | undefined;
10
3
  export declare const extractPreviewClientAction: (param: ExtractInvokePreviewActionParam) => PreviewActionData | undefined;
@@ -15,9 +15,3 @@ export type ExtractActionsParam = {
15
15
  fireEvent?: FireEventFunction;
16
16
  };
17
17
  export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, }: ExtractActionsParam) => FlexibleUiActions | undefined;
18
- /**
19
- * TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
20
- * Replaced with extractFlexibleCardActions()
21
- */
22
- declare const extractActions: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, id?: string, aiSummaryConfig?: AISummaryConfig) => FlexibleUiActions | undefined;
23
- export default extractActions;
@@ -1,5 +1,4 @@
1
- import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps } from '../../utils/analytics/types';
2
- import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
1
+ import { type InvokeFailedEventProps, type InvokeSucceededEventProps } from '../../utils/analytics/types';
3
2
  /**
4
3
  * This hook provides usage of Smart Link analytics outside of the Card component.
5
4
  * Can be provided to Card via the analyticsEvents prop to change the analytics events.
@@ -10,55 +9,6 @@ import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
10
9
  * @returns
11
10
  */
12
11
  export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLocation?: string) => {
13
- ui: {
14
- /**
15
- * This fires an event that represents when a user
16
- * click a button.
17
- * @param data A partial analytics event payload
18
- * @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
19
- */
20
- buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
21
- actionSubjectId: Required<string>;
22
- }) => void;
23
- /**
24
- * This fires an event that represents when a user clicks on a Smart Link action.
25
- * Note: This also starts the UFO smart-link-action-invocation experience.
26
- * @param id The unique ID for this Smart Link.
27
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
28
- * @param actionType The type of the action that was clicked, e.g. PreviewAction
29
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
30
- * @returns
31
- */
32
- actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
33
- /**
34
- * This fires an event that represents when a user close a modal.
35
- * @param data A partial analytics event payload
36
- * @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
37
- */
38
- modalClosedEvent: (data: Partial<AnalyticsPayload> & {
39
- actionSubjectId: Required<string>;
40
- }) => void;
41
- /**
42
- * This fires an event that represents when a Smart Link was rendered successfully.
43
- * Note: this fires even if the Smart Link request errored out.
44
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
45
- * @param id The unique ID for this Smart Link.
46
- * @param definitionId The definitionId of the Smart Link resolver invoked.
47
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
48
- * @param canBeDatasource An indicator that shows that a smart link can be converted to a datasource
49
- * @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
50
- */
51
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: UiRenderSuccessEventProps) => void;
52
- /**
53
- * This fires an event that represents when a Smart Link renders unsuccessfuly.
54
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
55
- * @param id The unique ID for this Smart Link.
56
- * @param error: An error representing why the Smart Link render failed.
57
- * @param errorInfo: Additional details about the error including the stack trace.
58
- * @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
59
- */
60
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
61
- };
62
12
  operational: {
63
13
  /**
64
14
  * This fires an event that represents an action being successfully invoked.
@@ -78,14 +28,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
78
28
  */
79
29
  invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
80
30
  };
81
- screen: {
82
- /**
83
- * This fires an event that represents when a user view a modal.
84
- * @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
85
- */
86
- modalViewedEvent: (data: Partial<AnalyticsPayload> & {
87
- name: Extract<AnalyticsName, 'embedPreviewModal'>;
88
- }) => void;
89
- };
31
+ screen: Screen;
90
32
  };
91
33
  export type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;