@atlaskit/smart-card 33.0.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 (164) hide show
  1. package/CHANGELOG.md +20 -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 -28
  14. package/dist/cjs/view/CardWithUrl/loader.js +10 -24
  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/container/index.js +1 -4
  21. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  22. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -26
  23. package/dist/cjs/view/FlexibleCard/components/utils.js +1 -28
  24. package/dist/cjs/view/FlexibleCard/index.js +0 -3
  25. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +13 -30
  26. package/dist/cjs/view/HoverCard/index.js +10 -22
  27. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -4
  28. package/dist/cjs/view/InlineCard/index.js +0 -3
  29. package/dist/cjs/view/LinkUrl/index.js +1 -1
  30. package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +0 -19
  31. package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -21
  32. package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -34
  33. package/dist/es2019/extractors/flexible/actions/index.js +4 -23
  34. package/dist/es2019/extractors/flexible/extract-state.js +1 -5
  35. package/dist/es2019/extractors/flexible/index.js +3 -4
  36. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -172
  37. package/dist/es2019/state/hooks/use-invoke-client-action/index.js +21 -44
  38. package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -18
  39. package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +3 -40
  40. package/dist/es2019/utils/analytics/analytics.js +1 -1
  41. package/dist/es2019/view/CardWithUrl/component.js +13 -29
  42. package/dist/es2019/view/CardWithUrl/loader.js +11 -25
  43. package/dist/es2019/view/EmbedModal/components/analytics/index.js +39 -88
  44. package/dist/es2019/view/EmbedModal/index.js +10 -33
  45. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +11 -32
  46. package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +4 -22
  47. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +4 -27
  48. package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -3
  49. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  50. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -24
  51. package/dist/es2019/view/FlexibleCard/components/utils.js +0 -25
  52. package/dist/es2019/view/FlexibleCard/index.js +0 -3
  53. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -25
  54. package/dist/es2019/view/HoverCard/index.js +11 -23
  55. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -3
  56. package/dist/es2019/view/InlineCard/index.js +0 -3
  57. package/dist/es2019/view/LinkUrl/index.js +1 -1
  58. package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +0 -19
  59. package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -23
  60. package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -34
  61. package/dist/esm/extractors/flexible/actions/index.js +4 -17
  62. package/dist/esm/extractors/flexible/extract-state.js +1 -5
  63. package/dist/esm/extractors/flexible/index.js +3 -4
  64. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +19 -191
  65. package/dist/esm/state/hooks/use-invoke-client-action/index.js +21 -44
  66. package/dist/esm/state/hooks-external/useSmartLinkActions.js +4 -18
  67. package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
  68. package/dist/esm/utils/analytics/analytics.js +1 -1
  69. package/dist/esm/view/CardWithUrl/component.js +13 -29
  70. package/dist/esm/view/CardWithUrl/loader.js +10 -24
  71. package/dist/esm/view/EmbedModal/components/analytics/index.js +40 -89
  72. package/dist/esm/view/EmbedModal/index.js +10 -67
  73. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
  74. package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +4 -40
  75. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
  76. package/dist/esm/view/FlexibleCard/components/container/index.js +1 -4
  77. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  78. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -26
  79. package/dist/esm/view/FlexibleCard/components/utils.js +0 -27
  80. package/dist/esm/view/FlexibleCard/index.js +0 -3
  81. package/dist/esm/view/HoverCard/components/views/resolved/index.js +13 -30
  82. package/dist/esm/view/HoverCard/index.js +10 -22
  83. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -4
  84. package/dist/esm/view/InlineCard/index.js +0 -3
  85. package/dist/esm/view/LinkUrl/index.js +1 -1
  86. package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
  87. package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +0 -7
  88. package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
  89. package/dist/types/extractors/flexible/actions/index.d.ts +0 -6
  90. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
  91. package/dist/types/state/flexible-ui-context/types.d.ts +4 -19
  92. package/dist/types/state/hooks/use-invoke/types.d.ts +0 -6
  93. package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +1 -1
  94. package/dist/types/state/hooks/useSmartLink.d.ts +1 -16
  95. package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
  96. package/dist/types/utils/mocks.d.ts +1 -16
  97. package/dist/types/view/Card/index.d.ts +1 -1
  98. package/dist/types/view/Card/types.d.ts +0 -5
  99. package/dist/types/view/CardWithUrl/types.d.ts +0 -4
  100. package/dist/types/view/EmbedModal/index.d.ts +0 -2
  101. package/dist/types/view/EmbedModal/types.d.ts +0 -3
  102. package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
  103. package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
  104. package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
  105. package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
  106. package/dist/types/view/FlexibleCard/components/utils.d.ts +0 -6
  107. package/dist/types/view/FlexibleCard/index.d.ts +1 -1
  108. package/dist/types/view/FlexibleCard/types.d.ts +0 -6
  109. package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  110. package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  111. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -6
  112. package/dist/types/view/InlineCard/index.d.ts +1 -1
  113. package/dist/types/view/InlineCard/types.d.ts +0 -4
  114. package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
  115. package/dist/types-ts4.5/extractors/flexible/actions/extract-download-action.d.ts +0 -7
  116. package/dist/types-ts4.5/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
  117. package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +0 -6
  118. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
  119. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -19
  120. package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +0 -6
  121. package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +1 -1
  122. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +1 -16
  123. package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
  124. package/dist/types-ts4.5/utils/mocks.d.ts +1 -16
  125. package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
  126. package/dist/types-ts4.5/view/Card/types.d.ts +0 -5
  127. package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -4
  128. package/dist/types-ts4.5/view/EmbedModal/index.d.ts +0 -2
  129. package/dist/types-ts4.5/view/EmbedModal/types.d.ts +0 -3
  130. package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
  131. package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +1 -1
  132. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
  133. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
  134. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +0 -6
  135. package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +1 -1
  136. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +0 -6
  137. package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  138. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  139. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -6
  140. package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
  141. package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -4
  142. package/package.json +2 -8
  143. package/dist/cjs/extractors/action/extractDownloadActionProps.js +0 -32
  144. package/dist/cjs/extractors/action/extractPreviewActionProps.js +0 -47
  145. package/dist/cjs/extractors/action/extractViewActionProps.js +0 -31
  146. package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -27
  147. package/dist/es2019/extractors/action/extractDownloadActionProps.js +0 -24
  148. package/dist/es2019/extractors/action/extractPreviewActionProps.js +0 -36
  149. package/dist/es2019/extractors/action/extractViewActionProps.js +0 -23
  150. package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -20
  151. package/dist/esm/extractors/action/extractDownloadActionProps.js +0 -27
  152. package/dist/esm/extractors/action/extractPreviewActionProps.js +0 -41
  153. package/dist/esm/extractors/action/extractViewActionProps.js +0 -26
  154. package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -22
  155. package/dist/types/extractors/action/extractDownloadActionProps.d.ts +0 -7
  156. package/dist/types/extractors/action/extractPreviewActionProps.d.ts +0 -7
  157. package/dist/types/extractors/action/extractViewActionProps.d.ts +0 -7
  158. package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +0 -7
  159. package/dist/types/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
  160. package/dist/types-ts4.5/extractors/action/extractDownloadActionProps.d.ts +0 -7
  161. package/dist/types-ts4.5/extractors/action/extractPreviewActionProps.d.ts +0 -7
  162. package/dist/types-ts4.5/extractors/action/extractViewActionProps.d.ts +0 -7
  163. package/dist/types-ts4.5/extractors/flexible/actions/extract-view-action.d.ts +0 -7
  164. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
