@atlaskit/smart-card 26.5.7 → 26.5.9

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 (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +2 -5
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/cjs/view/CardWithUrl/component.js +10 -5
  5. package/dist/cjs/view/FlexibleCard/components/container/index.js +3 -1
  6. package/dist/cjs/view/FlexibleCard/index.js +2 -0
  7. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -1
  8. package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +2 -5
  9. package/dist/es2019/version.json +1 -1
  10. package/dist/es2019/view/CardWithUrl/component.js +12 -5
  11. package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -1
  12. package/dist/es2019/view/FlexibleCard/index.js +2 -0
  13. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -1
  14. package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +2 -5
  15. package/dist/esm/version.json +1 -1
  16. package/dist/esm/view/CardWithUrl/component.js +10 -5
  17. package/dist/esm/view/FlexibleCard/components/container/index.js +3 -1
  18. package/dist/esm/view/FlexibleCard/index.js +2 -0
  19. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -1
  20. package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -2
  21. package/dist/types/view/Card/index.d.ts +1 -1
  22. package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
  23. package/dist/types/view/FlexibleCard/types.d.ts +5 -0
  24. package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -2
  25. package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
  26. package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +1 -1
  27. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +5 -0
  28. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.5.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d394a5db254`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d394a5db254) - Fixes display analytics attribute provided by analytics context when the apperance is flexible
8
+
9
+ ## 26.5.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [`27f4aa34132`](https://bitbucket.org/atlassian/atlassian-frontend/commits/27f4aa34132) - [ux] Fix for Hover Card in Flexible UI links: it will show only supported states, such as resolved and unauthorized based on the corresponding featureFlag ('showHoverPreview' and 'showAuthTooltip')
14
+
3
15
  ## 26.5.7
4
16
 
5
17
  ### Patch Changes
@@ -9,8 +9,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
11
  var _resolvedAttributes = require("@atlaskit/link-analytics/resolved-attributes");
12
- var _flexible = require("../flexible");
13
- var _constants = require("../../constants");
14
12
  var _store = require("../../state/store");
15
13
  var _LinkAnalyticsContext = require("./LinkAnalyticsContext");
16
14
  /**
@@ -19,15 +17,14 @@ var _LinkAnalyticsContext = require("./LinkAnalyticsContext");
19
17
  */
20
18
  var SmartLinkAnalyticsContext = function SmartLinkAnalyticsContext(props) {
21
19
  var children = props.children,
22
- appearance = props.appearance,
23
- url = props.url;
20
+ url = props.url,
21
+ display = props.display;
24
22
  var _useSmartLinkState = (0, _store.useSmartCardState)(url),
25
23
  details = _useSmartLinkState.details,
26
24
  status = _useSmartLinkState.status;
27
25
  var attributes = (0, _resolvedAttributes.getResolvedAttributes)({
28
26
  url: url
29
27
  }, details, status);
30
- var display = (0, _flexible.isFlexibleUiCard)(children) ? _constants.CardDisplay.Flexible : appearance;
31
28
  return /*#__PURE__*/_react.default.createElement(_LinkAnalyticsContext.LinkAnalyticsContext, (0, _extends2.default)({}, props, {
32
29
  display: display
33
30
  }), /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.5.7",
3
+ "version": "26.5.9",
4
4
  "sideEffects": false
5
5
  }
@@ -192,6 +192,7 @@ function Component(_ref) {
192
192
  renderers: renderers,
193
193
  ui: ui,
194
194
  showHoverPreview: showHoverPreview,
195
+ showAuthTooltip: showAuthTooltipProp,
195
196
  showServerActions: showServerActions,
196
197
  url: url,
197
198
  testId: testId,
@@ -272,10 +273,14 @@ function Component(_ref) {
272
273
  }
273
274
  }
274
275
  var CardWithUrlContent = function CardWithUrlContent(props) {
275
- return (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-analytics-context') ? /*#__PURE__*/_react.default.createElement(_SmartLinkAnalyticsContext.SmartLinkAnalyticsContext, {
276
- url: props.url,
277
- appearance: props.appearance,
278
- id: props.id
279
- }, /*#__PURE__*/_react.default.createElement(Component, props)) : /*#__PURE__*/_react.default.createElement(Component, props);
276
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-analytics-context')) {
277
+ var display = (0, _flexible.isFlexibleUiCard)(props.children) ? _constants.CardDisplay.Flexible : props.appearance;
278
+ return /*#__PURE__*/_react.default.createElement(_SmartLinkAnalyticsContext.SmartLinkAnalyticsContext, {
279
+ url: props.url,
280
+ id: props.id,
281
+ display: display
282
+ }, /*#__PURE__*/_react.default.createElement(Component, props));
283
+ }
284
+ return /*#__PURE__*/_react.default.createElement(Component, props);
280
285
  };
281
286
  exports.CardWithUrlContent = CardWithUrlContent;
@@ -158,6 +158,8 @@ var Container = function Container(_ref3) {
158
158
  hidePadding = _ref3$hidePadding === void 0 ? false : _ref3$hidePadding,
159
159
  onClick = _ref3.onClick,
160
160
  retry = _ref3.retry,
161
+ _ref3$showAuthTooltip = _ref3.showAuthTooltip,
162
+ showAuthTooltip = _ref3$showAuthTooltip === void 0 ? false : _ref3$showAuthTooltip,
161
163
  _ref3$showHoverPrevie = _ref3.showHoverPreview,
162
164
  showHoverPreview = _ref3$showHoverPrevie === void 0 ? false : _ref3$showHoverPrevie,
163
165
  _ref3$showServerActio = _ref3.showServerActions,
@@ -183,7 +185,7 @@ var Container = function Container(_ref3) {
183
185
  "data-smart-link-container": true,
184
186
  "data-testid": testId
185
187
  }, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick, showHoverPreview ? onActionMenuOpenChange : undefined));
186
- if (showHoverPreview && context !== null && context !== void 0 && context.url) {
188
+ if (context !== null && context !== void 0 && context.url && (showHoverPreview && status === 'resolved' || showAuthTooltip && status === 'unauthorized')) {
187
189
  return (0, _react2.jsx)(_HoverCard.HoverCard, {
188
190
  url: context === null || context === void 0 ? void 0 : context.url,
189
191
  canOpen: hoverCardCanOpen,
@@ -31,6 +31,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
31
31
  onError = _ref.onError,
32
32
  onResolve = _ref.onResolve,
33
33
  renderers = _ref.renderers,
34
+ showAuthTooltip = _ref.showAuthTooltip,
34
35
  showHoverPreview = _ref.showHoverPreview,
35
36
  showServerActions = _ref.showServerActions,
36
37
  testId = _ref.testId,
@@ -96,6 +97,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
96
97
  retry: retry,
97
98
  showHoverPreview: showHoverPreview,
98
99
  showServerActions: showServerActions,
100
+ showAuthTooltip: showAuthTooltip,
99
101
  status: status
100
102
  }), children))));
101
103
  };
@@ -166,7 +166,7 @@ var HoverCardComponent = function HoverCardComponent(_ref) {
166
166
  });
167
167
  return (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-analytics-context') ? (0, _react.jsx)(_SmartLinkAnalyticsContext.SmartLinkAnalyticsContext, {
168
168
  url: url,
169
- appearance: _constants.CardDisplay.HoverCardPreview,
169
+ display: _constants.CardDisplay.HoverCardPreview,
170
170
  id: id,
171
171
  source: HOVER_CARD_SOURCE
172
172
  }, (0, _react.jsx)(_HoverCardContent.default, hoverCardContentProps)) : (0, _react.jsx)(_HoverCardContent.default, hoverCardContentProps);
@@ -2,8 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { AnalyticsContext } from '@atlaskit/analytics-next';
4
4
  import { getResolvedAttributes } from '@atlaskit/link-analytics/resolved-attributes';
5
- import { isFlexibleUiCard } from '../flexible';
6
- import { CardDisplay } from '../../constants';
7
5
  import { useSmartCardState as useSmartLinkState } from '../../state/store';
8
6
  import { LinkAnalyticsContext } from './LinkAnalyticsContext';
9
7
  /**
@@ -13,8 +11,8 @@ import { LinkAnalyticsContext } from './LinkAnalyticsContext';
13
11
  export const SmartLinkAnalyticsContext = props => {
14
12
  const {
15
13
  children,
16
- appearance,
17
- url
14
+ url,
15
+ display
18
16
  } = props;
19
17
  const {
20
18
  details,
@@ -23,7 +21,6 @@ export const SmartLinkAnalyticsContext = props => {
23
21
  const attributes = getResolvedAttributes({
24
22
  url
25
23
  }, details, status);
26
- const display = isFlexibleUiCard(children) ? CardDisplay.Flexible : appearance;
27
24
  return /*#__PURE__*/React.createElement(LinkAnalyticsContext, _extends({}, props, {
28
25
  display: display
29
26
  }), /*#__PURE__*/React.createElement(AnalyticsContext, {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.5.7",
3
+ "version": "26.5.9",
4
4
  "sideEffects": false
5
5
  }
@@ -179,6 +179,7 @@ function Component({
179
179
  renderers: renderers,
180
180
  ui: ui,
181
181
  showHoverPreview: showHoverPreview,
182
+ showAuthTooltip: showAuthTooltipProp,
182
183
  showServerActions: showServerActions,
183
184
  url: url,
184
185
  testId: testId,
@@ -258,8 +259,14 @@ function Component({
258
259
  });
259
260
  }
260
261
  }
261
- export const CardWithUrlContent = props => getBooleanFF('platform.linking-platform.smart-card.enable-analytics-context') ? /*#__PURE__*/React.createElement(SmartLinkAnalyticsContext, {
262
- url: props.url,
263
- appearance: props.appearance,
264
- id: props.id
265
- }, /*#__PURE__*/React.createElement(Component, props)) : /*#__PURE__*/React.createElement(Component, props);
262
+ export const CardWithUrlContent = props => {
263
+ if (getBooleanFF('platform.linking-platform.smart-card.enable-analytics-context')) {
264
+ const display = isFlexibleUiCard(props.children) ? CardDisplay.Flexible : props.appearance;
265
+ return /*#__PURE__*/React.createElement(SmartLinkAnalyticsContext, {
266
+ url: props.url,
267
+ id: props.id,
268
+ display: display
269
+ }, /*#__PURE__*/React.createElement(Component, props));
270
+ }
271
+ return /*#__PURE__*/React.createElement(Component, props);
272
+ };
@@ -183,6 +183,7 @@ const Container = ({
183
183
  hidePadding = false,
184
184
  onClick,
185
185
  retry,
186
+ showAuthTooltip = false,
186
187
  showHoverPreview = false,
187
188
  showServerActions = false,
188
189
  size = SmartLinkSize.Medium,
@@ -199,7 +200,7 @@ const Container = ({
199
200
  "data-smart-link-container": true,
200
201
  "data-testid": testId
201
202
  }, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick, showHoverPreview ? onActionMenuOpenChange : undefined));
202
- if (showHoverPreview && context !== null && context !== void 0 && context.url) {
203
+ if (context !== null && context !== void 0 && context.url && (showHoverPreview && status === 'resolved' || showAuthTooltip && status === 'unauthorized')) {
203
204
  return jsx(HoverCard, {
204
205
  url: context === null || context === void 0 ? void 0 : context.url,
205
206
  canOpen: hoverCardCanOpen,
@@ -22,6 +22,7 @@ const FlexibleCard = ({
22
22
  onError,
23
23
  onResolve,
24
24
  renderers,
25
+ showAuthTooltip,
25
26
  showHoverPreview,
26
27
  showServerActions,
27
28
  testId,
@@ -87,6 +88,7 @@ const FlexibleCard = ({
87
88
  retry: retry,
88
89
  showHoverPreview: showHoverPreview,
89
90
  showServerActions: showServerActions,
91
+ showAuthTooltip: showAuthTooltip,
90
92
  status: status
91
93
  }), children))));
92
94
  };
@@ -146,7 +146,7 @@ export const HoverCardComponent = ({
146
146
  };
147
147
  return getBooleanFF('platform.linking-platform.smart-card.enable-analytics-context') ? jsx(SmartLinkAnalyticsContext, {
148
148
  url: url,
149
- appearance: CardDisplay.HoverCardPreview,
149
+ display: CardDisplay.HoverCardPreview,
150
150
  id: id,
151
151
  source: HOVER_CARD_SOURCE
152
152
  }, jsx(HoverCardContent, hoverCardContentProps)) : jsx(HoverCardContent, hoverCardContentProps);
@@ -2,8 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { AnalyticsContext } from '@atlaskit/analytics-next';
4
4
  import { getResolvedAttributes } from '@atlaskit/link-analytics/resolved-attributes';
5
- import { isFlexibleUiCard } from '../flexible';
6
- import { CardDisplay } from '../../constants';
7
5
  import { useSmartCardState as useSmartLinkState } from '../../state/store';
8
6
  import { LinkAnalyticsContext } from './LinkAnalyticsContext';
9
7
  /**
@@ -12,15 +10,14 @@ import { LinkAnalyticsContext } from './LinkAnalyticsContext';
12
10
  */
13
11
  export var SmartLinkAnalyticsContext = function SmartLinkAnalyticsContext(props) {
14
12
  var children = props.children,
15
- appearance = props.appearance,
16
- url = props.url;
13
+ url = props.url,
14
+ display = props.display;
17
15
  var _useSmartLinkState = useSmartLinkState(url),
18
16
  details = _useSmartLinkState.details,
19
17
  status = _useSmartLinkState.status;
20
18
  var attributes = getResolvedAttributes({
21
19
  url: url
22
20
  }, details, status);
23
- var display = isFlexibleUiCard(children) ? CardDisplay.Flexible : appearance;
24
21
  return /*#__PURE__*/React.createElement(LinkAnalyticsContext, _extends({}, props, {
25
22
  display: display
26
23
  }), /*#__PURE__*/React.createElement(AnalyticsContext, {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.5.7",
3
+ "version": "26.5.9",
4
4
  "sideEffects": false
5
5
  }
@@ -182,6 +182,7 @@ function Component(_ref) {
182
182
  renderers: renderers,
183
183
  ui: ui,
184
184
  showHoverPreview: showHoverPreview,
185
+ showAuthTooltip: showAuthTooltipProp,
185
186
  showServerActions: showServerActions,
186
187
  url: url,
187
188
  testId: testId,
@@ -262,9 +263,13 @@ function Component(_ref) {
262
263
  }
263
264
  }
264
265
  export var CardWithUrlContent = function CardWithUrlContent(props) {
265
- return getBooleanFF('platform.linking-platform.smart-card.enable-analytics-context') ? /*#__PURE__*/React.createElement(SmartLinkAnalyticsContext, {
266
- url: props.url,
267
- appearance: props.appearance,
268
- id: props.id
269
- }, /*#__PURE__*/React.createElement(Component, props)) : /*#__PURE__*/React.createElement(Component, props);
266
+ if (getBooleanFF('platform.linking-platform.smart-card.enable-analytics-context')) {
267
+ var display = isFlexibleUiCard(props.children) ? CardDisplay.Flexible : props.appearance;
268
+ return /*#__PURE__*/React.createElement(SmartLinkAnalyticsContext, {
269
+ url: props.url,
270
+ id: props.id,
271
+ display: display
272
+ }, /*#__PURE__*/React.createElement(Component, props));
273
+ }
274
+ return /*#__PURE__*/React.createElement(Component, props);
270
275
  };
@@ -147,6 +147,8 @@ var Container = function Container(_ref3) {
147
147
  hidePadding = _ref3$hidePadding === void 0 ? false : _ref3$hidePadding,
148
148
  onClick = _ref3.onClick,
149
149
  retry = _ref3.retry,
150
+ _ref3$showAuthTooltip = _ref3.showAuthTooltip,
151
+ showAuthTooltip = _ref3$showAuthTooltip === void 0 ? false : _ref3$showAuthTooltip,
150
152
  _ref3$showHoverPrevie = _ref3.showHoverPreview,
151
153
  showHoverPreview = _ref3$showHoverPrevie === void 0 ? false : _ref3$showHoverPrevie,
152
154
  _ref3$showServerActio = _ref3.showServerActions,
@@ -172,7 +174,7 @@ var Container = function Container(_ref3) {
172
174
  "data-smart-link-container": true,
173
175
  "data-testid": testId
174
176
  }, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick, showHoverPreview ? onActionMenuOpenChange : undefined));
175
- if (showHoverPreview && context !== null && context !== void 0 && context.url) {
177
+ if (context !== null && context !== void 0 && context.url && (showHoverPreview && status === 'resolved' || showAuthTooltip && status === 'unauthorized')) {
176
178
  return jsx(HoverCard, {
177
179
  url: context === null || context === void 0 ? void 0 : context.url,
178
180
  canOpen: hoverCardCanOpen,
@@ -22,6 +22,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
22
22
  onError = _ref.onError,
23
23
  onResolve = _ref.onResolve,
24
24
  renderers = _ref.renderers,
25
+ showAuthTooltip = _ref.showAuthTooltip,
25
26
  showHoverPreview = _ref.showHoverPreview,
26
27
  showServerActions = _ref.showServerActions,
27
28
  testId = _ref.testId,
@@ -87,6 +88,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
87
88
  retry: retry,
88
89
  showHoverPreview: showHoverPreview,
89
90
  showServerActions: showServerActions,
91
+ showAuthTooltip: showAuthTooltip,
90
92
  status: status
91
93
  }), children))));
92
94
  };
@@ -157,7 +157,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
157
157
  });
158
158
  return getBooleanFF('platform.linking-platform.smart-card.enable-analytics-context') ? jsx(SmartLinkAnalyticsContext, {
159
159
  url: url,
160
- appearance: CardDisplay.HoverCardPreview,
160
+ display: CardDisplay.HoverCardPreview,
161
161
  id: id,
162
162
  source: HOVER_CARD_SOURCE
163
163
  }, jsx(HoverCardContent, hoverCardContentProps)) : jsx(HoverCardContent, hoverCardContentProps);
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { CardInnerAppearance } from '../../view/Card/types';
3
2
  type SmartLinkAnalyticsContextProps = {
4
3
  url: string;
5
- appearance: CardInnerAppearance;
4
+ display?: string;
6
5
  id?: string | undefined;
7
6
  source?: string;
8
7
  children?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { CardAppearance, CardPlatform, CardProps } from './types';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
- export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "showServerActions" | "onResolve" | "showAuthTooltip" | "platform" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "fallbackComponent" | "embedIframeUrlType" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
4
+ export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "showServerActions" | "showAuthTooltip" | "onResolve" | "platform" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "fallbackComponent" | "embedIframeUrlType" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
5
5
  export type { CardAppearance, CardProps, CardPlatform };
@@ -1,6 +1,6 @@
1
1
  import { SmartLinkStatus } from '../../../../constants';
2
2
  import { FlexibleCardProps, FlexibleUiOptions, RetryOptions } from '../../types';
3
- export type ContainerProps = Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'showServerActions'> & FlexibleUiOptions & {
3
+ export type ContainerProps = Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'showServerActions' | 'showAuthTooltip'> & FlexibleUiOptions & {
4
4
  /**
5
5
  * The options that determine the retry behaviour when a Smart Link errors.
6
6
  */
@@ -81,6 +81,11 @@ export type FlexibleCardProps = {
81
81
  * over the smartlink. Default value is false.
82
82
  */
83
83
  showHoverPreview?: Boolean;
84
+ /**
85
+ * Determines whether to show an unauthorised view of the hover card
86
+ * when a user hovers over a smartlink.
87
+ */
88
+ showAuthTooltip?: Boolean;
84
89
  };
85
90
  export type FlexibleUiOptions = {
86
91
  /**
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { CardInnerAppearance } from '../../view/Card/types';
3
2
  type SmartLinkAnalyticsContextProps = {
4
3
  url: string;
5
- appearance: CardInnerAppearance;
4
+ display?: string;
6
5
  id?: string | undefined;
7
6
  source?: string;
8
7
  children?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { CardAppearance, CardPlatform, CardProps } from './types';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
- export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "showServerActions" | "onResolve" | "showAuthTooltip" | "platform" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "fallbackComponent" | "embedIframeUrlType" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
4
+ export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "showServerActions" | "showAuthTooltip" | "onResolve" | "platform" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "fallbackComponent" | "embedIframeUrlType" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
5
5
  export type { CardAppearance, CardProps, CardPlatform };
@@ -1,6 +1,6 @@
1
1
  import { SmartLinkStatus } from '../../../../constants';
2
2
  import { FlexibleCardProps, FlexibleUiOptions, RetryOptions } from '../../types';
3
- export type ContainerProps = Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'showServerActions'> & FlexibleUiOptions & {
3
+ export type ContainerProps = Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'showServerActions' | 'showAuthTooltip'> & FlexibleUiOptions & {
4
4
  /**
5
5
  * The options that determine the retry behaviour when a Smart Link errors.
6
6
  */
@@ -81,6 +81,11 @@ export type FlexibleCardProps = {
81
81
  * over the smartlink. Default value is false.
82
82
  */
83
83
  showHoverPreview?: Boolean;
84
+ /**
85
+ * Determines whether to show an unauthorised view of the hover card
86
+ * when a user hovers over a smartlink.
87
+ */
88
+ showAuthTooltip?: Boolean;
84
89
  };
85
90
  export type FlexibleUiOptions = {
86
91
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.5.7",
3
+ "version": "26.5.9",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"