@atlaskit/smart-card 27.20.2 → 28.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 (32) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/CardWithUrl/component.js +5 -5
  4. package/dist/cjs/view/CardWithUrl/loader.js +4 -2
  5. package/dist/cjs/view/InlineCard/ResolvingView/index.js +3 -2
  6. package/dist/cjs/view/InlineCard/index.js +4 -2
  7. package/dist/cjs/view/LinkUrl/index.js +1 -1
  8. package/dist/es2019/utils/analytics/analytics.js +1 -1
  9. package/dist/es2019/view/CardWithUrl/component.js +5 -5
  10. package/dist/es2019/view/CardWithUrl/loader.js +4 -2
  11. package/dist/es2019/view/InlineCard/ResolvingView/index.js +3 -2
  12. package/dist/es2019/view/InlineCard/index.js +4 -2
  13. package/dist/es2019/view/LinkUrl/index.js +1 -1
  14. package/dist/esm/utils/analytics/analytics.js +1 -1
  15. package/dist/esm/view/CardWithUrl/component.js +5 -5
  16. package/dist/esm/view/CardWithUrl/loader.js +4 -2
  17. package/dist/esm/view/InlineCard/ResolvingView/index.js +3 -2
  18. package/dist/esm/view/InlineCard/index.js +4 -2
  19. package/dist/esm/view/LinkUrl/index.js +1 -1
  20. package/dist/types/view/Card/index.d.ts +1 -1
  21. package/dist/types/view/Card/types.d.ts +4 -0
  22. package/dist/types/view/CardWithUrl/types.d.ts +1 -0
  23. package/dist/types/view/InlineCard/ResolvingView/index.d.ts +2 -0
  24. package/dist/types/view/InlineCard/index.d.ts +1 -1
  25. package/dist/types/view/InlineCard/types.d.ts +1 -0
  26. package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
  27. package/dist/types-ts4.5/view/Card/types.d.ts +4 -0
  28. package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
  29. package/dist/types-ts4.5/view/InlineCard/ResolvingView/index.d.ts +2 -0
  30. package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
  31. package/dist/types-ts4.5/view/InlineCard/types.d.ts +1 -0
  32. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 28.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#138322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138322)
