@atlaskit/smart-card 29.4.0 → 30.0.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 (47) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/constants.js +0 -1
  3. package/dist/cjs/utils/actions/combine-action-options.js +1 -8
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/EmbedModal/index.js +1 -1
  6. package/dist/cjs/view/FlexibleCard/components/container/hover-card-control/index.js +0 -2
  7. package/dist/cjs/view/FlexibleCard/components/container/index.js +0 -3
  8. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -8
  9. package/dist/cjs/view/HoverCard/styled.js +0 -1
  10. package/dist/cjs/view/LinkUrl/index.js +1 -1
  11. package/dist/es2019/constants.js +0 -1
  12. package/dist/es2019/utils/actions/combine-action-options.js +1 -6
  13. package/dist/es2019/utils/analytics/analytics.js +1 -1
  14. package/dist/es2019/view/EmbedModal/index.js +1 -1
  15. package/dist/es2019/view/FlexibleCard/components/container/hover-card-control/index.js +0 -2
  16. package/dist/es2019/view/FlexibleCard/components/container/index.js +0 -2
  17. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -7
  18. package/dist/es2019/view/HoverCard/styled.js +0 -1
  19. package/dist/es2019/view/LinkUrl/index.js +1 -1
  20. package/dist/esm/constants.js +0 -1
  21. package/dist/esm/utils/actions/combine-action-options.js +1 -7
  22. package/dist/esm/utils/analytics/analytics.js +1 -1
  23. package/dist/esm/view/EmbedModal/index.js +1 -1
  24. package/dist/esm/view/FlexibleCard/components/container/hover-card-control/index.js +0 -2
  25. package/dist/esm/view/FlexibleCard/components/container/index.js +0 -3
  26. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -8
  27. package/dist/esm/view/HoverCard/styled.js +0 -1
  28. package/dist/esm/view/LinkUrl/index.js +1 -1
  29. package/dist/types/constants.d.ts +0 -4
  30. package/dist/types/utils/actions/combine-action-options.d.ts +1 -2
  31. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -7
  32. package/dist/types/view/FlexibleCard/components/container/hover-card-control/index.d.ts +1 -1
  33. package/dist/types/view/FlexibleCard/components/container/hover-card-control/types.d.ts +1 -1
  34. package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
  35. package/dist/types/view/FlexibleCard/types.d.ts +0 -7
  36. package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
  37. package/dist/types/view/HoverCard/types.d.ts +0 -11
  38. package/dist/types-ts4.5/constants.d.ts +0 -4
  39. package/dist/types-ts4.5/utils/actions/combine-action-options.d.ts +1 -2
  40. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -7
  41. package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/index.d.ts +1 -1
  42. package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/types.d.ts +1 -1
  43. package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
  44. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +0 -7
  45. package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
  46. package/dist/types-ts4.5/view/HoverCard/types.d.ts +0 -11
  47. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 30.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#151143](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151143)
8
+ [`b6e7b30e12eb7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6e7b30e12eb7) -
9
+ Remove onAuthorise, hidePreviewButton, and hideHoverCardPreviewButton from smart-card export
10
+ - [#151143](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151143)
11
+ [`b6e7b30e12eb7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6e7b30e12eb7) -
12
+ Remove ActionName.ViewAction from public API
13
+
3
14
  ## 29.4.0
4
15
 
5
16
  ### Minor Changes
@@ -149,7 +149,6 @@ var ActionName = exports.ActionName = /*#__PURE__*/function (ActionName) {
149
149
  ActionName["FollowAction"] = "FollowAction";
150
150
  ActionName["PreviewAction"] = "PreviewAction";
151
151
  ActionName["AutomationAction"] = "AutomationAction";
152
- ActionName["ViewAction"] = "ViewAction";
153
152
  ActionName["DownloadAction"] = "DownloadAction";
154
153
  ActionName["CustomAction"] = "CustomAction";
155
154
  return ActionName;
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.combineActionOptions = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _types = require("../../view/Card/types");
10
7
  var combineActionOptions = exports.combineActionOptions = function combineActionOptions(_ref) {
11
8
  var actionOptions = _ref.actionOptions,
12
- platform = _ref.platform,
13
- hidePreviewButton = _ref.hidePreviewButton;
9
+ platform = _ref.platform;
14
10
  if (typeof actionOptions !== 'undefined') {
15
11
  return actionOptions;
16
12
  }
@@ -20,9 +16,6 @@ var combineActionOptions = exports.combineActionOptions = function combineAction
20
16
  };
21
17
  }
