@atlaskit/smart-card 32.7.9 → 32.7.10

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 (36) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/CardWithUrl/component.js +2 -2
  4. package/dist/cjs/view/CardWithUrl/loader.js +1 -1
  5. package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -1
  6. package/dist/cjs/view/FlexibleCard/index.js +2 -1
  7. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +4 -1
  8. package/dist/cjs/view/InlineCard/index.js +3 -1
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/es2019/utils/analytics/analytics.js +1 -1
  11. package/dist/es2019/view/CardWithUrl/component.js +2 -2
  12. package/dist/es2019/view/CardWithUrl/loader.js +1 -1
  13. package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -1
  14. package/dist/es2019/view/FlexibleCard/index.js +2 -1
  15. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +3 -1
  16. package/dist/es2019/view/InlineCard/index.js +3 -1
  17. package/dist/es2019/view/LinkUrl/index.js +1 -1
  18. package/dist/esm/utils/analytics/analytics.js +1 -1
  19. package/dist/esm/view/CardWithUrl/component.js +2 -2
  20. package/dist/esm/view/CardWithUrl/loader.js +1 -1
  21. package/dist/esm/view/FlexibleCard/components/container/index.js +2 -1
  22. package/dist/esm/view/FlexibleCard/index.js +2 -1
  23. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +4 -1
  24. package/dist/esm/view/InlineCard/index.js +3 -1
  25. package/dist/esm/view/LinkUrl/index.js +1 -1
  26. package/dist/types/view/Card/types.d.ts +1 -0
  27. package/dist/types/view/CardWithUrl/types.d.ts +3 -0
  28. package/dist/types/view/FlexibleCard/types.d.ts +1 -0
  29. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +7 -2
  30. package/dist/types/view/InlineCard/types.d.ts +3 -0
  31. package/dist/types-ts4.5/view/Card/types.d.ts +1 -0
  32. package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +3 -0
  33. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +1 -0
  34. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +7 -2
  35. package/dist/types-ts4.5/view/InlineCard/types.d.ts +3 -0
  36. package/package.json +4 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 32.7.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#177496](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177496)
8
+ [`1ca26bb289278`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1ca26bb289278) -
9
+ [ux] Deprecate showAuthToolTip
10
+
3
11
  ## 32.7.9
4
12
 
5
13
  ### Patch Changes
@@ -15,7 +15,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
15
15
  var context = exports.context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "32.7.9"
18
+ packageVersion: "32.7.10"
19
19
  };
20
20
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -214,7 +214,7 @@ function Component(_ref) {
214
214
  ui: ui,
215
215
  showHoverPreview: showHoverPreview,
216
216
  hoverPreviewOptions: hoverPreviewOptions,
217
- showAuthTooltip: showAuthTooltip,
217
+ showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
218
218
  actionOptions: actionOptions,
219
219
  url: url,
220
220
  testId: testId,
@@ -246,7 +246,7 @@ function Component(_ref) {
246
246
  inlinePreloaderStyle: inlinePreloaderStyle,
247
247
  showHoverPreview: showHoverPreview,
248
248
  hoverPreviewOptions: hoverPreviewOptions,
249
- showAuthTooltip: showAuthTooltip,
249
+ showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
250
250
  actionOptions: actionOptions,
251
251
  removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
252
252
  resolvingPlaceholder: resolvingPlaceholder,
@@ -155,7 +155,7 @@ function CardWithURLRenderer(props) {
155
155
  ui: ui,
156
156
  showHoverPreview: showHoverPreview,
157
157
  hoverPreviewOptions: hoverPreviewOptions,
158
- showAuthTooltip: showAuthTooltip,
158
+ showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
159
159
  placeholder: placeholder,
160
160
  removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
161
161
  resolvingPlaceholder: resolvingPlaceholder,
@@ -10,6 +10,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _react2 = require("@emotion/react");
12
12
  var _reactMagneticDi = require("react-magnetic-di");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _colors = require("@atlaskit/theme/colors");
14
15
  var _constants = require("../../../../constants");
15
16
  var _flexibleUiContext = require("../../../../state/flexible-ui-context");
@@ -202,7 +203,7 @@ var Container = function Container(_ref3) {
202
203
  var canShowHoverPreview = showHoverPreview && status === 'resolved';
203
204
  // `retry` object contains action that can be performed on
204
205
  // unresolved link (unauthorized, forbidden, not found, etc.)
205
- var canShowAuthTooltip = showAuthTooltip && status === 'unauthorized' && retry !== undefined;
206
+ var canShowAuthTooltip = ((0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip) && status === 'unauthorized' && retry !== undefined;
206
207
  var container = (0, _react2.jsx)("div", {
207
208
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
208
209
  css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
@@ -9,6 +9,7 @@ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
13
14
  var _constants = require("../../constants");
14
15
  var _flexibleUiContext = require("../../state/flexible-ui-context");
@@ -117,7 +118,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
117
118
  showHoverPreview: showHoverPreview,
118
119
  hoverPreviewOptions: hoverPreviewOptions,
119
120
  actionOptions: actionOptions,
120
- showAuthTooltip: showAuthTooltip,
121
+ showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
121
122
  status: status
122
123
  }), children))));
123
124
  };
