@atlaskit/smart-card 26.50.12 → 26.50.13
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 +7 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +3 -1
- package/dist/cjs/view/HoverCard/styled.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -2
- package/dist/es2019/view/HoverCard/styled.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +3 -1
- package/dist/esm/view/HoverCard/styled.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.50.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#86599](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86599) [`06e49db490ed`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/06e49db490ed) - [ux] Updated hover card background token to use overlay rather than raised to match shadow token
|
|
8
|
+
- [#85643](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85643) [`32f691ba9300`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32f691ba9300) - Removes error state indicator when hovercard is remounted"
|
|
9
|
+
|
|
3
10
|
## 26.50.12
|
|
4
11
|
|
|
5
12
|
### 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: "26.50.
|
|
25
|
+
packageVersion: "26.50.13"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -60,10 +60,12 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
60
60
|
showAISummaryErrorMessage = _useState2[0],
|
|
61
61
|
setShowAISummaryErrorMessage = _useState2[1];
|
|
62
62
|
(0, _react.useEffect)(function () {
|
|
63
|
+
// if the error was apparent on mount and the status is changed to loading we can
|
|
64
|
+
// clear the initial error on mount state
|
|
63
65
|
if (isErroredOnMountRef.current && status === 'loading') {
|
|
64
66
|
isErroredOnMountRef.current = false;
|
|
65
|
-
setShowAISummaryErrorMessage(true);
|
|
66
67
|
} else {
|
|
68
|
+
// if a new error occurs and it was not an apparent error on mount, we can show the error message
|
|
67
69
|
setShowAISummaryErrorMessage(!isErroredOnMountRef.current && status === 'error');
|
|
68
70
|
}
|
|
69
71
|
}, [status]);
|
|
@@ -42,7 +42,7 @@ var getTransitionStyles = exports.getTransitionStyles = function getTransitionSt
|
|
|
42
42
|
};
|
|
43
43
|
var popupContainerStyles = exports.popupContainerStyles = (0, _react.css)({
|
|
44
44
|
borderRadius: "var(--ds-border-radius-200, 8px)",
|
|
45
|
-
backgroundColor: "var(--ds-surface-
|
|
45
|
+
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
46
46
|
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))"
|
|
47
47
|
});
|
|
48
48
|
var getPreviewBlockStyles = exports.getPreviewBlockStyles = function getPreviewBlockStyles(previewHeight) {
|
|
@@ -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: "26.50.
|
|
20
|
+
packageVersion: "26.50.13",
|
|
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: "26.50.
|
|
7
|
+
packageVersion: "26.50.13"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -45,13 +45,15 @@ const AISummaryBlockResolvedView = props => {
|
|
|
45
45
|
// We want to display the AI Summary component only when there is content available during the loading process.
|
|
46
46
|
status === 'loading' && !!content;
|
|
47
47
|
const isSummarisedOnMountRef = useRef(status === 'done');
|
|
48
|
-
|
|
48
|
+
const isErroredOnMountRef = useRef(status === 'error');
|
|
49
49
|
const [showAISummaryErrorMessage, setShowAISummaryErrorMessage] = useState(false);
|
|
50
50
|
useEffect(() => {
|
|
51
|
+
// if the error was apparent on mount and the status is changed to loading we can
|
|
52
|
+
// clear the initial error on mount state
|
|
51
53
|
if (isErroredOnMountRef.current && status === 'loading') {
|
|
52
54
|
isErroredOnMountRef.current = false;
|
|
53
|
-
setShowAISummaryErrorMessage(true);
|
|
54
55
|
} else {
|
|
56
|
+
// if a new error occurs and it was not an apparent error on mount, we can show the error message
|
|
55
57
|
setShowAISummaryErrorMessage(!isErroredOnMountRef.current && status === 'error');
|
|
56
58
|
}
|
|
57
59
|
}, [status]);
|
|
@@ -62,7 +62,7 @@ export const getTransitionStyles = snippetHeight => css({
|
|
|
62
62
|
});
|
|
63
63
|
export const popupContainerStyles = css({
|
|
64
64
|
borderRadius: "var(--ds-border-radius-200, 8px)",
|
|
65
|
-
backgroundColor: "var(--ds-surface-
|
|
65
|
+
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
66
66
|
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))"
|
|
67
67
|
});
|
|
68
68
|
export const getPreviewBlockStyles = previewHeight => css(previewHeight ? `height: ${previewHeight}px;` : '', {
|
|
@@ -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: "26.50.
|
|
10
|
+
packageVersion: "26.50.13",
|
|
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: "26.50.
|
|
18
|
+
packageVersion: "26.50.13"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -50,10 +50,12 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
50
50
|
showAISummaryErrorMessage = _useState2[0],
|
|
51
51
|
setShowAISummaryErrorMessage = _useState2[1];
|
|
52
52
|
useEffect(function () {
|
|
53
|
+
// if the error was apparent on mount and the status is changed to loading we can
|
|
54
|
+
// clear the initial error on mount state
|
|
53
55
|
if (isErroredOnMountRef.current && status === 'loading') {
|
|
54
56
|
isErroredOnMountRef.current = false;
|
|
55
|
-
setShowAISummaryErrorMessage(true);
|
|
56
57
|
} else {
|
|
58
|
+
// if a new error occurs and it was not an apparent error on mount, we can show the error message
|
|
57
59
|
setShowAISummaryErrorMessage(!isErroredOnMountRef.current && status === 'error');
|
|
58
60
|
}
|
|
59
61
|
}, [status]);
|
|
@@ -36,7 +36,7 @@ export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
|
36
36
|
};
|
|
37
37
|
export var popupContainerStyles = css({
|
|
38
38
|
borderRadius: "var(--ds-border-radius-200, 8px)",
|
|
39
|
-
backgroundColor: "var(--ds-surface-
|
|
39
|
+
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
40
40
|
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px rgba(9, 30, 66, 0.15),0px 0px 1px rgba(9, 30, 66, 0.31))"
|
|
41
41
|
});
|
|
42
42
|
export var getPreviewBlockStyles = function getPreviewBlockStyles(previewHeight) {
|
|
@@ -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: "26.50.
|
|
13
|
+
packageVersion: "26.50.13",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|