@atlaskit/smart-card 44.29.1 → 45.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.
- package/CHANGELOG.md +31 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/container/index.js +8 -4
- package/dist/cjs/view/FlexibleCard/index.js +3 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/container/index.js +8 -4
- package/dist/es2019/view/FlexibleCard/index.js +3 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +2 -0
- package/dist/esm/view/FlexibleCard/components/container/index.js +8 -4
- package/dist/esm/view/FlexibleCard/index.js +3 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/ssr.d.ts +6 -0
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +4 -0
- package/package.json +61 -69
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 45.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- [`25fd7be91917c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/25fd7be91917c) -
|
|
28
|
+
Add `title` prop to SmartLink SSR to fix hydration issues when the container is clickable
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
|
|
3
34
|
## 44.29.1
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card" || '',
|
|
14
|
-
packageVersion: "44.29.
|
|
14
|
+
packageVersion: "44.29.1" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -43,6 +43,7 @@ var TRACK_NON_PRIMARY_3P_CLICKS_EXPERIMENT = 'linking_platform_track_non_primary
|
|
|
43
43
|
function Component(_ref) {
|
|
44
44
|
var id = _ref.id,
|
|
45
45
|
url = _ref.url,
|
|
46
|
+
title = _ref.title,
|
|
46
47
|
isSelected = _ref.isSelected,
|
|
47
48
|
isHovered = _ref.isHovered,
|
|
48
49
|
frameStyle = _ref.frameStyle,
|
|
@@ -428,6 +429,7 @@ function Component(_ref) {
|
|
|
428
429
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
429
430
|
actionOptions: actionOptions,
|
|
430
431
|
url: url,
|
|
432
|
+
title: title,
|
|
431
433
|
testId: testId,
|
|
432
434
|
onResolve: onResolve,
|
|
433
435
|
onError: onError
|
|
@@ -83,11 +83,14 @@ var getTitleBlockProps = function getTitleBlockProps(children) {
|
|
|
83
83
|
return block.props;
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
var getLayeredLink = function getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu) {
|
|
86
|
+
var getLayeredLink = function getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu, title) {
|
|
87
87
|
var _ref = context || {},
|
|
88
88
|
linkTitle = _ref.linkTitle,
|
|
89
89
|
_ref$url = _ref.url,
|
|
90
90
|
url = _ref$url === void 0 ? '' : _ref$url;
|
|
91
|
+
// SSR cannot reliably extract TitleBlock props from children, so `title` is
|
|
92
|
+
// provided from CardSSR as a stable server/client value to prevent hydration
|
|
93
|
+
// text mismatches for the clickable container link.
|
|
91
94
|
var _ref2 = getTitleBlockProps(children) || {},
|
|
92
95
|
target = _ref2.anchorTarget,
|
|
93
96
|
text = _ref2.text;
|
|
@@ -97,7 +100,7 @@ var getLayeredLink = function getLayeredLink(testId, context, children, onClick,
|
|
|
97
100
|
onContextMenu: onContextMenu,
|
|
98
101
|
target: target,
|
|
99
102
|
testId: testId,
|
|
100
|
-
text: text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
103
|
+
text: title || text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
101
104
|
url: url
|
|
102
105
|
});
|
|
103
106
|
};
|
|
@@ -188,7 +191,8 @@ var Container = function Container(_ref3) {
|
|
|
188
191
|
size = _ref3$size === void 0 ? _constants.SmartLinkSize.Medium : _ref3$size,
|
|
189
192
|
status = _ref3.status,
|
|
190
193
|
_ref3$testId = _ref3.testId,
|
|
191
|
-
testId = _ref3$testId === void 0 ? 'smart-links-container' : _ref3$testId
|
|
194
|
+
testId = _ref3$testId === void 0 ? 'smart-links-container' : _ref3$testId,
|
|
195
|
+
title = _ref3.title;
|
|
192
196
|
var padding = hidePadding ? '0px' : getPadding(size);
|
|
193
197
|
var gap = getGap(size);
|
|
194
198
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
@@ -209,7 +213,7 @@ var Container = function Container(_ref3) {
|
|
|
209
213
|
"--_73mooq": (0, _runtime.ix)(previewOnLeft ? gap : padding),
|
|
210
214
|
"--_12k13bg": (0, _runtime.ix)(previewOnRight ? gap : padding)
|
|
211
215
|
}
|
|
212
|
-
}, clickableContainer ? getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu) : null, filterChildren(children, removeBlockRestriction));
|
|
216
|
+
}, clickableContainer ? getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu, title) : null, filterChildren(children, removeBlockRestriction));
|
|
213
217
|
if (context !== null && context !== void 0 && context.url && canShowHoverCard) {
|
|
214
218
|
return /*#__PURE__*/_react.default.createElement(_hoverCardControl.default, {
|
|
215
219
|
isHoverPreview: isResolved || hasHoverCardOverride,
|
|
@@ -54,7 +54,8 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
54
54
|
actionOptions = _ref.actionOptions,
|
|
55
55
|
testId = _ref.testId,
|
|
56
56
|
ui = _ref.ui,
|
|
57
|
-
url = _ref.url
|
|
57
|
+
url = _ref.url,
|
|
58
|
+
ssrTitle = _ref.title;
|
|
58
59
|
var aiSummaryConfig = (0, _useAiSummaryConfig.useAISummaryConfig)();
|
|
59
60
|
var resolve = (0, _useResolve.default)();
|
|
60
61
|
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
@@ -154,6 +155,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
154
155
|
}), /*#__PURE__*/_react.default.createElement(_container.default, (0, _extends2.default)({
|
|
155
156
|
testId: testId
|
|
156
157
|
}, ui, {
|
|
158
|
+
title: ssrTitle,
|
|
157
159
|
onClick: onClick,
|
|
158
160
|
onAuxClick: onAuxClick,
|
|
159
161
|
onContextMenu: onContextMenu,
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "44.29.
|
|
22
|
+
packageVersion: "44.29.1",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "44.29.
|
|
5
|
+
packageVersion: "44.29.1" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -31,6 +31,7 @@ const TRACK_NON_PRIMARY_3P_CLICKS_EXPERIMENT = 'linking_platform_track_non_prima
|
|
|
31
31
|
function Component({
|
|
32
32
|
id,
|
|
33
33
|
url,
|
|
34
|
+
title,
|
|
34
35
|
isSelected,
|
|
35
36
|
isHovered,
|
|
36
37
|
frameStyle,
|
|
@@ -419,6 +420,7 @@ function Component({
|
|
|
419
420
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
420
421
|
actionOptions: actionOptions,
|
|
421
422
|
url: url,
|
|
423
|
+
title: title,
|
|
422
424
|
testId: testId,
|
|
423
425
|
onResolve: onResolve,
|
|
424
426
|
onError: onError
|
|
@@ -72,11 +72,14 @@ const getTitleBlockProps = children => {
|
|
|
72
72
|
return block.props;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
const getLayeredLink = (testId, context, children, onClick, onAuxClick, onContextMenu) => {
|
|
75
|
+
const getLayeredLink = (testId, context, children, onClick, onAuxClick, onContextMenu, title) => {
|
|
76
76
|
const {
|
|
77
77
|
linkTitle,
|
|
78
78
|
url = ''
|
|
79
79
|
} = context || {};
|
|
80
|
+
// SSR cannot reliably extract TitleBlock props from children, so `title` is
|
|
81
|
+
// provided from CardSSR as a stable server/client value to prevent hydration
|
|
82
|
+
// text mismatches for the clickable container link.
|
|
80
83
|
const {
|
|
81
84
|
anchorTarget: target,
|
|
82
85
|
text
|
|
@@ -87,7 +90,7 @@ const getLayeredLink = (testId, context, children, onClick, onAuxClick, onContex
|
|
|
87
90
|
onContextMenu: onContextMenu,
|
|
88
91
|
target: target,
|
|
89
92
|
testId: testId,
|
|
90
|
-
text: text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
93
|
+
text: title || text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
91
94
|
url: url
|
|
92
95
|
});
|
|
93
96
|
};
|
|
@@ -170,7 +173,8 @@ const Container = ({
|
|
|
170
173
|
removeBlockRestriction = false,
|
|
171
174
|
size = SmartLinkSize.Medium,
|
|
172
175
|
status,
|
|
173
|
-
testId = 'smart-links-container'
|
|
176
|
+
testId = 'smart-links-container',
|
|
177
|
+
title
|
|
174
178
|
}) => {
|
|
175
179
|
const padding = hidePadding ? '0px' : getPadding(size);
|
|
176
180
|
const gap = getGap(size);
|
|
@@ -193,7 +197,7 @@ const Container = ({
|
|
|
193
197
|
"--_73mooq": ix(previewOnLeft ? gap : padding),
|
|
194
198
|
"--_12k13bg": ix(previewOnRight ? gap : padding)
|
|
195
199
|
}
|
|
196
|
-
}, clickableContainer ? getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu) : null, filterChildren(children, removeBlockRestriction));
|
|
200
|
+
}, clickableContainer ? getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu, title) : null, filterChildren(children, removeBlockRestriction));
|
|
197
201
|
if (context !== null && context !== void 0 && context.url && canShowHoverCard) {
|
|
198
202
|
return /*#__PURE__*/React.createElement(HoverCardControl, {
|
|
199
203
|
isHoverPreview: isResolved || hasHoverCardOverride,
|
|
@@ -40,7 +40,8 @@ const FlexibleCard = ({
|
|
|
40
40
|
actionOptions,
|
|
41
41
|
testId,
|
|
42
42
|
ui,
|
|
43
|
-
url
|
|
43
|
+
url,
|
|
44
|
+
title: ssrTitle
|
|
44
45
|
}) => {
|
|
45
46
|
var _details$meta2, _flexibleCardContext$, _flexibleCardContext$2;
|
|
46
47
|
const aiSummaryConfig = useAISummaryConfig();
|
|
@@ -138,6 +139,7 @@ const FlexibleCard = ({
|
|
|
138
139
|
}), /*#__PURE__*/React.createElement(Container, _extends({
|
|
139
140
|
testId: testId
|
|
140
141
|
}, ui, {
|
|
142
|
+
title: ssrTitle,
|
|
141
143
|
onClick: onClick,
|
|
142
144
|
onAuxClick: onAuxClick,
|
|
143
145
|
onContextMenu: onContextMenu,
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "44.29.
|
|
12
|
+
packageVersion: "44.29.1",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "44.29.
|
|
7
|
+
packageVersion: "44.29.1" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -34,6 +34,7 @@ var TRACK_NON_PRIMARY_3P_CLICKS_EXPERIMENT = 'linking_platform_track_non_primary
|
|
|
34
34
|
function Component(_ref) {
|
|
35
35
|
var id = _ref.id,
|
|
36
36
|
url = _ref.url,
|
|
37
|
+
title = _ref.title,
|
|
37
38
|
isSelected = _ref.isSelected,
|
|
38
39
|
isHovered = _ref.isHovered,
|
|
39
40
|
frameStyle = _ref.frameStyle,
|
|
@@ -419,6 +420,7 @@ function Component(_ref) {
|
|
|
419
420
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
420
421
|
actionOptions: actionOptions,
|
|
421
422
|
url: url,
|
|
423
|
+
title: title,
|
|
422
424
|
testId: testId,
|
|
423
425
|
onResolve: onResolve,
|
|
424
426
|
onError: onError
|
|
@@ -77,11 +77,14 @@ var getTitleBlockProps = function getTitleBlockProps(children) {
|
|
|
77
77
|
return block.props;
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
var getLayeredLink = function getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu) {
|
|
80
|
+
var getLayeredLink = function getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu, title) {
|
|
81
81
|
var _ref = context || {},
|
|
82
82
|
linkTitle = _ref.linkTitle,
|
|
83
83
|
_ref$url = _ref.url,
|
|
84
84
|
url = _ref$url === void 0 ? '' : _ref$url;
|
|
85
|
+
// SSR cannot reliably extract TitleBlock props from children, so `title` is
|
|
86
|
+
// provided from CardSSR as a stable server/client value to prevent hydration
|
|
87
|
+
// text mismatches for the clickable container link.
|
|
85
88
|
var _ref2 = getTitleBlockProps(children) || {},
|
|
86
89
|
target = _ref2.anchorTarget,
|
|
87
90
|
text = _ref2.text;
|
|
@@ -91,7 +94,7 @@ var getLayeredLink = function getLayeredLink(testId, context, children, onClick,
|
|
|
91
94
|
onContextMenu: onContextMenu,
|
|
92
95
|
target: target,
|
|
93
96
|
testId: testId,
|
|
94
|
-
text: text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
97
|
+
text: title || text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
95
98
|
url: url
|
|
96
99
|
});
|
|
97
100
|
};
|
|
@@ -182,7 +185,8 @@ var Container = function Container(_ref3) {
|
|
|
182
185
|
size = _ref3$size === void 0 ? SmartLinkSize.Medium : _ref3$size,
|
|
183
186
|
status = _ref3.status,
|
|
184
187
|
_ref3$testId = _ref3.testId,
|
|
185
|
-
testId = _ref3$testId === void 0 ? 'smart-links-container' : _ref3$testId
|
|
188
|
+
testId = _ref3$testId === void 0 ? 'smart-links-container' : _ref3$testId,
|
|
189
|
+
title = _ref3.title;
|
|
186
190
|
var padding = hidePadding ? '0px' : getPadding(size);
|
|
187
191
|
var gap = getGap(size);
|
|
188
192
|
var context = useFlexibleUiContext();
|
|
@@ -203,7 +207,7 @@ var Container = function Container(_ref3) {
|
|
|
203
207
|
"--_73mooq": ix(previewOnLeft ? gap : padding),
|
|
204
208
|
"--_12k13bg": ix(previewOnRight ? gap : padding)
|
|
205
209
|
}
|
|
206
|
-
}, clickableContainer ? getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu) : null, filterChildren(children, removeBlockRestriction));
|
|
210
|
+
}, clickableContainer ? getLayeredLink(testId, context, children, onClick, onAuxClick, onContextMenu, title) : null, filterChildren(children, removeBlockRestriction));
|
|
207
211
|
if (context !== null && context !== void 0 && context.url && canShowHoverCard) {
|
|
208
212
|
return /*#__PURE__*/React.createElement(HoverCardControl, {
|
|
209
213
|
isHoverPreview: isResolved || hasHoverCardOverride,
|
|
@@ -45,7 +45,8 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
45
45
|
actionOptions = _ref.actionOptions,
|
|
46
46
|
testId = _ref.testId,
|
|
47
47
|
ui = _ref.ui,
|
|
48
|
-
url = _ref.url
|
|
48
|
+
url = _ref.url,
|
|
49
|
+
ssrTitle = _ref.title;
|
|
49
50
|
var aiSummaryConfig = useAISummaryConfig();
|
|
50
51
|
var resolve = useResolve();
|
|
51
52
|
var _useSmartLinkContext = useSmartLinkContext(),
|
|
@@ -145,6 +146,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
145
146
|
}), /*#__PURE__*/React.createElement(Container, _extends({
|
|
146
147
|
testId: testId
|
|
147
148
|
}, ui, {
|
|
149
|
+
title: ssrTitle,
|
|
148
150
|
onClick: onClick,
|
|
149
151
|
onAuxClick: onAuxClick,
|
|
150
152
|
onContextMenu: onContextMenu,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "44.29.
|
|
15
|
+
packageVersion: "44.29.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
package/dist/types/ssr.d.ts
CHANGED
|
@@ -5,5 +5,11 @@ export type CardSSRProps = CardProps & {
|
|
|
5
5
|
hideIconLoadingSkeleton?: boolean;
|
|
6
6
|
placeholderData?: SmartLinkResponse;
|
|
7
7
|
url: string;
|
|
8
|
+
/**
|
|
9
|
+
* Server-rendered title fallback passed through to FlexibleCard layered links.
|
|
10
|
+
* On SSR we cannot reliably derive TitleBlock text from children, so this keeps
|
|
11
|
+
* server/client link text aligned and avoids hydration mismatches.
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
8
14
|
};
|
|
9
15
|
export declare const CardSSR: (props: CardSSRProps) => React.JSX.Element;
|
|
@@ -21,5 +21,5 @@ export declare const getFlexibleUiBlock: (node: React.ReactNode) => React.ReactN
|
|
|
21
21
|
* @internal
|
|
22
22
|
* @see Block
|
|
23
23
|
*/
|
|
24
|
-
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, onAuxClick, onContextMenu, retry, showHoverPreview, hoverPreviewOptions, actionOptions, removeBlockRestriction, size, status, testId, }: ContainerProps) => JSX.Element;
|
|
24
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, onAuxClick, onContextMenu, retry, showHoverPreview, hoverPreviewOptions, actionOptions, removeBlockRestriction, size, status, testId, title, }: ContainerProps) => JSX.Element;
|
|
25
25
|
export default Container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../../../constants';
|
|
3
3
|
import { type FlexibleCardProps, type FlexibleUiOptions, type RetryOptions } from '../../types';
|
|
4
|
-
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'onAuxClick' | 'onContextMenu' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'> & FlexibleUiOptions & {
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'onAuxClick' | 'onContextMenu' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions' | 'title'> & FlexibleUiOptions & {
|
|
5
5
|
/**
|
|
6
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
7
7
|
*/
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({ appearance, cardState, children, id, onAuthorize, onClick, onAuxClick, onContextMenu, onError, onResolve, origin, placeholderData, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => React.JSX.Element;
|
|
9
|
+
declare const FlexibleCard: ({ appearance, cardState, children, id, onAuthorize, onClick, onAuxClick, onContextMenu, onError, onResolve, origin, placeholderData, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, title: ssrTitle, }: FlexibleCardProps) => React.JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -109,6 +109,10 @@ export type FlexibleCardProps = {
|
|
|
109
109
|
* Determines the URL of the Smart Link.
|
|
110
110
|
*/
|
|
111
111
|
url: string;
|
|
112
|
+
/**
|
|
113
|
+
* Determines the link title in the LayeredLink.
|
|
114
|
+
*/
|
|
115
|
+
title?: string;
|
|
112
116
|
};
|
|
113
117
|
export type InternalFlexibleUiOptions = FlexibleUiOptions & {
|
|
114
118
|
hideLegacyButton?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "45.0.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,63 +35,63 @@
|
|
|
35
35
|
"ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.{svg,png}"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/adf-utils": "^
|
|
38
|
+
"@atlaskit/adf-utils": "^20.0.0",
|
|
39
39
|
"@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.6.0",
|
|
40
|
-
"@atlaskit/analytics-cross-product": "^
|
|
41
|
-
"@atlaskit/analytics-gas-types": "^
|
|
42
|
-
"@atlaskit/analytics-next": "^
|
|
43
|
-
"@atlaskit/avatar": "^
|
|
44
|
-
"@atlaskit/avatar-group": "^
|
|
45
|
-
"@atlaskit/badge": "^
|
|
46
|
-
"@atlaskit/browser-apis": "^0.0
|
|
47
|
-
"@atlaskit/button": "^
|
|
48
|
-
"@atlaskit/checkbox": "^
|
|
49
|
-
"@atlaskit/css": "^0.
|
|
50
|
-
"@atlaskit/dropdown-menu": "^
|
|
51
|
-
"@atlaskit/embedded-confluence": "^
|
|
52
|
-
"@atlaskit/feature-gate-js-client": "^
|
|
53
|
-
"@atlaskit/flag": "^
|
|
54
|
-
"@atlaskit/form": "^
|
|
55
|
-
"@atlaskit/frontend-utilities": "^
|
|
56
|
-
"@atlaskit/heading": "^
|
|
57
|
-
"@atlaskit/icon": "^
|
|
58
|
-
"@atlaskit/icon-file-type": "^
|
|
59
|
-
"@atlaskit/icon-lab": "^
|
|
60
|
-
"@atlaskit/image": "^
|
|
61
|
-
"@atlaskit/json-ld-types": "^
|
|
62
|
-
"@atlaskit/link": "^
|
|
63
|
-
"@atlaskit/link-analytics": "^
|
|
64
|
-
"@atlaskit/link-client-extension": "^
|
|
65
|
-
"@atlaskit/link-extractors": "^
|
|
66
|
-
"@atlaskit/link-test-helpers": "^
|
|
67
|
-
"@atlaskit/linking-common": "^
|
|
68
|
-
"@atlaskit/linking-types": "^
|
|
69
|
-
"@atlaskit/logo": "^
|
|
70
|
-
"@atlaskit/lozenge": "^
|
|
71
|
-
"@atlaskit/menu": "^
|
|
72
|
-
"@atlaskit/modal-dialog": "^
|
|
73
|
-
"@atlaskit/motion": "^
|
|
74
|
-
"@atlaskit/object": "^
|
|
75
|
-
"@atlaskit/outbound-auth-flow-client": "^
|
|
76
|
-
"@atlaskit/platform-feature-flags": "^
|
|
77
|
-
"@atlaskit/platform-feature-flags-react": "^0.
|
|
78
|
-
"@atlaskit/popup": "^
|
|
79
|
-
"@atlaskit/primitives": "^
|
|
80
|
-
"@atlaskit/react-ufo": "^
|
|
81
|
-
"@atlaskit/rovo-triggers": "^
|
|
82
|
-
"@atlaskit/section-message": "^
|
|
83
|
-
"@atlaskit/select": "^
|
|
84
|
-
"@atlaskit/spinner": "^
|
|
85
|
-
"@atlaskit/tag": "^
|
|
86
|
-
"@atlaskit/textarea": "^
|
|
87
|
-
"@atlaskit/textfield": "^
|
|
88
|
-
"@atlaskit/theme": "^
|
|
89
|
-
"@atlaskit/tile": "^
|
|
90
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
91
|
-
"@atlaskit/tokens": "^
|
|
92
|
-
"@atlaskit/tooltip": "^
|
|
93
|
-
"@atlaskit/ufo": "^0.
|
|
94
|
-
"@atlaskit/width-detector": "^
|
|
40
|
+
"@atlaskit/analytics-cross-product": "^2.0.0",
|
|
41
|
+
"@atlaskit/analytics-gas-types": "^6.0.0",
|
|
42
|
+
"@atlaskit/analytics-next": "^12.0.0",
|
|
43
|
+
"@atlaskit/avatar": "^26.0.0",
|
|
44
|
+
"@atlaskit/avatar-group": "^13.0.0",
|
|
45
|
+
"@atlaskit/badge": "^19.0.0",
|
|
46
|
+
"@atlaskit/browser-apis": "^1.0.0",
|
|
47
|
+
"@atlaskit/button": "^24.0.0",
|
|
48
|
+
"@atlaskit/checkbox": "^18.0.0",
|
|
49
|
+
"@atlaskit/css": "^1.0.0",
|
|
50
|
+
"@atlaskit/dropdown-menu": "^17.0.0",
|
|
51
|
+
"@atlaskit/embedded-confluence": "^6.0.0",
|
|
52
|
+
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
53
|
+
"@atlaskit/flag": "^18.0.0",
|
|
54
|
+
"@atlaskit/form": "^16.0.0",
|
|
55
|
+
"@atlaskit/frontend-utilities": "^4.0.0",
|
|
56
|
+
"@atlaskit/heading": "^6.0.0",
|
|
57
|
+
"@atlaskit/icon": "^36.0.0",
|
|
58
|
+
"@atlaskit/icon-file-type": "^8.0.0",
|
|
59
|
+
"@atlaskit/icon-lab": "^7.0.0",
|
|
60
|
+
"@atlaskit/image": "^4.0.0",
|
|
61
|
+
"@atlaskit/json-ld-types": "^2.0.0",
|
|
62
|
+
"@atlaskit/link": "^4.0.0",
|
|
63
|
+
"@atlaskit/link-analytics": "^12.0.0",
|
|
64
|
+
"@atlaskit/link-client-extension": "^7.0.0",
|
|
65
|
+
"@atlaskit/link-extractors": "^3.0.0",
|
|
66
|
+
"@atlaskit/link-test-helpers": "^11.0.0",
|
|
67
|
+
"@atlaskit/linking-common": "^10.0.0",
|
|
68
|
+
"@atlaskit/linking-types": "^15.0.0",
|
|
69
|
+
"@atlaskit/logo": "^21.0.0",
|
|
70
|
+
"@atlaskit/lozenge": "^14.0.0",
|
|
71
|
+
"@atlaskit/menu": "^9.0.0",
|
|
72
|
+
"@atlaskit/modal-dialog": "^16.0.0",
|
|
73
|
+
"@atlaskit/motion": "^7.0.0",
|
|
74
|
+
"@atlaskit/object": "^2.0.0",
|
|
75
|
+
"@atlaskit/outbound-auth-flow-client": "^4.0.0",
|
|
76
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
77
|
+
"@atlaskit/platform-feature-flags-react": "^1.0.0",
|
|
78
|
+
"@atlaskit/popup": "^5.0.0",
|
|
79
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
80
|
+
"@atlaskit/react-ufo": "^7.0.0",
|
|
81
|
+
"@atlaskit/rovo-triggers": "^8.0.0",
|
|
82
|
+
"@atlaskit/section-message": "^9.0.0",
|
|
83
|
+
"@atlaskit/select": "^22.0.0",
|
|
84
|
+
"@atlaskit/spinner": "^20.0.0",
|
|
85
|
+
"@atlaskit/tag": "^15.0.0",
|
|
86
|
+
"@atlaskit/textarea": "^9.0.0",
|
|
87
|
+
"@atlaskit/textfield": "^9.0.0",
|
|
88
|
+
"@atlaskit/theme": "^26.0.0",
|
|
89
|
+
"@atlaskit/tile": "^2.0.0",
|
|
90
|
+
"@atlaskit/tmp-editor-statsig": "^104.0.0",
|
|
91
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
92
|
+
"@atlaskit/tooltip": "^23.0.0",
|
|
93
|
+
"@atlaskit/ufo": "^1.0.0",
|
|
94
|
+
"@atlaskit/width-detector": "^6.0.0",
|
|
95
95
|
"@babel/runtime": "^7.0.0",
|
|
96
96
|
"@compiled/react": "^0.20.0",
|
|
97
97
|
"@formatjs/intl-utils": "^3.8.4",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"uuid": "^3.1.0"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
|
-
"@atlaskit/link-provider": "^
|
|
110
|
+
"@atlaskit/link-provider": "^5.0.0",
|
|
111
111
|
"react": "^18.2.0",
|
|
112
112
|
"react-dom": "^18.2.0",
|
|
113
113
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@af/integration-testing": "workspace:^",
|
|
117
117
|
"@af/visual-regression": "workspace:^",
|
|
118
|
-
"@atlaskit/analytics-listeners": "^
|
|
119
|
-
"@atlaskit/css-reset": "^
|
|
120
|
-
"@atlaskit/media-test-helpers": "^
|
|
118
|
+
"@atlaskit/analytics-listeners": "^11.0.0",
|
|
119
|
+
"@atlaskit/css-reset": "^8.0.0",
|
|
120
|
+
"@atlaskit/media-test-helpers": "^42.0.0",
|
|
121
121
|
"@atlaskit/ssr": "workspace:^",
|
|
122
122
|
"@atlassian/a11y-jest-testing": "^0.12.0",
|
|
123
123
|
"@atlassian/analytics-tooling": "workspace:^",
|
|
@@ -169,14 +169,6 @@
|
|
|
169
169
|
]
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
-
"typesVersions": {
|
|
173
|
-
">=4.5 <4.9": {
|
|
174
|
-
"*": [
|
|
175
|
-
"dist/types-ts4.5/*",
|
|
176
|
-
"dist/types-ts4.5/index.d.ts"
|
|
177
|
-
]
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
172
|
"platform-feature-flags": {
|
|
181
173
|
"platform_navx_3298_message_wrapper": {
|
|
182
174
|
"type": "boolean"
|