8
+ [`578855218c959`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/578855218c959) - ####
9
+ What
10
+
11
+ Linking Platform are updating block smart cards to use flexible UI internally by default, and
12
+ deprecating the `enableFlexibleBlockCard` provider feature flag.
13
+
14
+ When upgrading you'll see some visual and minor content changes to the block cards where the
15
+ legacy block card was being used.
16
+
17
+ #### Why
18
+
19
+ A majority of adopters using block smart cards are already using flexible UI by using the
20
+ `enableFlexibleBlockCard` feature flag within `SmartCardProvider`. There are very few use cases
21
+ where using the legacy block card is still required and our goal is to completely remove the
22
+ legacy block card.
23
+
24
+ #### How to upgrade
25
+
26
+ Upgrade the smart-card dependency to the latest major version. If breaking changes are introduced,
27
+ there is a `useLegacyBlockCard` prop to allow existing usages of the standalone block card to
28
+ persist the legacy version. Linking Platform discourage the use of the prop, please reach out to
29
+ #help-linking-platform for further help if its use is required.
30
+
31
+ ## 27.21.0
32
+
33
+ ### Minor Changes
34
+
35
+ - [#137752](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137752)
36
+ [`4f651813d3319`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4f651813d3319) -
37
+ Added resolvingPlaceholder prop to allow for truncation of titles when smart cards are resolving
38
+
3
39
  ## 27.20.2
4
40
 
5
41
  ### Patch Changes
@@ -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: "27.20.2"
25
+ packageVersion: "28.0.0"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.CardWithUrlContent = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
- var _linkProvider = require("@atlaskit/link-provider");
12
11
  var _modal = require("../../state/modal");
13
12
  var _utils = require("../../utils");
14
13
  var measure = _interopRequireWildcard(require("../../utils/performance"));
@@ -53,7 +52,8 @@ function Component(_ref) {
53
52
  showAuthTooltip = _ref.showAuthTooltip,
54
53
  analyticsEvents = _ref.analyticsEvents,
55
54
  useLegacyBlockCard = _ref.useLegacyBlockCard,
56
- removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle;
55
+ removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
56
+ resolvingPlaceholder = _ref.resolvingPlaceholder;
57
57
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
58
58
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
59
59
 
@@ -76,7 +76,6 @@ function Component(_ref) {
76
76
  var isFlexibleUi = (0, _react.useMemo)(function () {
77
77
  return (0, _flexible.isFlexibleUiCard)(children);
78
78
  }, [children]);
79
- var enableFlexibleBlockCardFlag = Boolean((0, _linkProvider.useFeatureFlag)('enableFlexibleBlockCard'));
80
79
  var actionOptions = (0, _combineActionOptions.combineActionOptions)(actionOptionsProp, showServerActions, showActions, platform);
81
80
  var frameStyle = (0, _utils.combineFrameStyle)(frameStyleProp, isFrameVisible);
82
81
 
@@ -235,7 +234,8 @@ function Component(_ref) {
235
234
  hoverPreviewOptions: hoverPreviewOptions,
236
235
  showAuthTooltip: showAuthTooltip,
237
236
  actionOptions: actionOptions,
238
- removeTextHighlightingFromTitle: removeTextHighlightingFromTitle
237
+ removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
238
+ resolvingPlaceholder: resolvingPlaceholder
239
239
  });
240
240
  case 'block':
241
241
  return /*#__PURE__*/_react.default.createElement(_BlockCard.BlockCard, {
@@ -255,7 +255,7 @@ function Component(_ref) {
255
255
  testId: testId,
256
256
  actionOptions: actionOptions,
257
257
  platform: platform,
258
- enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
258
+ enableFlexibleBlockCard: useLegacyBlockCard !== true
259
259
  });
260
260
  case 'embed':
261
261
  return /*#__PURE__*/_react.default.createElement(_EmbedCard.EmbedCard, {
@@ -67,7 +67,8 @@ function CardWithURLRenderer(props) {
67
67
  placeholder = props.placeholder,
68
68
  fallbackComponent = props.fallbackComponent,
69
69
  useLegacyBlockCard = props.useLegacyBlockCard,
70
- removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle;
70
+ removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
71
+ resolvingPlaceholder = props.resolvingPlaceholder;
71
72
  var analytics = (0, _analytics.useSmartLinkAnalytics)(url !== null && url !== void 0 ? url : '', undefined, id);
72
73
  var isFlexibleUi = (0, _flexible.isFlexibleUiCard)(children);
73
74
  var errorHandler = (0, _react.useCallback)(function (error, info) {
@@ -138,7 +139,8 @@ function CardWithURLRenderer(props) {
138
139
  analyticsEvents: analyticsEvents,
139
140
  placeholder: placeholder,
140
141
  useLegacyBlockCard: useLegacyBlockCard,
141
- removeTextHighlightingFromTitle: removeTextHighlightingFromTitle
142
+ removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
143
+ resolvingPlaceholder: resolvingPlaceholder
142
144
  };
143
145
  return /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
144
146
  FallbackComponent: ErrorFallback,
@@ -35,7 +35,8 @@ var InlineCardResolvingView = exports.InlineCardResolvingView = /*#__PURE__*/fun
35
35
  inlinePreloaderStyle = _this$props.inlinePreloaderStyle,
36
36
  _this$props$testId = _this$props.testId,
37
37
  testId = _this$props$testId === void 0 ? 'inline-card-resolving-view' : _this$props$testId,
38
- titleTextColor = _this$props.titleTextColor;
38
+ titleTextColor = _this$props.titleTextColor,
39
+ resolvingPlaceholder = _this$props.resolvingPlaceholder;
39
40
  if (inlinePreloaderStyle === 'on-right-without-skeleton') {
40
41
  return /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
41
42
  withoutBackground: true,
@@ -54,7 +55,7 @@ var InlineCardResolvingView = exports.InlineCardResolvingView = /*#__PURE__*/fun
54
55
  isSelected: isSelected,
55
56
  link: url
56
57
  }, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
57
- title: url,
58
+ title: resolvingPlaceholder !== null && resolvingPlaceholder !== void 0 ? resolvingPlaceholder : url,
58
59
  titleTextColor: titleTextColor
59
60
  }, /*#__PURE__*/_react.default.createElement(_styled.SpinnerWrapper, {
60
61
  className: "inline-resolving-spinner"
@@ -73,7 +73,8 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref) {
73
73
  hoverPreviewOptions = _ref.hoverPreviewOptions,
74
74
  showAuthTooltip = _ref.showAuthTooltip,
75
75
  actionOptions = _ref.actionOptions,
76
- removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle;
76
+ removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
77
+ resolvingPlaceholder = _ref.resolvingPlaceholder;
77
78
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
78
79
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
79
80
  var status = cardState.status,
@@ -116,7 +117,8 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref) {
116
117
  isSelected: isSelected,
117
118
  onClick: handleFrameClick,
118
119
  testId: testIdWithStatus,
119
- inlinePreloaderStyle: inlinePreloaderStyle
120
+ inlinePreloaderStyle: inlinePreloaderStyle,
121
+ resolvingPlaceholder: resolvingPlaceholder
120
122
  });
121
123
  case 'resolved':
122
124
  return /*#__PURE__*/_react.default.createElement(_ResolvedView.InlineCardResolvedView, (0, _extends2.default)({}, resolvedProps, {
@@ -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: "27.20.2",
20
+ packageVersion: "28.0.0",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -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: "27.20.2"
7
+ packageVersion: "28.0.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useCallback, useMemo } from 'react';
2
2
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
- import { useFeatureFlag } from '@atlaskit/link-provider';
4
3
  import { SmartLinkModalProvider } from '../../state/modal';
5
4
  import { combineFrameStyle, isSpecialEvent } from '../../utils';
6
5
  import * as measure from '../../utils/performance';
@@ -43,7 +42,8 @@ function Component({
43
42
  showAuthTooltip,
44
43
  analyticsEvents,
45
44
  useLegacyBlockCard,
46
- removeTextHighlightingFromTitle
45
+ removeTextHighlightingFromTitle,
46
+ resolvingPlaceholder
47
47
  }) {
48
48
  const {
49
49
  createAnalyticsEvent
@@ -67,7 +67,6 @@ function Component({
67
67
  const services = getServices(state.details);
68
68
  const canBeDatasource = getCanBeDatasource(state.details);
69
69
  let isFlexibleUi = useMemo(() => isFlexibleUiCard(children), [children]);
70
- const enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard'));
71
70
  const actionOptions = combineActionOptions(actionOptionsProp, showServerActions, showActions, platform);
72
71
  const frameStyle = combineFrameStyle(frameStyleProp, isFrameVisible);
73
72
 
@@ -222,7 +221,8 @@ function Component({
222
221
  hoverPreviewOptions: hoverPreviewOptions,
223
222
  showAuthTooltip: showAuthTooltip,
224
223
  actionOptions: actionOptions,
225
- removeTextHighlightingFromTitle: removeTextHighlightingFromTitle
224
+ removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
225
+ resolvingPlaceholder: resolvingPlaceholder
226
226
  });
227
227
  case 'block':
228
228
  return /*#__PURE__*/React.createElement(BlockCard, {
@@ -242,7 +242,7 @@ function Component({
242
242
  testId: testId,
243
243
  actionOptions: actionOptions,
244
244
  platform: platform,
245
- enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
245
+ enableFlexibleBlockCard: useLegacyBlockCard !== true
246
246
  });
247
247
  case 'embed':
248
248
  return /*#__PURE__*/React.createElement(EmbedCard, {
@@ -46,7 +46,8 @@ export function CardWithURLRenderer(props) {
46
46
  placeholder,
47
47
  fallbackComponent,
48
48
  useLegacyBlockCard,
49
- removeTextHighlightingFromTitle
49
+ removeTextHighlightingFromTitle,
50
+ resolvingPlaceholder
50
51
  } = props;
51
52
  const analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', undefined, id);
52
53
  const isFlexibleUi = isFlexibleUiCard(children);
@@ -116,7 +117,8 @@ export function CardWithURLRenderer(props) {
116
117
  analyticsEvents,
117
118
  placeholder,
118
119
  useLegacyBlockCard,
119
- removeTextHighlightingFromTitle
120
+ removeTextHighlightingFromTitle,
121
+ resolvingPlaceholder
120
122
  };
121
123
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
122
124
  FallbackComponent: ErrorFallback,
@@ -12,7 +12,8 @@ export class InlineCardResolvingView extends React.Component {
12
12
  isSelected,
13
13
  inlinePreloaderStyle,
14
14
  testId = 'inline-card-resolving-view',
15
- titleTextColor
15
+ titleTextColor,
16
+ resolvingPlaceholder
16
17
  } = this.props;
17
18
  if (inlinePreloaderStyle === 'on-right-without-skeleton') {
18
19
  return /*#__PURE__*/React.createElement(Frame, {
@@ -32,7 +33,7 @@ export class InlineCardResolvingView extends React.Component {
32
33
  isSelected: isSelected,
33
34
  link: url
34
35
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
35
- title: url,
36
+ title: resolvingPlaceholder !== null && resolvingPlaceholder !== void 0 ? resolvingPlaceholder : url,
36
37
  titleTextColor: titleTextColor
37
38
  }, /*#__PURE__*/React.createElement(SpinnerWrapper, {
38
39
  className: "inline-resolving-spinner"
@@ -33,7 +33,8 @@ export const InlineCard = ({
33
33
  hoverPreviewOptions,
34
34
  showAuthTooltip,
35
35
  actionOptions,
36
- removeTextHighlightingFromTitle
36
+ removeTextHighlightingFromTitle,
37
+ resolvingPlaceholder
37
38
  }) => {
38
39
  var _details$meta, _providerForbidden$te;
39
40
  const {
@@ -81,7 +82,8 @@ export const InlineCard = ({
81
82
  isSelected: isSelected,
82
83
  onClick: handleFrameClick,
83
84
  testId: testIdWithStatus,
84
- inlinePreloaderStyle: inlinePreloaderStyle
85
+ inlinePreloaderStyle: inlinePreloaderStyle,
86
+ resolvingPlaceholder: resolvingPlaceholder
85
87
  });
86
88
  case 'resolved':
87
89
  return /*#__PURE__*/React.createElement(InlineCardResolvedView, _extends({}, resolvedProps, {
@@ -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: "27.20.2",
10
+ packageVersion: "28.0.0",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -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: "27.20.2"
18
+ packageVersion: "28.0.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useCallback, useMemo } from 'react';
2
2
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
- import { useFeatureFlag } from '@atlaskit/link-provider';
4
3
  import { SmartLinkModalProvider } from '../../state/modal';
5
4
  import { combineFrameStyle, isSpecialEvent } from '../../utils';
6
5
  import * as measure from '../../utils/performance';
@@ -43,7 +42,8 @@ function Component(_ref) {
43
42
  showAuthTooltip = _ref.showAuthTooltip,
44
43
  analyticsEvents = _ref.analyticsEvents,
45
44
  useLegacyBlockCard = _ref.useLegacyBlockCard,
46
- removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle;
45
+ removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
46
+ resolvingPlaceholder = _ref.resolvingPlaceholder;
47
47
  var _useAnalyticsEvents = useAnalyticsEvents(),
48
48
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
49
49
 
@@ -66,7 +66,6 @@ function Component(_ref) {
66
66
  var isFlexibleUi = useMemo(function () {
67
67
  return isFlexibleUiCard(children);
68
68
  }, [children]);
69
- var enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard'));
70
69
  var actionOptions = combineActionOptions(actionOptionsProp, showServerActions, showActions, platform);
71
70
  var frameStyle = combineFrameStyle(frameStyleProp, isFrameVisible);
72
71
 
@@ -225,7 +224,8 @@ function Component(_ref) {
225
224
  hoverPreviewOptions: hoverPreviewOptions,
226
225
  showAuthTooltip: showAuthTooltip,
227
226
  actionOptions: actionOptions,
228
- removeTextHighlightingFromTitle: removeTextHighlightingFromTitle
227
+ removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
228
+ resolvingPlaceholder: resolvingPlaceholder
229
229
  });
230
230
  case 'block':
231
231
  return /*#__PURE__*/React.createElement(BlockCard, {
@@ -245,7 +245,7 @@ function Component(_ref) {
245
245
  testId: testId,
246
246
  actionOptions: actionOptions,
247
247
  platform: platform,
248
- enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
248
+ enableFlexibleBlockCard: useLegacyBlockCard !== true
249
249
  });
250
250
  case 'embed':
251
251
  return /*#__PURE__*/React.createElement(EmbedCard, {
@@ -54,7 +54,8 @@ export function CardWithURLRenderer(props) {
54
54
  placeholder = props.placeholder,
55
55
  fallbackComponent = props.fallbackComponent,
56
56
  useLegacyBlockCard = props.useLegacyBlockCard,
57
- removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle;
57
+ removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
58
+ resolvingPlaceholder = props.resolvingPlaceholder;
58
59
  var analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', undefined, id);
59
60
  var isFlexibleUi = isFlexibleUiCard(children);
60
61
  var errorHandler = useCallback(function (error, info) {
@@ -125,7 +126,8 @@ export function CardWithURLRenderer(props) {
125
126
  analyticsEvents: analyticsEvents,
126
127
  placeholder: placeholder,
127
128
  useLegacyBlockCard: useLegacyBlockCard,
128
- removeTextHighlightingFromTitle: removeTextHighlightingFromTitle
129
+ removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
130
+ resolvingPlaceholder: resolvingPlaceholder
129
131
  };
130
132
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
131
133
  FallbackComponent: ErrorFallback,
@@ -28,7 +28,8 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
28
28
  inlinePreloaderStyle = _this$props.inlinePreloaderStyle,
29
29
  _this$props$testId = _this$props.testId,
30
30
  testId = _this$props$testId === void 0 ? 'inline-card-resolving-view' : _this$props$testId,
31
- titleTextColor = _this$props.titleTextColor;
31
+ titleTextColor = _this$props.titleTextColor,
32
+ resolvingPlaceholder = _this$props.resolvingPlaceholder;
32
33
  if (inlinePreloaderStyle === 'on-right-without-skeleton') {
33
34
  return /*#__PURE__*/React.createElement(Frame, {
34
35
  withoutBackground: true,
@@ -47,7 +48,7 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
47
48
  isSelected: isSelected,
48
49
  link: url
49
50
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
50
- title: url,
51
+ title: resolvingPlaceholder !== null && resolvingPlaceholder !== void 0 ? resolvingPlaceholder : url,
51
52
  titleTextColor: titleTextColor
52
53
  }, /*#__PURE__*/React.createElement(SpinnerWrapper, {
53
54
  className: "inline-resolving-spinner"
@@ -34,7 +34,8 @@ export var InlineCard = function InlineCard(_ref) {
34
34
  hoverPreviewOptions = _ref.hoverPreviewOptions,
35
35
  showAuthTooltip = _ref.showAuthTooltip,
36
36
  actionOptions = _ref.actionOptions,
37
- removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle;
37
+ removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
38
+ resolvingPlaceholder = _ref.resolvingPlaceholder;
38
39
  var _useAnalyticsEvents = useAnalyticsEvents(),
39
40
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
40
41
  var status = cardState.status,
@@ -77,7 +78,8 @@ export var InlineCard = function InlineCard(_ref) {
77
78
  isSelected: isSelected,
78
79
  onClick: handleFrameClick,
79
80
  testId: testIdWithStatus,
80
- inlinePreloaderStyle: inlinePreloaderStyle
81
+ inlinePreloaderStyle: inlinePreloaderStyle,
82
+ resolvingPlaceholder: resolvingPlaceholder
81
83
  });
82
84
  case 'resolved':
83
85
  return /*#__PURE__*/React.createElement(InlineCardResolvedView, _extends({}, resolvedProps, {
@@ -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: "27.20.2",
13
+ packageVersion: "28.0.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type CardAppearance, type CardPlatform, type CardProps } from './types';
3
3
  import { type WrappedComponentProps } from 'react-intl-next';
4
- export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "removeTextHighlightingFromTitle" | "forwardedRef"> & React.RefAttributes<any>>;
4
+ export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "forwardedRef"> & React.RefAttributes<any>>;
5
5
  export type { CardAppearance, CardProps, CardPlatform };
@@ -119,4 +119,8 @@ export interface CardProps extends WithAnalyticsEventsProps {
119
119
  * For example, when set to true: "my name | :~:text=highlight this" will be displayed as "my name"
120
120
  */
121
121
  removeTextHighlightingFromTitle?: boolean;
122
+ /**
123
+ * When defined, this placeholder will be displayed while the smart card is resolving. This is only useful for inline cards.
124
+ */
125
+ resolvingPlaceholder?: string;
122
126
  }
@@ -51,4 +51,5 @@ export type CardWithUrlContentProps = {
51
51
  placeholder?: string;
52
52
  useLegacyBlockCard?: boolean;
53
53
  removeTextHighlightingFromTitle?: boolean;
54
+ resolvingPlaceholder?: string;
54
55
  };
@@ -11,6 +11,8 @@ export interface InlineCardResolvingViewProps {
11
11
  /** 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 */
12
12
  testId?: string;
13
13
  titleTextColor?: string;
14
+ /** An optional placeholder displayed while the smart card is resolving. */
15
+ resolvingPlaceholder?: string;
14
16
  }
15
17
  export declare class InlineCardResolvingView extends React.Component<InlineCardResolvingViewProps> {
16
18
  render(): JSX.Element;
@@ -6,4 +6,4 @@ import { InlineCardResolvedView } from './ResolvedView';
6
6
  import { InlineCardResolvingView } from './ResolvingView';
7
7
  import { InlineCardUnauthorizedView } from './UnauthorisedView';
8
8
  export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView, };
9
- export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, showAuthTooltip, actionOptions, removeTextHighlightingFromTitle, }: InlineCardProps) => JSX.Element;
9
+ export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, showAuthTooltip, actionOptions, removeTextHighlightingFromTitle, resolvingPlaceholder, }: InlineCardProps) => JSX.Element;
@@ -27,4 +27,5 @@ export type InlineCardProps = {
27
27
  actionOptions?: CardActionOptions;
28
28
  analytics: AnalyticsFacade;
29
29
  removeTextHighlightingFromTitle?: boolean;
30
+ resolvingPlaceholder?: string;
30
31
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type CardAppearance, type CardPlatform, type CardProps } from './types';
3
3
  import { type WrappedComponentProps } from 'react-intl-next';
4
- export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "removeTextHighlightingFromTitle" | "forwardedRef"> & React.RefAttributes<any>>;
4
+ export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "appearance" | "container" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "hoverPreviewOptions" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "forwardedRef"> & React.RefAttributes<any>>;
5
5
  export type { CardAppearance, CardProps, CardPlatform };
@@ -119,4 +119,8 @@ export interface CardProps extends WithAnalyticsEventsProps {
119
119
  * For example, when set to true: "my name | :~:text=highlight this" will be displayed as "my name"
120
120
  */
121
121
  removeTextHighlightingFromTitle?: boolean;
122
+ /**
123
+ * When defined, this placeholder will be displayed while the smart card is resolving. This is only useful for inline cards.
124
+ */
125
+ resolvingPlaceholder?: string;
122
126
  }
@@ -51,4 +51,5 @@ export type CardWithUrlContentProps = {
51
51
  placeholder?: string;
52
52
  useLegacyBlockCard?: boolean;
53
53
  removeTextHighlightingFromTitle?: boolean;
54
+ resolvingPlaceholder?: string;
54
55
  };
@@ -11,6 +11,8 @@ export interface InlineCardResolvingViewProps {
11
11
  /** 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 */
12
12
  testId?: string;
13
13
  titleTextColor?: string;
14
+ /** An optional placeholder displayed while the smart card is resolving. */
15
+ resolvingPlaceholder?: string;
14
16
  }
15
17
  export declare class InlineCardResolvingView extends React.Component<InlineCardResolvingViewProps> {
16
18
  render(): JSX.Element;
@@ -6,4 +6,4 @@ import { InlineCardResolvedView } from './ResolvedView';
6
6
  import { InlineCardResolvingView } from './ResolvingView';
7
7
  import { InlineCardUnauthorizedView } from './UnauthorisedView';
8
8
  export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView, };
9
- export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, showAuthTooltip, actionOptions, removeTextHighlightingFromTitle, }: InlineCardProps) => JSX.Element;
9
+ export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, showAuthTooltip, actionOptions, removeTextHighlightingFromTitle, resolvingPlaceholder, }: InlineCardProps) => JSX.Element;
@@ -27,4 +27,5 @@ export type InlineCardProps = {
27
27
  actionOptions?: CardActionOptions;
28
28
  analytics: AnalyticsFacade;
29
29
  removeTextHighlightingFromTitle?: boolean;
30
+ resolvingPlaceholder?: string;
30
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "27.20.2",
3
+ "version": "28.0.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/form": "^10.5.0",
37
37
  "@atlaskit/frontend-utilities": "^2.7.0",
38
38
  "@atlaskit/heading": "^2.4.0",
39
- "@atlaskit/icon": "^22.15.0",
39
+ "@atlaskit/icon": "^22.16.0",
40
40
  "@atlaskit/icon-file-type": "^6.5.0",
41
41
  "@atlaskit/icon-object": "^6.5.0",
42
42
  "@atlaskit/icon-priority": "^6.3.0",