@atlaskit/smart-card 26.38.1 → 26.39.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 +6 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +5 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +3 -2
- 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/title-block/errored/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +2 -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/title-block/errored/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +5 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +3 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.39.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#42180](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42180) [`80f857d75db`](https://bitbucket.org/atlassian/atlassian-frontend/commits/80f857d75db) - [ux] Add hideIcon prop to resolved, resolving, and error states for TitleBlock
|
|
8
|
+
|
|
3
9
|
## 26.38.1
|
|
4
10
|
|
|
5
11
|
### 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.
|
|
25
|
+
packageVersion: "26.39.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -17,7 +17,7 @@ var _constants = require("../../../../../../constants");
|
|
|
17
17
|
var _utils = require("../../../utils");
|
|
18
18
|
var _elementGroup = _interopRequireDefault(require("../../element-group"));
|
|
19
19
|
var _token = require("../../../../../../utils/token");
|
|
20
|
-
var _excluded = ["actionGroup", "retry", "position", "testId", "title"];
|
|
20
|
+
var _excluded = ["actionGroup", "retry", "position", "testId", "title", "hideIcon"];
|
|
21
21
|
var _templateObject, _templateObject2;
|
|
22
22
|
/** @jsx jsx */
|
|
23
23
|
var actionStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n :hover {\n color: ", ";\n text-decoration: underline;\n }\n"])), _token.tokens.errorMessageHover);
|
|
@@ -39,6 +39,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
39
39
|
position = _ref.position,
|
|
40
40
|
testId = _ref.testId,
|
|
41
41
|
title = _ref.title,
|
|
42
|
+
hideIcon = _ref.hideIcon,
|
|
42
43
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
44
|
var _ref2 = retry || {},
|
|
44
45
|
descriptor = _ref2.descriptor,
|
|
@@ -49,7 +50,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
49
50
|
var hasAction = onClick !== undefined;
|
|
50
51
|
return (0, _react2.jsx)(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
51
52
|
testId: "".concat(testId, "-errored-view")
|
|
52
|
-
}), (0, _react2.jsx)(_elements.LinkIcon, {
|
|
53
|
+
}), !hideIcon && (0, _react2.jsx)(_elements.LinkIcon, {
|
|
53
54
|
position: position
|
|
54
55
|
}), title, descriptor && (0, _react2.jsx)(_elementGroup.default, {
|
|
55
56
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
@@ -19,7 +19,7 @@ var _errored = _interopRequireDefault(require("./errored"));
|
|
|
19
19
|
var _resolving = _interopRequireDefault(require("./resolving"));
|
|
20
20
|
var _actionGroup = _interopRequireDefault(require("../action-group"));
|
|
21
21
|
var _elements = require("../../elements");
|
|
22
|
-
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry", "metadataPosition"];
|
|
22
|
+
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry", "metadataPosition", "hideIcon"];
|
|
23
23
|
var _templateObject, _templateObject2;
|
|
24
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
25
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -75,6 +75,8 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
75
75
|
theme = _ref.theme,
|
|
76
76
|
hideRetry = _ref.hideRetry,
|
|
77
77
|
metadataPosition = _ref.metadataPosition,
|
|
78
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
79
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
78
80
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
79
81
|
if (hideRetry && props.retry) {
|
|
80
82
|
delete props.retry;
|
|
@@ -116,7 +118,8 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
116
118
|
overrideCss: combinedCss,
|
|
117
119
|
testId: testId,
|
|
118
120
|
title: title,
|
|
119
|
-
metadataPosition: metadataPosition
|
|
121
|
+
metadataPosition: metadataPosition,
|
|
122
|
+
hideIcon: hideIcon
|
|
120
123
|
}));
|
|
121
124
|
};
|
|
122
125
|
var _default = exports.default = TitleBlock;
|
|
@@ -33,8 +33,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
33
33
|
text = _ref.text,
|
|
34
34
|
title = _ref.title,
|
|
35
35
|
metadataPosition = _ref.metadataPosition,
|
|
36
|
-
|
|
37
|
-
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
36
|
+
hideIcon = _ref.hideIcon,
|
|
38
37
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
38
|
var metadataElements = (0, _utils.renderElementItems)(metadata);
|
|
40
39
|
var subtitleElements = (0, _utils.renderElementItems)(subtitle);
|
|
@@ -13,7 +13,7 @@ var _block = _interopRequireDefault(require("../../block"));
|
|
|
13
13
|
var _constants = require("../../../../../../constants");
|
|
14
14
|
var _loadingSkeleton = _interopRequireDefault(require("../../../common/loading-skeleton"));
|
|
15
15
|
var _utils = require("../../../utils");
|
|
16
|
-
var _excluded = ["actionGroup", "testId", "title"];
|
|
16
|
+
var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
17
17
|
/** @jsx jsx */
|
|
18
18
|
/**
|
|
19
19
|
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
@@ -25,6 +25,7 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
25
25
|
var actionGroup = _ref.actionGroup,
|
|
26
26
|
testId = _ref.testId,
|
|
27
27
|
title = _ref.title,
|
|
28
|
+
hideIcon = _ref.hideIcon,
|
|
28
29
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
30
|
var _blockProps$size = blockProps.size,
|
|
30
31
|
size = _blockProps$size === void 0 ? _constants.SmartLinkSize.Medium : _blockProps$size;
|
|
@@ -32,7 +33,7 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
32
33
|
var iconStyles = (0, _utils.getIconSizeStyles)(iconWidth);
|
|
33
34
|
return (0, _react2.jsx)(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
34
35
|
testId: "".concat(testId, "-resolving-view")
|
|
35
|
-
}), (0, _react2.jsx)("span", {
|
|
36
|
+
}), !hideIcon && (0, _react2.jsx)("span", {
|
|
36
37
|
css: iconStyles,
|
|
37
38
|
"data-testid": "".concat(testId, "-icon")
|
|
38
39
|
}, (0, _react2.jsx)(_loadingSkeleton.default, {
|
|
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
18
18
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
19
19
|
var PACKAGE_DATA = {
|
|
20
20
|
packageName: "@atlaskit/smart-card",
|
|
21
|
-
packageVersion: "26.
|
|
21
|
+
packageVersion: "26.39.0",
|
|
22
22
|
componentName: 'linkUrl'
|
|
23
23
|
};
|
|
24
24
|
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.
|
|
7
|
+
packageVersion: "26.39.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -44,6 +44,7 @@ const TitleBlockErroredView = ({
|
|
|
44
44
|
position,
|
|
45
45
|
testId,
|
|
46
46
|
title,
|
|
47
|
+
hideIcon,
|
|
47
48
|
...blockProps
|
|
48
49
|
}) => {
|
|
49
50
|
const {
|
|
@@ -57,7 +58,7 @@ const TitleBlockErroredView = ({
|
|
|
57
58
|
const hasAction = onClick !== undefined;
|
|
58
59
|
return jsx(Block, _extends({}, blockProps, {
|
|
59
60
|
testId: `${testId}-errored-view`
|
|
60
|
-
}), jsx(LinkIcon, {
|
|
61
|
+
}), !hideIcon && jsx(LinkIcon, {
|
|
61
62
|
position: position
|
|
62
63
|
}), title, descriptor && jsx(ElementGroup, {
|
|
63
64
|
direction: SmartLinkDirection.Horizontal,
|
|
@@ -66,6 +66,7 @@ const TitleBlock = ({
|
|
|
66
66
|
theme,
|
|
67
67
|
hideRetry,
|
|
68
68
|
metadataPosition,
|
|
69
|
+
hideIcon = false,
|
|
69
70
|
...props
|
|
70
71
|
}) => {
|
|
71
72
|
if (hideRetry && props.retry) {
|
|
@@ -107,7 +108,8 @@ const TitleBlock = ({
|
|
|
107
108
|
overrideCss: combinedCss,
|
|
108
109
|
testId: testId,
|
|
109
110
|
title: title,
|
|
110
|
-
metadataPosition: metadataPosition
|
|
111
|
+
metadataPosition: metadataPosition,
|
|
112
|
+
hideIcon: hideIcon
|
|
111
113
|
}));
|
|
112
114
|
};
|
|
113
115
|
export default TitleBlock;
|
|
@@ -17,6 +17,7 @@ const TitleBlockResolvingView = ({
|
|
|
17
17
|
actionGroup,
|
|
18
18
|
testId,
|
|
19
19
|
title,
|
|
20
|
+
hideIcon,
|
|
20
21
|
...blockProps
|
|
21
22
|
}) => {
|
|
22
23
|
const {
|
|
@@ -26,7 +27,7 @@ const TitleBlockResolvingView = ({
|
|
|
26
27
|
const iconStyles = getIconSizeStyles(iconWidth);
|
|
27
28
|
return jsx(Block, _extends({}, blockProps, {
|
|
28
29
|
testId: `${testId}-resolving-view`
|
|
29
|
-
}), jsx("span", {
|
|
30
|
+
}), !hideIcon && jsx("span", {
|
|
30
31
|
css: iconStyles,
|
|
31
32
|
"data-testid": `${testId}-icon`
|
|
32
33
|
}, jsx(LoadingSkeleton, {
|
|
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
const PACKAGE_DATA = {
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.
|
|
11
|
+
packageVersion: "26.39.0",
|
|
12
12
|
componentName: 'linkUrl'
|
|
13
13
|
};
|
|
14
14
|
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.
|
|
18
|
+
packageVersion: "26.39.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
|
-
var _excluded = ["actionGroup", "retry", "position", "testId", "title"];
|
|
4
|
+
var _excluded = ["actionGroup", "retry", "position", "testId", "title", "hideIcon"];
|
|
5
5
|
var _templateObject, _templateObject2;
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
import React from 'react';
|
|
@@ -32,6 +32,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
32
32
|
position = _ref.position,
|
|
33
33
|
testId = _ref.testId,
|
|
34
34
|
title = _ref.title,
|
|
35
|
+
hideIcon = _ref.hideIcon,
|
|
35
36
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
36
37
|
var _ref2 = retry || {},
|
|
37
38
|
descriptor = _ref2.descriptor,
|
|
@@ -42,7 +43,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
42
43
|
var hasAction = onClick !== undefined;
|
|
43
44
|
return jsx(Block, _extends({}, blockProps, {
|
|
44
45
|
testId: "".concat(testId, "-errored-view")
|
|
45
|
-
}), jsx(LinkIcon, {
|
|
46
|
+
}), !hideIcon && jsx(LinkIcon, {
|
|
46
47
|
position: position
|
|
47
48
|
}), title, descriptor && jsx(ElementGroup, {
|
|
48
49
|
direction: SmartLinkDirection.Horizontal,
|
|
@@ -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", "hideRetry", "metadataPosition"];
|
|
5
|
+
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "overrideCss", "status", "showActionOnHover", "testId", "text", "theme", "hideRetry", "metadataPosition", "hideIcon"];
|
|
6
6
|
var _templateObject, _templateObject2;
|
|
7
7
|
import React, { useCallback, useState } from 'react';
|
|
8
8
|
import { css } from '@emotion/react';
|
|
@@ -65,6 +65,8 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
65
65
|
theme = _ref.theme,
|
|
66
66
|
hideRetry = _ref.hideRetry,
|
|
67
67
|
metadataPosition = _ref.metadataPosition,
|
|
68
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
69
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
68
70
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
69
71
|
if (hideRetry && props.retry) {
|
|
70
72
|
delete props.retry;
|
|
@@ -106,7 +108,8 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
106
108
|
overrideCss: combinedCss,
|
|
107
109
|
testId: testId,
|
|
108
110
|
title: title,
|
|
109
|
-
metadataPosition: metadataPosition
|
|
111
|
+
metadataPosition: metadataPosition,
|
|
112
|
+
hideIcon: hideIcon
|
|
110
113
|
}));
|
|
111
114
|
};
|
|
112
115
|
export default TitleBlock;
|
|
@@ -27,8 +27,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
27
27
|
text = _ref.text,
|
|
28
28
|
title = _ref.title,
|
|
29
29
|
metadataPosition = _ref.metadataPosition,
|
|
30
|
-
|
|
31
|
-
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
30
|
+
hideIcon = _ref.hideIcon,
|
|
32
31
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
32
|
var metadataElements = renderElementItems(metadata);
|
|
34
33
|
var subtitleElements = renderElementItems(subtitle);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["actionGroup", "testId", "title"];
|
|
3
|
+
var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
@@ -19,6 +19,7 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
19
19
|
var actionGroup = _ref.actionGroup,
|
|
20
20
|
testId = _ref.testId,
|
|
21
21
|
title = _ref.title,
|
|
22
|
+
hideIcon = _ref.hideIcon,
|
|
22
23
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
24
|
var _blockProps$size = blockProps.size,
|
|
24
25
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
@@ -26,7 +27,7 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
26
27
|
var iconStyles = getIconSizeStyles(iconWidth);
|
|
27
28
|
return jsx(Block, _extends({}, blockProps, {
|
|
28
29
|
testId: "".concat(testId, "-resolving-view")
|
|
29
|
-
}), jsx("span", {
|
|
30
|
+
}), !hideIcon && jsx("span", {
|
|
30
31
|
css: iconStyles,
|
|
31
32
|
"data-testid": "".concat(testId, "-icon")
|
|
32
33
|
}, jsx(LoadingSkeleton, {
|
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
var PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.
|
|
14
|
+
packageVersion: "26.39.0",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|