@@ -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
  };
@@ -3,7 +3,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  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; }
4
4
  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; }
5
5
  import React, { useEffect, useMemo } from 'react';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
8
7
  import { SmartLinkStatus } from '../../constants';
9
8
  import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
@@ -32,7 +31,6 @@ var FlexibleCard = function FlexibleCard(_ref) {
32
31
  onResolve = _ref.onResolve,
33
32
  origin = _ref.origin,
34
33
  renderers = _ref.renderers,
35
- showAuthTooltip = _ref.showAuthTooltip,
36
34
  showHoverPreview = _ref.showHoverPreview,
37
35
  hoverPreviewOptions = _ref.hoverPreviewOptions,
38
36
  actionOptions = _ref.actionOptions,
@@ -109,7 +107,6 @@ var FlexibleCard = function FlexibleCard(_ref) {
109
107
  showHoverPreview: showHoverPreview,
110
108
  hoverPreviewOptions: hoverPreviewOptions,
111
109
  actionOptions: actionOptions,
112
- showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
113
110
  status: status
114
111
  }), children))));
115
112
  };
@@ -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
@@ -3,7 +3,6 @@ import React from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
4
  import Button from '@atlaskit/button';
5
5
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { N500, R400 } from '@atlaskit/theme/colors';
8
7
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
9
8
  import { messages } from '../../../messages';
