@atlaskit/smart-card 23.1.4 → 23.3.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 +12 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +6 -1
- package/dist/cjs/view/HoverCard/utils.js +9 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +5 -0
- package/dist/es2019/view/HoverCard/utils.js +9 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +6 -1
- package/dist/esm/view/HoverCard/utils.js +9 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +6 -0
- package/dist/types-ts4.0/view/FlexibleCard/components/blocks/title-block/types.d.ts +6 -0
- package/package.json +1 -1
- package/report.api.md +1 -0
- package/tmp/api-report-tmp.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 23.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`be7ac1e0d9b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/be7ac1e0d9b) - Add `hideRetry` optional prop to TitleBlock element to allow customers to optout from any retry buttons to be shown (like "connect to preview" or "Can't find link" or "Restricted link, try another account")
|
|
8
|
+
|
|
9
|
+
## 23.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`5a2432bf917`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5a2432bf917) - [ux] Adds metadata to hover smart cards resolved by trello-object-provider
|
|
14
|
+
|
|
3
15
|
## 23.1.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -33,7 +33,7 @@ var _actionGroup = _interopRequireDefault(require("../action-group"));
|
|
|
33
33
|
|
|
34
34
|
var _elements = require("../../elements");
|
|
35
35
|
|
|
36
|
-
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme"];
|
|
36
|
+
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry"];
|
|
37
37
|
|
|
38
38
|
var _templateObject, _templateObject2;
|
|
39
39
|
|
|
@@ -95,8 +95,13 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
95
95
|
testId = _ref$testId === void 0 ? 'smart-block-title' : _ref$testId,
|
|
96
96
|
text = _ref.text,
|
|
97
97
|
theme = _ref.theme,
|
|
98
|
+
hideRetry = _ref.hideRetry,
|
|
98
99
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
99
100
|
|
|
101
|
+
if (hideRetry && props.retry) {
|
|
102
|
+
delete props.retry;
|
|
103
|
+
}
|
|
104
|
+
|
|
100
105
|
var _useState = (0, _react.useState)(false),
|
|
101
106
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
102
107
|
actionDropdownOpen = _useState2[0],
|
|
@@ -53,6 +53,15 @@ var getSimulatedMetadata = function getSimulatedMetadata() {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
+
case 'trello-object-provider':
|
|
57
|
+
return {
|
|
58
|
+
metadata: {
|
|
59
|
+
primary: [_constants.ElementName.AuthorGroup, _constants.ElementName.State, _constants.ElementName.DueOn],
|
|
60
|
+
secondary: [_constants.ElementName.ReactCount, _constants.ElementName.CommentCount, _constants.ElementName.AttachmentCount],
|
|
61
|
+
subtitle: []
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
56
65
|
case 'watermelon-object-provider':
|
|
57
66
|
if (types.includes('atlassian:Project')) {
|
|
58
67
|
return {
|
package/dist/es2019/version.json
CHANGED
|
@@ -68,8 +68,13 @@ const TitleBlock = ({
|
|
|
68
68
|
testId = 'smart-block-title',
|
|
69
69
|
text,
|
|
70
70
|
theme,
|
|
71
|
+
hideRetry,
|
|
71
72
|
...props
|
|
72
73
|
}) => {
|
|
74
|
+
if (hideRetry && props.retry) {
|
|
75
|
+
delete props.retry;
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
const [actionDropdownOpen, setActionDropdownOpen] = useState(false);
|
|
74
79
|
const onDropdownOpenChange = useCallback(isOpen => {
|
|
75
80
|
setActionDropdownOpen(isOpen);
|
|
@@ -40,6 +40,15 @@ export const getSimulatedMetadata = (extensionKey = '', types = []) => {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
case 'trello-object-provider':
|
|
44
|
+
return {
|
|
45
|
+
metadata: {
|
|
46
|
+
primary: [ElementName.AuthorGroup, ElementName.State, ElementName.DueOn],
|
|
47
|
+
secondary: [ElementName.ReactCount, ElementName.CommentCount, ElementName.AttachmentCount],
|
|
48
|
+
subtitle: []
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
43
52
|
case 'watermelon-object-provider':
|
|
44
53
|
if (types.includes('atlassian:Project')) {
|
|
45
54
|
return {
|
package/dist/esm/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
|
-
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme"];
|
|
5
|
+
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry"];
|
|
6
6
|
|
|
7
7
|
var _templateObject, _templateObject2;
|
|
8
8
|
|
|
@@ -69,8 +69,13 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
69
69
|
testId = _ref$testId === void 0 ? 'smart-block-title' : _ref$testId,
|
|
70
70
|
text = _ref.text,
|
|
71
71
|
theme = _ref.theme,
|
|
72
|
+
hideRetry = _ref.hideRetry,
|
|
72
73
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
73
74
|
|
|
75
|
+
if (hideRetry && props.retry) {
|
|
76
|
+
delete props.retry;
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
var _useState = useState(false),
|
|
75
80
|
_useState2 = _slicedToArray(_useState, 2),
|
|
76
81
|
actionDropdownOpen = _useState2[0],
|
|
@@ -43,6 +43,15 @@ export var getSimulatedMetadata = function getSimulatedMetadata() {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
case 'trello-object-provider':
|
|
47
|
+
return {
|
|
48
|
+
metadata: {
|
|
49
|
+
primary: [ElementName.AuthorGroup, ElementName.State, ElementName.DueOn],
|
|
50
|
+
secondary: [ElementName.ReactCount, ElementName.CommentCount, ElementName.AttachmentCount],
|
|
51
|
+
subtitle: []
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
46
55
|
case 'watermelon-object-provider':
|
|
47
56
|
if (types.includes('atlassian:Project')) {
|
|
48
57
|
return {
|
|
@@ -55,6 +55,12 @@ export declare type TitleBlockProps = {
|
|
|
55
55
|
* @internal
|
|
56
56
|
*/
|
|
57
57
|
retry?: RetryOptions;
|
|
58
|
+
/**
|
|
59
|
+
* This option determins whenever we show any of the links and messages on the right side of the block,
|
|
60
|
+
* like "connect to preview" or "Can't find link" or "Restricted link, try another account" etc.
|
|
61
|
+
* Default is false.
|
|
62
|
+
*/
|
|
63
|
+
hideRetry?: boolean;
|
|
58
64
|
/**
|
|
59
65
|
* Determines whether TitleBlock will hide actions until the user is hovering
|
|
60
66
|
* over the link.
|
|
@@ -55,6 +55,12 @@ export declare type TitleBlockProps = {
|
|
|
55
55
|
* @internal
|
|
56
56
|
*/
|
|
57
57
|
retry?: RetryOptions;
|
|
58
|
+
/**
|
|
59
|
+
* This option determins whenever we show any of the links and messages on the right side of the block,
|
|
60
|
+
* like "connect to preview" or "Can't find link" or "Restricted link, try another account" etc.
|
|
61
|
+
* Default is false.
|
|
62
|
+
*/
|
|
63
|
+
hideRetry?: boolean;
|
|
58
64
|
/**
|
|
59
65
|
* Determines whether TitleBlock will hide actions until the user is hovering
|
|
60
66
|
* over the link.
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -786,6 +786,7 @@ type TitleBlockProps = {
|
|
|
786
786
|
position?: SmartLinkPosition;
|
|
787
787
|
onClick?: React_2.EventHandler<React_2.KeyboardEvent | React_2.MouseEvent>;
|
|
788
788
|
retry?: RetryOptions;
|
|
789
|
+
hideRetry?: boolean;
|
|
789
790
|
showActionOnHover?: boolean;
|
|
790
791
|
subtitle?: ElementItem[];
|
|
791
792
|
text?: string;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -672,6 +672,7 @@ type TitleBlockProps = {
|
|
|
672
672
|
position?: SmartLinkPosition;
|
|
673
673
|
onClick?: React_2.EventHandler<React_2.KeyboardEvent | React_2.MouseEvent>;
|
|
674
674
|
retry?: RetryOptions;
|
|
675
|
+
hideRetry?: boolean;
|
|
675
676
|
showActionOnHover?: boolean;
|
|
676
677
|
subtitle?: ElementItem[];
|
|
677
678
|
text?: string;
|