22
18
  var exclude = [];
23
- if (hidePreviewButton) {
24
- exclude = [].concat((0, _toConsumableArray2.default)(exclude), [_types.CardAction.PreviewAction]);
25
- }
26
19
  return {
27
20
  hide: false,
28
21
  exclude: exclude
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "29.4.0"
25
+ packageVersion: "30.0.0"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -96,7 +96,7 @@ var EmbedModal = function EmbedModal(_ref) {
96
96
  var previewUrl = src;
97
97
  var handleOnViewActionClick = (0, _react.useCallback)(function () {
98
98
  invoke({
99
- actionType: _constants2.ActionName.ViewAction,
99
+ actionType: 'ViewAction',
100
100
  actionFn: function () {
101
101
  var _actionFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
102
102
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -15,7 +15,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
15
15
  var FLEXIBLE_HOVER_CARD_CAN_OPEN_DELAY = 100;
16
16
  var HoverCardControl = function HoverCardControl(_ref) {
17
17
  var children = _ref.children,
18
- hideHoverCardPreviewButton = _ref.hideHoverCardPreviewButton,
19
18
  isHoverPreview = _ref.isHoverPreview,
20
19
  isAuthTooltip = _ref.isAuthTooltip,
21
20
  actionOptions = _ref.actionOptions,
@@ -68,7 +67,6 @@ var HoverCardControl = function HoverCardControl(_ref) {
68
67
  allowEventPropagation: true,
69
68
  canOpen: canOpen,
70
69
  closeOnChildClick: true,
71
- hidePreviewButton: hideHoverCardPreviewButton,
72
70
  actionOptions: actionOptions,
73
71
  url: url,
74
72
  hoverPreviewOptions: hoverPreviewOptions
@@ -180,8 +180,6 @@ var Container = function Container(_ref3) {
180
180
  hideBackground = _ref3$hideBackground === void 0 ? false : _ref3$hideBackground,
181
181
  _ref3$hideElevation = _ref3.hideElevation,
182
182
  hideElevation = _ref3$hideElevation === void 0 ? false : _ref3$hideElevation,
183
- _ref3$hideHoverCardPr = _ref3.hideHoverCardPreviewButton,
184
- hideHoverCardPreviewButton = _ref3$hideHoverCardPr === void 0 ? false : _ref3$hideHoverCardPr,
185
183
  _ref3$hidePadding = _ref3.hidePadding,
186
184
  hidePadding = _ref3$hidePadding === void 0 ? false : _ref3$hidePadding,
187
185
  onClick = _ref3.onClick,
@@ -213,7 +211,6 @@ var Container = function Container(_ref3) {
213
211
  }, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick));
214
212
  if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
215
213
  return (0, _react2.jsx)(_hoverCardControl.default, {
216
- hideHoverCardPreviewButton: hideHoverCardPreviewButton,
217
214
  isHoverPreview: canShowHoverPreview,
218
215
  isAuthTooltip: canShowAuthTooltip,
219
216
  actionOptions: actionOptions,
@@ -18,7 +18,6 @@ var _CustomPopupContainer = _interopRequireDefault(require("../components/Custom
18
18
  var _styled = require("../styled");
19
19
  var _constants = require("../../../constants");
20
20
  var _SmartLinkAnalyticsContext = require("../../../utils/analytics/SmartLinkAnalyticsContext");
21
- var _combineActionOptions = require("../../../utils/actions/combine-action-options");
22
21
  var _actions = require("../../../state/actions");
23
22
  var _analytics = require("../../../state/analytics");
24
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -45,9 +44,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
45
44
  canOpen = _ref$canOpen === void 0 ? true : _ref$canOpen,
46
45
  _ref$closeOnChildClic = _ref.closeOnChildClick,
47
46
  closeOnChildClick = _ref$closeOnChildClic === void 0 ? false : _ref$closeOnChildClic,
48
- _ref$hidePreviewButto = _ref.hidePreviewButton,
49
- hidePreviewButton = _ref$hidePreviewButto === void 0 ? false : _ref$hidePreviewButto,
50
- actionOptionsProp = _ref.actionOptions,
47
+ actionOptions = _ref.actionOptions,
51
48
  _ref$allowEventPropag = _ref.allowEventPropagation,
52
49
  allowEventPropagation = _ref$allowEventPropag === void 0 ? false : _ref$allowEventPropag,
53
50
  _ref$zIndex = _ref.zIndex,
@@ -71,10 +68,6 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
71
68
  var analytics = (0, _analytics.useSmartLinkAnalytics)(url, id);
72
69
  var _useSmartCardActions = (0, _actions.useSmartCardActions)(id, url, analytics),
73
70
  loadMetadata = _useSmartCardActions.loadMetadata;
74
- var actionOptions = (0, _combineActionOptions.combineActionOptions)({
75
- actionOptions: actionOptionsProp,
76
- hidePreviewButton: hidePreviewButton
77
- });
78
71
  var setMousePosition = (0, _react2.useCallback)(function (event) {
79
72
  if (isOpen && canOpen) {
80
73
  return;
@@ -17,7 +17,6 @@ var flexibleUiOptions = exports.flexibleUiOptions = {
17
17
  hideBackground: true,
18
18
  hideElevation: true,
19
19
  size: _constants.SmartLinkSize.Medium,
20
- hideHoverCardPreviewButton: false,
21
20
  zIndex: HOVER_CARD_Z_INDEX + 1
22
21
  };
23
22
  var CARD_WIDTH_REM = exports.CARD_WIDTH_REM = 24;
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "29.4.0",
20
+ packageVersion: "30.0.0",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -151,7 +151,6 @@ export let ActionName = /*#__PURE__*/function (ActionName) {
151
151
  ActionName["FollowAction"] = "FollowAction";
152
152
  ActionName["PreviewAction"] = "PreviewAction";
153
153
  ActionName["AutomationAction"] = "AutomationAction";
154
- ActionName["ViewAction"] = "ViewAction";
155
154
  ActionName["DownloadAction"] = "DownloadAction";
156
155
  ActionName["CustomAction"] = "CustomAction";
157
156
  return ActionName;
@@ -1,8 +1,6 @@
1
- import { CardAction } from '../../view/Card/types';
2
1
  export const combineActionOptions = ({
3
2
  actionOptions,
4
- platform,
5
- hidePreviewButton
3
+ platform
6
4
  }) => {
7
5
  if (typeof actionOptions !== 'undefined') {
8
6
  return actionOptions;
@@ -13,9 +11,6 @@ export const combineActionOptions = ({
13
11
  };
14
12
  }
15
13
  let exclude = [];
16
- if (hidePreviewButton) {
17
- exclude = [...exclude, CardAction.PreviewAction];
18
- }
19
14
  return {
20
15
  hide: false,
21
16
  exclude
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "29.4.0"
7
+ packageVersion: "30.0.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -69,7 +69,7 @@ const EmbedModal = ({
69
69
  let previewUrl = src;
70
70
  const handleOnViewActionClick = useCallback(() => {
71
71
  invoke({
72
- actionType: ActionName.ViewAction,
72
+ actionType: 'ViewAction',
73
73
  actionFn: async () => openUrl(url),
74
74
  display: CardDisplay.EmbedPreview,
75
75
  extensionKey
@@ -4,7 +4,6 @@ import { ElementName } from '../../../../../constants';
4
4
  const FLEXIBLE_HOVER_CARD_CAN_OPEN_DELAY = 100;
5
5
  const HoverCardControl = ({
6
6
  children,
7
- hideHoverCardPreviewButton,
8
7
  isHoverPreview,
9
8
  isAuthTooltip,
10
9
  actionOptions,
@@ -54,7 +53,6 @@ const HoverCardControl = ({
54
53
  allowEventPropagation: true,
55
54
  canOpen: canOpen,
56
55
  closeOnChildClick: true,
57
- hidePreviewButton: hideHoverCardPreviewButton,
58
56
  actionOptions: actionOptions,
59
57
  url: url,
60
58
  hoverPreviewOptions: hoverPreviewOptions
@@ -186,7 +186,6 @@ const Container = ({
186
186
  clickableContainer = false,
187
187
  hideBackground = false,
188
188
  hideElevation = false,
189
- hideHoverCardPreviewButton = false,
190
189
  hidePadding = false,
191
190
  onClick,
192
191
  retry,
@@ -213,7 +212,6 @@ const Container = ({
213
212
  }, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick));
214
213
  if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
215
214
  return jsx(HoverCardControl, {
216
- hideHoverCardPreviewButton: hideHoverCardPreviewButton,
217
215
  isHoverPreview: canShowHoverPreview,
218
216
  isAuthTooltip: canShowAuthTooltip,
219
217
  actionOptions: actionOptions,
@@ -14,7 +14,6 @@ import CustomPopupContainer from '../components/CustomPopupContainer';
14
14
  import { CARD_GAP_PX, HOVER_CARD_Z_INDEX } from '../styled';
15
15
  import { ActionName, CardDisplay } from '../../../constants';
16
16
  import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAnalyticsContext';
17
- import { combineActionOptions } from '../../../utils/actions/combine-action-options';
18
17
  import { useSmartCardActions } from '../../../state/actions';
19
18
  import { useSmartLinkAnalytics } from '../../../state/analytics';
20
19
  const HOVER_CARD_SOURCE = 'smartLinkPreviewHoverCard';
@@ -28,8 +27,7 @@ export const HoverCardComponent = ({
28
27
  analyticsHandler,
29
28
  canOpen = true,
30
29
  closeOnChildClick = false,
31
- hidePreviewButton = false,
32
- actionOptions: actionOptionsProp,
30
+ actionOptions,
33
31
  allowEventPropagation = false,
34
32
  zIndex = HOVER_CARD_Z_INDEX,
35
33
  noFadeDelay = false,
@@ -50,10 +48,6 @@ export const HoverCardComponent = ({
50
48
  const {
51
49
  loadMetadata
52
50
  } = useSmartCardActions(id, url, analytics);
53
- const actionOptions = combineActionOptions({
54
- actionOptions: actionOptionsProp,
55
- hidePreviewButton
56
- });
57
51
  const setMousePosition = useCallback(event => {
58
52
  if (isOpen && canOpen) {
59
53
  return;
@@ -9,7 +9,6 @@ export const flexibleUiOptions = {
9
9
  hideBackground: true,
10
10
  hideElevation: true,
11
11
  size: SmartLinkSize.Medium,
12
- hideHoverCardPreviewButton: false,
13
12
  zIndex: HOVER_CARD_Z_INDEX + 1
14
13
  };
15
14
  export const CARD_WIDTH_REM = 24;
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "29.4.0",
10
+ packageVersion: "30.0.0",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -151,7 +151,6 @@ export var ActionName = /*#__PURE__*/function (ActionName) {
151
151
  ActionName["FollowAction"] = "FollowAction";
152
152
  ActionName["PreviewAction"] = "PreviewAction";
153
153
  ActionName["AutomationAction"] = "AutomationAction";
154
- ActionName["ViewAction"] = "ViewAction";
155
154
  ActionName["DownloadAction"] = "DownloadAction";
156
155
  ActionName["CustomAction"] = "CustomAction";
157
156
  return ActionName;
@@ -1,9 +1,6 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import { CardAction } from '../../view/Card/types';
3
1
  export var combineActionOptions = function combineActionOptions(_ref) {
4
2
  var actionOptions = _ref.actionOptions,
5
- platform = _ref.platform,
6
- hidePreviewButton = _ref.hidePreviewButton;
3
+ platform = _ref.platform;
7
4
  if (typeof actionOptions !== 'undefined') {
8
5
  return actionOptions;
9
6
  }
@@ -13,9 +10,6 @@ export var combineActionOptions = function combineActionOptions(_ref) {
13
10
  };
14
11
  }
15
12
  var exclude = [];
16
- if (hidePreviewButton) {
17
- exclude = [].concat(_toConsumableArray(exclude), [CardAction.PreviewAction]);
18
- }
19
13
  return {
20
14
  hide: false,
21
15
  exclude: exclude
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "29.4.0"
18
+ packageVersion: "30.0.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -86,7 +86,7 @@ var EmbedModal = function EmbedModal(_ref) {
86
86
  var previewUrl = src;
87
87
  var handleOnViewActionClick = useCallback(function () {
88
88
  invoke({
89
- actionType: ActionName.ViewAction,
89
+ actionType: 'ViewAction',
90
90
  actionFn: function () {
91
91
  var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
92
92
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -5,7 +5,6 @@ import { ElementName } from '../../../../../constants';
5
5
  var FLEXIBLE_HOVER_CARD_CAN_OPEN_DELAY = 100;
6
6
  var HoverCardControl = function HoverCardControl(_ref) {
7
7
  var children = _ref.children,
8
- hideHoverCardPreviewButton = _ref.hideHoverCardPreviewButton,
9
8
  isHoverPreview = _ref.isHoverPreview,
10
9
  isAuthTooltip = _ref.isAuthTooltip,
11
10
  actionOptions = _ref.actionOptions,
@@ -58,7 +57,6 @@ var HoverCardControl = function HoverCardControl(_ref) {
58
57
  allowEventPropagation: true,
59
58
  canOpen: canOpen,
60
59
  closeOnChildClick: true,
61
- hidePreviewButton: hideHoverCardPreviewButton,
62
60
  actionOptions: actionOptions,
63
61
  url: url,
64
62
  hoverPreviewOptions: hoverPreviewOptions
@@ -170,8 +170,6 @@ var Container = function Container(_ref3) {
170
170
  hideBackground = _ref3$hideBackground === void 0 ? false : _ref3$hideBackground,
171
171
  _ref3$hideElevation = _ref3.hideElevation,
172
172
  hideElevation = _ref3$hideElevation === void 0 ? false : _ref3$hideElevation,
173
- _ref3$hideHoverCardPr = _ref3.hideHoverCardPreviewButton,
174
- hideHoverCardPreviewButton = _ref3$hideHoverCardPr === void 0 ? false : _ref3$hideHoverCardPr,
175
173
  _ref3$hidePadding = _ref3.hidePadding,
176
174
  hidePadding = _ref3$hidePadding === void 0 ? false : _ref3$hidePadding,
177
175
  onClick = _ref3.onClick,
@@ -203,7 +201,6 @@ var Container = function Container(_ref3) {
203
201
  }, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick));
204
202
  if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
205
203
  return jsx(HoverCardControl, {
206
- hideHoverCardPreviewButton: hideHoverCardPreviewButton,
207
204
  isHoverPreview: canShowHoverPreview,
208
205
  isAuthTooltip: canShowAuthTooltip,
209
206
  actionOptions: actionOptions,
@@ -15,7 +15,6 @@ import CustomPopupContainer from '../components/CustomPopupContainer';
15
15
  import { CARD_GAP_PX, HOVER_CARD_Z_INDEX } from '../styled';
16
16
  import { ActionName, CardDisplay } from '../../../constants';
17
17
  import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAnalyticsContext';
18
- import { combineActionOptions } from '../../../utils/actions/combine-action-options';
19
18
  import { useSmartCardActions } from '../../../state/actions';
20
19
  import { useSmartLinkAnalytics } from '../../../state/analytics';
21
20
  var HOVER_CARD_SOURCE = 'smartLinkPreviewHoverCard';
@@ -33,9 +32,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
33
32
  canOpen = _ref$canOpen === void 0 ? true : _ref$canOpen,
34
33
  _ref$closeOnChildClic = _ref.closeOnChildClick,
35
34
  closeOnChildClick = _ref$closeOnChildClic === void 0 ? false : _ref$closeOnChildClic,
36
- _ref$hidePreviewButto = _ref.hidePreviewButton,
37
- hidePreviewButton = _ref$hidePreviewButto === void 0 ? false : _ref$hidePreviewButto,
38
- actionOptionsProp = _ref.actionOptions,
35
+ actionOptions = _ref.actionOptions,
39
36
  _ref$allowEventPropag = _ref.allowEventPropagation,
40
37
  allowEventPropagation = _ref$allowEventPropag === void 0 ? false : _ref$allowEventPropag,
41
38
  _ref$zIndex = _ref.zIndex,
@@ -59,10 +56,6 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
59
56
  var analytics = useSmartLinkAnalytics(url, id);
60
57
  var _useSmartCardActions = useSmartCardActions(id, url, analytics),
61
58
  loadMetadata = _useSmartCardActions.loadMetadata;
62
- var actionOptions = combineActionOptions({
63
- actionOptions: actionOptionsProp,
64
- hidePreviewButton: hidePreviewButton
65
- });
66
59
  var setMousePosition = useCallback(function (event) {
67
60
  if (isOpen && canOpen) {
68
61
  return;
@@ -11,7 +11,6 @@ export var flexibleUiOptions = {
11
11
  hideBackground: true,
12
12
  hideElevation: true,
13
13
  size: SmartLinkSize.Medium,
14
- hideHoverCardPreviewButton: false,
15
14
  zIndex: HOVER_CARD_Z_INDEX + 1
16
15
  };
17
16
  export var CARD_WIDTH_REM = 24;
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "29.4.0",
13
+ packageVersion: "30.0.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -133,10 +133,6 @@ export declare enum ActionName {
133
133
  FollowAction = "FollowAction",
134
134
  PreviewAction = "PreviewAction",
135
135
  AutomationAction = "AutomationAction",
136
- /**
137
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-8954 Internal documentation for deprecation (no external access)}
138
- */
139
- ViewAction = "ViewAction",
140
136
  DownloadAction = "DownloadAction",
141
137
  CustomAction = "CustomAction"
142
138
  }
@@ -2,7 +2,6 @@ import { type CardActionOptions, type CardPlatform } from '../../view/Card/types
2
2
  type CombineActionsOptions = {
3
3
  actionOptions?: CardActionOptions;
4
4
  platform?: CardPlatform;
5
- hidePreviewButton?: boolean;
6
5
  };
7
- export declare const combineActionOptions: ({ actionOptions, platform, hidePreviewButton, }: CombineActionsOptions) => CardActionOptions;
6
+ export declare const combineActionOptions: ({ actionOptions, platform, }: CombineActionsOptions) => CardActionOptions;
8
7
  export {};
@@ -161,13 +161,7 @@ export type BaseDataActionItem = {
161
161
  * renders a preview modal when clicked.
162
162
  */
163
163
  export type NamedDataActionItem = BaseDataActionItem & {
164
- name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction
165
- /**
166
- * To be removed once ActionName.ViewAction is retired
167
- * Currently left in to maintain backwards compatibility with public API
168
- * https://product-fabric.atlassian.net/browse/EDM-9665
169
- */
170
- | ActionName.ViewAction | ActionName.CopyLinkAction;
164
+ name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction | ActionName.CopyLinkAction;
171
165
  };
172
166
  /**
173
167
  * This represents an action that does not fetch data where Icon and Content are provided implicitly.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type HoverCardDelayProps } from './types';
3
- declare const HoverCardControl: ({ children, hideHoverCardPreviewButton, isHoverPreview, isAuthTooltip, actionOptions, testId, url, delay, hoverPreviewOptions, }: HoverCardDelayProps) => JSX.Element;
3
+ declare const HoverCardControl: ({ children, isHoverPreview, isAuthTooltip, actionOptions, testId, url, delay, hoverPreviewOptions, }: HoverCardDelayProps) => JSX.Element;
4
4
  export default HoverCardControl;
@@ -1,6 +1,6 @@
1
1
  import { type PropsWithChildren } from 'react';
2
2
  import { type ContainerProps } from '../types';
3
- export type HoverCardDelayProps = PropsWithChildren<Pick<ContainerProps, 'hideHoverCardPreviewButton' | 'actionOptions' | 'hoverPreviewOptions'> & {
3
+ export type HoverCardDelayProps = PropsWithChildren<Pick<ContainerProps, 'actionOptions' | 'hoverPreviewOptions'> & {
4
4
  isHoverPreview?: boolean;
5
5
  isAuthTooltip?: boolean;
6
6
  testId?: string;
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
10
10
  * @internal
11
11
  * @see Block
12
12
  */
13
- declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hideHoverCardPreviewButton, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
13
+ declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
14
14
  export default Container;
@@ -101,13 +101,6 @@ export type FlexibleUiOptions = {
101
101
  * Determines whether to hide elevation styling.
102
102
  */
103
103
  hideElevation?: boolean;
104
- /**
105
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-14817 Internal documentation for deprecation (no external access)}
106
- *
107
- * Prefer 'actionOptions' prop. Determines whether to hide hover preview's full screen view.
108
- * Only applies if showHoverPreview from FlexibleCardProps is true
109
- */
110
- hideHoverCardPreviewButton?: boolean;
111
104
  /**
112
105
  * Determines whether to hide css padding styling.
113
106
  */
@@ -1,3 +1,3 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import { type HoverCardComponentProps } from '../types';
3
- export declare const HoverCardComponent: ({ children, url, id, analyticsHandler, canOpen, closeOnChildClick, hidePreviewButton, actionOptions: actionOptionsProp, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
3
+ export declare const HoverCardComponent: ({ children, url, id, analyticsHandler, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
@@ -20,11 +20,6 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
20
20
  * React children component over which the hover card can be triggered.
21
21
  */
22
22
  children: ReactElement;
23
- /**
24
- * Function to be called when user is authorized to view a link.
25
- * @deprecated See EDM-7411
26
- */
27
- onAuthorize?: () => void;
28
23
  /**
29
24
  * Determines if the hover card is allowed to open. If changed from true to false while the
30
25
  * hover card is open, the hover card will be closed.
@@ -35,12 +30,6 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
35
30
  * clicked.
36
31
  */
37
32
  closeOnChildClick?: boolean;
38
- /**
39
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-14817 Internal documentation for deprecation (no external access)}
40
- *
41
- * Prefer 'actionOptions' prop. Determines if the hover card should display the "Open preview" button.
42
- */
43
- hidePreviewButton?: boolean;
44
33
  /**
45
34
  * Configure visibility of server and client actions
46
35
  */
@@ -133,10 +133,6 @@ export declare enum ActionName {
133
133
  FollowAction = "FollowAction",
134
134
  PreviewAction = "PreviewAction",
135
135
  AutomationAction = "AutomationAction",
136
- /**
137
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-8954 Internal documentation for deprecation (no external access)}
138
- */
139
- ViewAction = "ViewAction",
140
136
  DownloadAction = "DownloadAction",
141
137
  CustomAction = "CustomAction"
142
138
  }
@@ -2,7 +2,6 @@ import { type CardActionOptions, type CardPlatform } from '../../view/Card/types
2
2
  type CombineActionsOptions = {
3
3
  actionOptions?: CardActionOptions;
4
4
  platform?: CardPlatform;
5
- hidePreviewButton?: boolean;
6
5
  };
7
- export declare const combineActionOptions: ({ actionOptions, platform, hidePreviewButton, }: CombineActionsOptions) => CardActionOptions;
6
+ export declare const combineActionOptions: ({ actionOptions, platform, }: CombineActionsOptions) => CardActionOptions;
8
7
  export {};
@@ -161,13 +161,7 @@ export type BaseDataActionItem = {
161
161
  * renders a preview modal when clicked.
162
162
  */
163
163
  export type NamedDataActionItem = BaseDataActionItem & {
164
- name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction
165
- /**
166
- * To be removed once ActionName.ViewAction is retired
167
- * Currently left in to maintain backwards compatibility with public API
168
- * https://product-fabric.atlassian.net/browse/EDM-9665
169
- */
170
- | ActionName.ViewAction | ActionName.CopyLinkAction;
164
+ name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction | ActionName.CopyLinkAction;
171
165
  };
172
166
  /**
173
167
  * This represents an action that does not fetch data where Icon and Content are provided implicitly.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type HoverCardDelayProps } from './types';
3
- declare const HoverCardControl: ({ children, hideHoverCardPreviewButton, isHoverPreview, isAuthTooltip, actionOptions, testId, url, delay, hoverPreviewOptions, }: HoverCardDelayProps) => JSX.Element;
3
+ declare const HoverCardControl: ({ children, isHoverPreview, isAuthTooltip, actionOptions, testId, url, delay, hoverPreviewOptions, }: HoverCardDelayProps) => JSX.Element;
4
4
  export default HoverCardControl;
@@ -1,6 +1,6 @@
1
1
  import { type PropsWithChildren } from 'react';
2
2
  import { type ContainerProps } from '../types';
3
- export type HoverCardDelayProps = PropsWithChildren<Pick<ContainerProps, 'hideHoverCardPreviewButton' | 'actionOptions' | 'hoverPreviewOptions'> & {
3
+ export type HoverCardDelayProps = PropsWithChildren<Pick<ContainerProps, 'actionOptions' | 'hoverPreviewOptions'> & {
4
4
  isHoverPreview?: boolean;
5
5
  isAuthTooltip?: boolean;
6
6
  testId?: string;
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
10
10
  * @internal
11
11
  * @see Block
12
12
  */
13
- declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hideHoverCardPreviewButton, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
13
+ declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
14
14
  export default Container;
@@ -101,13 +101,6 @@ export type FlexibleUiOptions = {
101
101
  * Determines whether to hide elevation styling.
102
102
  */
103
103
  hideElevation?: boolean;
104
- /**
105
- * @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-14817 Internal documentation for deprecation (no external access)}
106
- *
107
- * Prefer 'actionOptions' prop. Determines whether to hide hover preview's full screen view.
108
- * Only applies if showHoverPreview from FlexibleCardProps is true
109
- */
110
- hideHoverCardPreviewButton?: boolean;
111
104
  /**
112
105
  * Determines whether to hide css padding styling.
113
106
  */
@@ -1,3 +1,3 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import { type HoverCardComponentProps } from '../types';
3
- export declare const HoverCardComponent: ({ children, url, id, analyticsHandler, canOpen, closeOnChildClick, hidePreviewButton, actionOptions: actionOptionsProp, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
3
+ export declare const HoverCardComponent: ({ children, url, id, analyticsHandler, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
@@ -20,11 +20,6 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
20
20
  * React children component over which the hover card can be triggered.
21
21
  */
22
22
  children: ReactElement;
23
- /**
24
- * Function to be called when user is authorized to view a link.
25
- * @deprecated See EDM-7411
26
- */
27
- onAuthorize?: () => void;
28
23
  /**
29
24
  * Determines if the hover card is allowed to open. If changed from true to false while the
30
25
  * hover card is open, the hover card will be closed.
@@ -35,12 +30,6 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
35
30
  * clicked.
36
31
  */
37
32
  closeOnChildClick?: boolean;
38
- /**
39
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-14817 Internal documentation for deprecation (no external access)}
40
- *
41
- * Prefer 'actionOptions' prop. Determines if the hover card should display the "Open preview" button.
42
- */
43
- hidePreviewButton?: boolean;
44
33
  /**
45
34
  * Configure visibility of server and client actions
46
35
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "29.4.0",
3
+ "version": "30.0.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"