@atlaskit/smart-card 26.5.7 → 26.5.8
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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/container/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/index.js +2 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/index.js +2 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -0
- package/dist/esm/view/FlexibleCard/components/container/index.js +3 -1
- package/dist/esm/view/FlexibleCard/index.js +2 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +5 -0
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.5.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`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')
|
|
8
|
+
|
|
3
9
|
## 26.5.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -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 (
|
|
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
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -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 (
|
|
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
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -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 (
|
|
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
|
};
|
|
@@ -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" | "
|
|
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,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" | "
|
|
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
|
/**
|