@@ -27,8 +26,6 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
27
26
  isSelected = _ref.isSelected,
28
27
  _ref$testId = _ref.testId,
29
28
  testId = _ref$testId === void 0 ? 'inline-card-unauthorized-view' : _ref$testId,
30
- _ref$showAuthTooltip = _ref.showAuthTooltip,
31
- showAuthTooltip = _ref$showAuthTooltip === void 0 ? false : _ref$showAuthTooltip,
32
29
  _ref$showHoverPreview = _ref.showHoverPreview,
33
30
  showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
34
31
  truncateInline = _ref.truncateInline,
@@ -69,7 +66,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
69
66
  onClick: onClick,
70
67
  titleColor: "var(--ds-text-subtle, ".concat(N500, ")")
71
68
  }), renderActionButton());
72
- if (onAuthorise && (fg('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip)) {
69
+ if (onAuthorise && showHoverPreview) {
73
70
  return /*#__PURE__*/React.createElement(HoverCard, {
74
71
  url: url,
75
72
  id: id
@@ -3,7 +3,6 @@ import React, { useEffect } from 'react';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
4
  import { extractProvider } from '@atlaskit/link-extractors';
5
5
  import { useFeatureFlag } from '@atlaskit/link-provider';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { SmartLinkStatus } from '../../constants';
8
7
  import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
9
8
  import { extractInlineProps } from '../../extractors/inline';
@@ -33,7 +32,6 @@ export var InlineCard = function InlineCard(_ref) {
33
32
  inlinePreloaderStyle = _ref.inlinePreloaderStyle,
34
33
  showHoverPreview = _ref.showHoverPreview,
35
34
  hoverPreviewOptions = _ref.hoverPreviewOptions,
36
- showAuthTooltip = _ref.showAuthTooltip,
37
35
  actionOptions = _ref.actionOptions,
38
36
  removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
39
37
  resolvingPlaceholder = _ref.resolvingPlaceholder,
@@ -107,7 +105,6 @@ export var InlineCard = function InlineCard(_ref) {
107
105
  onClick: handleFrameClick,
108
106
  onAuthorise: handleAuthorize,
109
107
  testId: testIdWithStatus,
110
- showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
111
108
  showHoverPreview: showHoverPreview,
112
109
  id: id,
113
110
  analytics: analytics,
@@ -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.0.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>;
@@ -1,7 +1,6 @@
1
1
  import { type LinkPerson } from '@atlaskit/link-extractors';
2
2
  import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
3
3
  import { type LinkLozenge } from '../../extractors/common/lozenge/types';
4
- import { type AnalyticsOrigin } from '../../utils/types';
5
4
  import { type CardInnerAppearance } from '../../view/Card/types';
6
5
  import { type AnalyticsFacade } from '../analytics';
7
6
  import { type InvokeClientActionProps } from '../hooks/use-invoke-client-action/types';
@@ -107,7 +106,7 @@ export type FlexibleUiDataContext = {
107
106
  * @type ViewActionData
108
107
  * @see ViewAction
109
108
  */
110
- viewAction?: ViewActionData;
109
+ viewAction?: PreviewActionData;
111
110
  /**
112
111
  * Contains the information about the latest commit in the repository
113
112
  */
@@ -252,27 +251,13 @@ export type FlexibleUiActions = {
252
251
  [InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
253
252
  };
254
253
  export type PreviewActionData = {
255
- invokeAction?: InvokeClientActionProps;
256
- downloadUrl?: string;
257
- linkIcon?: Icon;
258
- providerName?: string;
259
- origin?: AnalyticsOrigin;
260
- src?: string;
261
- title?: string;
262
- url?: string;
263
- isSupportTheming?: boolean;
264
- isTrusted?: boolean;
265
- };
266
- export type ViewActionData = {
267
- viewUrl?: string;
254
+ invokeAction: InvokeClientActionProps;
268
255
  };
269
256
  export type DownloadActionData = {
270
- invokeAction?: InvokeClientActionProps;
271
- downloadUrl?: string;
257
+ invokeAction: InvokeClientActionProps;
272
258
  };
273
259
  export type CopyLinkActionData = {
274
- invokeAction?: InvokeClientActionProps;
275
- url?: string;
260
+ invokeAction: InvokeClientActionProps;
276
261
  };
277
262
  export type AISummaryActionData = {
278
263
  url: string;
@@ -1,5 +1,4 @@
1
1
  import { type InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
2
- import { type PreviewActionData } from '../../flexible-ui-context/types';
3
2
  import type { InvokeClientActionProps } from '../use-invoke-client-action/types';
4
3
  /**
5
4
  * Additional details for invoke function that may be required for component
@@ -17,11 +16,6 @@ export type CardDetails = {
17
16
  * The URL of the Smart Link
18
17
  */
19
18
  url?: string;
20
- /**
21
- * Preview Modal information. If present, will be used to render an embed modal on an error link click
22
- * TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
23
- */
24
- previewData?: PreviewActionData | null;
25
19
  };
26
20
  /**
27
21
  * Additional details to reload smart links
@@ -2,5 +2,5 @@ import { type InvokeClientActionHandler, type UseInvokeClientActionProps } from
2
2
  /**
3
3
  * Invoke client action such as preview, download and open link
4
4
  */
5
- declare const useInvokeClientAction: ({ analytics, fireEvent: fireEventProp, }: UseInvokeClientActionProps) => InvokeClientActionHandler;
5
+ declare const useInvokeClientAction: ({ fireEvent: fireEventProp, }: UseInvokeClientActionProps) => InvokeClientActionHandler;
6
6
  export default useInvokeClientAction;
@@ -9,26 +9,11 @@ export declare function useSmartLink(id: string, url: string): {
9
9
  };
10
10
  config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
11
11
  analytics: {
12
- ui: {
13
- buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
14
- actionSubjectId: string;
15
- }) => void;
16
- actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
17
- modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
18
- actionSubjectId: string;
19
- }) => void;
20
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
21
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
22
- };
23
12
  operational: {
24
13
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
25
14
  invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
26
15
  };
27
- screen: {
28
- modalViewedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
29
- name: "embedPreviewModal";
30
- }) => void;
31
- };
16
+ screen: Screen;
32
17
  };
33
18
  renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
34
19
  error: Error | null;
@@ -24,5 +24,5 @@ export declare const useSmartLinkAnalyticsContext: ({ display, id, source, url,
24
24
  * Provides an analytics context to supply attributes to events based on a URL
25
25
  * and the link state in the store
26
26
  */
27
- export declare const SmartLinkAnalyticsContext: (props: SmartLinkAnalyticsContextProps) => JSX.Element;
27
+ export declare const SmartLinkAnalyticsContext: ({ children, display, id, source, url, }: SmartLinkAnalyticsContextProps) => JSX.Element;
28
28
  export {};
@@ -90,24 +90,9 @@ export declare const fakeResponse: () => Promise<JsonLd.Response<JsonLd.Data.Bas
90
90
  export declare const fakeFactory: any;
91
91
  export declare const waitFor: (time?: number) => Promise<unknown>;
92
92
  export declare const mockAnalytics: {
93
- ui: {
94
- buttonClickedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
95
- actionSubjectId: string;
96
- }) => void;
97
- actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
98
- modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
99
- actionSubjectId: string;
100
- }) => void;
101
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("./analytics/types").UiRenderSuccessEventProps) => void;
102
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
103
- };
104
93
  operational: {
105
94
  invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
106
95
  invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
107
96
  };
108
- screen: {
109
- modalViewedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
110
- name: "embedPreviewModal";
111
- }) => void;
112
- };
97
+ screen: Screen;
113
98
  };
@@ -3,5 +3,5 @@ import { type WrappedComponentProps } from 'react-intl-next';
3
3
  import { type CardAppearance, type CardPlatform, type CardProps } from './types';
4
4
  export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<Omit<CardProps & WrappedComponentProps, "intl"> & {
5
5
  forwardedRef?: React.Ref<any> | undefined;
6
- }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "showAuthTooltip" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "fallbackComponent" | "isSelected" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "inheritDimensions" | "platform" | "analyticsContext" | "forwardedRef"> & React.RefAttributes<any>>;
6
+ }, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "fallbackComponent" | "isSelected" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "inheritDimensions" | "platform" | "analyticsContext" | "forwardedRef"> & React.RefAttributes<any>>;
7
7
  export type { CardAppearance, CardProps, CardPlatform };