@@ -10,6 +10,7 @@ var _react = _interopRequireDefault(require("react"));
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _button = _interopRequireDefault(require("@atlaskit/button"));
12
12
  var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _colors = require("@atlaskit/theme/colors");
14
15
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
15
16
  var _messages = require("../../../messages");
@@ -35,6 +36,8 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
35
36
  testId = _ref$testId === void 0 ? 'inline-card-unauthorized-view' : _ref$testId,
36
37
  _ref$showAuthTooltip = _ref.showAuthTooltip,
37
38
  showAuthTooltip = _ref$showAuthTooltip === void 0 ? false : _ref$showAuthTooltip,
39
+ _ref$showHoverPreview = _ref.showHoverPreview,
40
+ showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
38
41
  truncateInline = _ref.truncateInline,
39
42
  context = _ref.context;
40
43
  var frameRef = _react.default.useRef(null);
@@ -73,7 +76,7 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
73
76
  onClick: onClick,
74
77
  titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
75
78
  }), renderActionButton());
76
- if (onAuthorise && showAuthTooltip) {
79
+ if (onAuthorise && ((0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip)) {
77
80
  return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
78
81
  url: url,
79
82
  id: id
@@ -41,6 +41,7 @@ var _react = _interopRequireWildcard(require("react"));
41
41
  var _analyticsNext = require("@atlaskit/analytics-next");
42
42
  var _linkExtractors = require("@atlaskit/link-extractors");
43
43
  var _linkProvider = require("@atlaskit/link-provider");
44
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
44
45
  var _constants = require("../../constants");
45
46
  var _extractAccessContext = require("../../extractors/common/context/extractAccessContext");
46
47
  var _inline = require("../../extractors/inline");
@@ -145,7 +146,8 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref) {
145
146
  onClick: handleFrameClick,
146
147
  onAuthorise: handleAuthorize,
147
148
  testId: testIdWithStatus,
148
- showAuthTooltip: showAuthTooltip,
149
+ showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
150
+ showHoverPreview: showHoverPreview,
149
151
  id: id,
150
152
  analytics: analytics,
151
153
  extensionKey: extensionKey,
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "32.7.9",
23
+ packageVersion: "32.7.10",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -3,7 +3,7 @@ export const ANALYTICS_CHANNEL = 'media';
3
3
  export const context = {
4
4
  componentName: 'smart-cards',
5
5
  packageName: "@atlaskit/smart-card",
6
- packageVersion: "32.7.9"
6
+ packageVersion: "32.7.10"
7
7
  };
8
8
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
9
9
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -202,7 +202,7 @@ function Component({
202
202
  ui: ui,
203
203
  showHoverPreview: showHoverPreview,
204
204
  hoverPreviewOptions: hoverPreviewOptions,
205
- showAuthTooltip: showAuthTooltip,
205
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
206
206
  actionOptions: actionOptions,
207
207
  url: url,
208
208
  testId: testId,
@@ -234,7 +234,7 @@ function Component({
234
234
  inlinePreloaderStyle: inlinePreloaderStyle,
235
235
  showHoverPreview: showHoverPreview,
236
236
  hoverPreviewOptions: hoverPreviewOptions,
237
- showAuthTooltip: showAuthTooltip,
237
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
238
238
  actionOptions: actionOptions,
239
239
  removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
240
240
  resolvingPlaceholder: resolvingPlaceholder,
@@ -133,7 +133,7 @@ export function CardWithURLRenderer(props) {
133
133
  ui,
134
134
  showHoverPreview,
135
135
  hoverPreviewOptions,
136
- showAuthTooltip,
136
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
137
137
  placeholder,
138
138
  removeTextHighlightingFromTitle,
139
139
  resolvingPlaceholder,
@@ -7,6 +7,7 @@ import React, { useContext } from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { di } from 'react-magnetic-di';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { N40 } from '@atlaskit/theme/colors';
11
12
  import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
12
13
  import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
@@ -204,7 +205,7 @@ const Container = ({
204
205
  const canShowHoverPreview = showHoverPreview && status === 'resolved';
205
206
  // `retry` object contains action that can be performed on
206
207
  // unresolved link (unauthorized, forbidden, not found, etc.)
207
- const canShowAuthTooltip = showAuthTooltip && status === 'unauthorized' && retry !== undefined;
208
+ const canShowAuthTooltip = (fg('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip) && status === 'unauthorized' && retry !== undefined;
208
209
  const container = jsx("div", {
209
210
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
210
211
  css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect, useMemo } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
4
5
  import { SmartLinkStatus } from '../../constants';
5
6
  import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
@@ -108,7 +109,7 @@ const FlexibleCard = ({
108
109
  showHoverPreview: showHoverPreview,
109
110
  hoverPreviewOptions: hoverPreviewOptions,
110
111
  actionOptions: actionOptions,
111
- showAuthTooltip: showAuthTooltip,
112
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
112
113
  status: status
113
114
  }), children))));
114
115
  };
@@ -3,6 +3,7 @@ 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';
6
7
  import { N500, R400 } from '@atlaskit/theme/colors';
7
8
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
8
9
  import { messages } from '../../../messages';
@@ -26,6 +27,7 @@ export const InlineCardUnauthorizedView = ({
26
27
  isSelected,
27
28
  testId = 'inline-card-unauthorized-view',
28
29
  showAuthTooltip = false,
30
+ showHoverPreview = false,
29
31
  truncateInline,
30
32
  context
31
33
  }) => {
@@ -66,7 +68,7 @@ export const InlineCardUnauthorizedView = ({
66
68
  onClick: onClick,
67
69
  titleColor: `var(--ds-text-subtle, ${N500})`
68
70
  }), renderActionButton());
69
- if (onAuthorise && showAuthTooltip) {
71
+ if (onAuthorise && (fg('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip)) {
70
72
  return /*#__PURE__*/React.createElement(HoverCard, {
71
73
  url: url,
72
74
  id: id
@@ -3,6 +3,7 @@ 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';
6
7
  import { SmartLinkStatus } from '../../constants';
7
8
  import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
8
9
  import { extractInlineProps } from '../../extractors/inline';
@@ -110,7 +111,8 @@ export const InlineCard = ({
110
111
  onClick: handleFrameClick,
111
112
  onAuthorise: handleAuthorize,
112
113
  testId: testIdWithStatus,
113
- showAuthTooltip: showAuthTooltip,
114
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
115
+ showHoverPreview: showHoverPreview,
114
116
  id: id,
115
117
  analytics: analytics,
116
118
  extensionKey: extensionKey,
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "32.7.9",
13
+ packageVersion: "32.7.10",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -8,7 +8,7 @@ export var ANALYTICS_CHANNEL = 'media';
8
8
  export var context = {
9
9
  componentName: 'smart-cards',
10
10
  packageName: "@atlaskit/smart-card",
11
- packageVersion: "32.7.9"
11
+ packageVersion: "32.7.10"
12
12
  };
13
13
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
14
14
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -204,7 +204,7 @@ function Component(_ref) {
204
204
  ui: ui,
205
205
  showHoverPreview: showHoverPreview,
206
206
  hoverPreviewOptions: hoverPreviewOptions,
207
- showAuthTooltip: showAuthTooltip,
207
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
208
208
  actionOptions: actionOptions,
209
209
  url: url,
210
210
  testId: testId,
@@ -236,7 +236,7 @@ function Component(_ref) {
236
236
  inlinePreloaderStyle: inlinePreloaderStyle,
237
237
  showHoverPreview: showHoverPreview,
238
238
  hoverPreviewOptions: hoverPreviewOptions,
239
- showAuthTooltip: showAuthTooltip,
239
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
240
240
  actionOptions: actionOptions,
241
241
  removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
242
242
  resolvingPlaceholder: resolvingPlaceholder,
@@ -142,7 +142,7 @@ export function CardWithURLRenderer(props) {
142
142
  ui: ui,
143
143
  showHoverPreview: showHoverPreview,
144
144
  hoverPreviewOptions: hoverPreviewOptions,
145
- showAuthTooltip: showAuthTooltip,
145
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
146
146
  placeholder: placeholder,
147
147
  removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
148
148
  resolvingPlaceholder: resolvingPlaceholder,
@@ -9,6 +9,7 @@ import React, { useContext } from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { di } from 'react-magnetic-di';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { N40 } from '@atlaskit/theme/colors';
13
14
  import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
14
15
  import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
@@ -193,7 +194,7 @@ var Container = function Container(_ref3) {
193
194
  var canShowHoverPreview = showHoverPreview && status === 'resolved';
194
195
  // `retry` object contains action that can be performed on
195
196
  // unresolved link (unauthorized, forbidden, not found, etc.)
196
- var canShowAuthTooltip = showAuthTooltip && status === 'unauthorized' && retry !== undefined;
197
+ var canShowAuthTooltip = (fg('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip) && status === 'unauthorized' && retry !== undefined;
197
198
  var container = jsx("div", {
198
199
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
199
200
  css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
@@ -3,6 +3,7 @@ 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';
6
7
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
7
8
  import { SmartLinkStatus } from '../../constants';
8
9
  import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
@@ -108,7 +109,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
108
109
  showHoverPreview: showHoverPreview,
109
110
  hoverPreviewOptions: hoverPreviewOptions,
110
111
  actionOptions: actionOptions,
111
- showAuthTooltip: showAuthTooltip,
112
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
112
113
  status: status
113
114
  }), children))));
114
115
  };
@@ -3,6 +3,7 @@ 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';
6
7
  import { N500, R400 } from '@atlaskit/theme/colors';
7
8
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
8
9
  import { messages } from '../../../messages';
@@ -28,6 +29,8 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
28
29
  testId = _ref$testId === void 0 ? 'inline-card-unauthorized-view' : _ref$testId,
29
30
  _ref$showAuthTooltip = _ref.showAuthTooltip,
30
31
  showAuthTooltip = _ref$showAuthTooltip === void 0 ? false : _ref$showAuthTooltip,
32
+ _ref$showHoverPreview = _ref.showHoverPreview,
33
+ showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
31
34
  truncateInline = _ref.truncateInline,
32
35
  context = _ref.context;
33
36
  var frameRef = React.useRef(null);
@@ -66,7 +69,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
66
69
  onClick: onClick,
67
70
  titleColor: "var(--ds-text-subtle, ".concat(N500, ")")
68
71
  }), renderActionButton());
69
- if (onAuthorise && showAuthTooltip) {
72
+ if (onAuthorise && (fg('platform_deprecate-showauthtooltip-smart-card') ? showHoverPreview : showAuthTooltip)) {
70
73
  return /*#__PURE__*/React.createElement(HoverCard, {
71
74
  url: url,
72
75
  id: id
@@ -3,6 +3,7 @@ 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';
6
7
  import { SmartLinkStatus } from '../../constants';
7
8
  import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
8
9
  import { extractInlineProps } from '../../extractors/inline';
@@ -106,7 +107,8 @@ export var InlineCard = function InlineCard(_ref) {
106
107
  onClick: handleFrameClick,
107
108
  onAuthorise: handleAuthorize,
108
109
  testId: testIdWithStatus,
109
- showAuthTooltip: showAuthTooltip,
110
+ showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
111
+ showHoverPreview: showHoverPreview,
110
112
  id: id,
111
113
  analytics: analytics,
112
114
  extensionKey: extensionKey,
@@ -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: "32.7.9",
16
+ packageVersion: "32.7.10",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -50,6 +50,7 @@ interface HoverPreviewProps extends ActionProps {
50
50
  hoverPreviewOptions?: HoverPreviewOptions;
51
51
  /**
52
52
  * Flag to display unresolved views on hover preview.
53
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
53
54
  */
54
55
  showAuthTooltip?: boolean;
55
56
  }
@@ -27,6 +27,9 @@ export type CardWithUrlContentProps = {
27
27
  children?: React.ReactNode;
28
28
  showHoverPreview?: boolean;
29
29
  hoverPreviewOptions?: HoverPreviewOptions;
30
+ /**
31
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
32
+ */
30
33
  showAuthTooltip?: boolean;
31
34
  analyticsEvents?: AnalyticsFacade;
32
35
  placeholder?: string;
@@ -96,6 +96,7 @@ export type FlexibleCardProps = {
96
96
  /**
97
97
  * Determines whether to show an unauthorised view of the hover card
98
98
  * when a user hovers over a smartlink.
99
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
99
100
  */
100
101
  showAuthTooltip?: boolean;
101
102
  };
@@ -15,8 +15,13 @@ export interface InlineCardUnauthorizedViewProps {
15
15
  isSelected?: boolean;
16
16
  /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
17
17
  testId?: string;
18
- /** A flag that determines is a tooltip should show up on hover over the unauthorised link */
18
+ /**
19
+ * A flag that determines is a tooltip should show up on hover over the unauthorised link
20
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
21
+ */
19
22
  showAuthTooltip?: boolean;
23
+ /** Enables showing a custom preview on hover of link */
24
+ showHoverPreview?: boolean;
20
25
  /** A smart link id that may be used in analytics */
21
26
  id?: string;
22
27
  /** An AnalyticsFacade object used for calling analytics. */
@@ -26,4 +31,4 @@ export interface InlineCardUnauthorizedViewProps {
26
31
  /** Truncates the card to one line */
27
32
  truncateInline?: boolean;
28
33
  }
29
- export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showAuthTooltip, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
34
+ export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showAuthTooltip, showHoverPreview, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
@@ -23,6 +23,9 @@ export type InlineCardProps = {
23
23
  renderers?: CardProviderRenderers;
24
24
  showHoverPreview?: boolean;
25
25
  hoverPreviewOptions?: HoverPreviewOptions;
26
+ /**
27
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
28
+ */
26
29
  showAuthTooltip?: boolean;
27
30
  actionOptions?: CardActionOptions;
28
31
  analytics: AnalyticsFacade;
@@ -50,6 +50,7 @@ interface HoverPreviewProps extends ActionProps {
50
50
  hoverPreviewOptions?: HoverPreviewOptions;
51
51
  /**
52
52
  * Flag to display unresolved views on hover preview.
53
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
53
54
  */
54
55
  showAuthTooltip?: boolean;
55
56
  }
@@ -27,6 +27,9 @@ export type CardWithUrlContentProps = {
27
27
  children?: React.ReactNode;
28
28
  showHoverPreview?: boolean;
29
29
  hoverPreviewOptions?: HoverPreviewOptions;
30
+ /**
31
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
32
+ */
30
33
  showAuthTooltip?: boolean;
31
34
  analyticsEvents?: AnalyticsFacade;
32
35
  placeholder?: string;
@@ -96,6 +96,7 @@ export type FlexibleCardProps = {
96
96
  /**
97
97
  * Determines whether to show an unauthorised view of the hover card
98
98
  * when a user hovers over a smartlink.
99
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
99
100
  */
100
101
  showAuthTooltip?: boolean;
101
102
  };
@@ -15,8 +15,13 @@ export interface InlineCardUnauthorizedViewProps {
15
15
  isSelected?: boolean;
16
16
  /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
17
17
  testId?: string;
18
- /** A flag that determines is a tooltip should show up on hover over the unauthorised link */
18
+ /**
19
+ * A flag that determines is a tooltip should show up on hover over the unauthorised link
20
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
21
+ */
19
22
  showAuthTooltip?: boolean;
23
+ /** Enables showing a custom preview on hover of link */
24
+ showHoverPreview?: boolean;
20
25
  /** A smart link id that may be used in analytics */
21
26
  id?: string;
22
27
  /** An AnalyticsFacade object used for calling analytics. */
@@ -26,4 +31,4 @@ export interface InlineCardUnauthorizedViewProps {
26
31
  /** Truncates the card to one line */
27
32
  truncateInline?: boolean;
28
33
  }
29
- export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showAuthTooltip, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
34
+ export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showAuthTooltip, showHoverPreview, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
@@ -23,6 +23,9 @@ export type InlineCardProps = {
23
23
  renderers?: CardProviderRenderers;
24
24
  showHoverPreview?: boolean;
25
25
  hoverPreviewOptions?: HoverPreviewOptions;
26
+ /**
27
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
28
+ */
26
29
  showAuthTooltip?: boolean;
27
30
  actionOptions?: CardActionOptions;
28
31
  analytics: AnalyticsFacade;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "32.7.9",
3
+ "version": "32.7.10",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -171,6 +171,9 @@
171
171
  "linking_platform_show_lozenge_atlassian_state": {
172
172
  "type": "boolean"
173
173
  },
174
+ "platform_deprecate-showauthtooltip-smart-card": {
175
+ "type": "boolean"
176
+ },
174
177
  "smart_links_for_plans_platform": {
175
178
  "type": "boolean"
176
179
  },