@atlaskit/smart-card 26.38.1 → 26.40.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/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +4 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +34 -11
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.js +48 -0
- package/dist/cjs/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- 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/BlockCard/index.js +4 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +36 -16
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.js +38 -0
- package/dist/es2019/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- 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/BlockCard/index.js +4 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +31 -11
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.js +42 -0
- package/dist/esm/view/BlockCard/views/flexible/unresolved-view/index.js +1 -0
- 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/dist/types/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.d.ts +8 -0
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.d.ts +8 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.40.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#42280](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42280) [`df99143a991`](https://bitbucket.org/atlassian/atlassian-frontend/commits/df99143a991) - [ux] Update block card not found view to improve cross join (behind feature flag)
|
|
8
|
+
|
|
9
|
+
## 26.39.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
3
15
|
## 26.38.1
|
|
4
16
|
|
|
5
17
|
### 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.40.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -76,6 +76,7 @@ var _ErroredView = require("./views/ErroredView");
|
|
|
76
76
|
var _FlexibleResolvedView = _interopRequireDefault(require("./views/flexible/FlexibleResolvedView"));
|
|
77
77
|
var _FlexibleUnauthorisedView = _interopRequireDefault(require("./views/flexible/FlexibleUnauthorisedView"));
|
|
78
78
|
var _FlexibleNotFoundView = _interopRequireDefault(require("./views/flexible/FlexibleNotFoundView"));
|
|
79
|
+
var _FlexibleNotFoundViewOld = _interopRequireDefault(require("./views/flexible/FlexibleNotFoundViewOld"));
|
|
79
80
|
var _FlexibleForbiddenView = _interopRequireDefault(require("./views/flexible/FlexibleForbiddenView"));
|
|
80
81
|
var _FlexibleForbiddenViewOld = _interopRequireDefault(require("./views/flexible/FlexibleForbiddenViewOld"));
|
|
81
82
|
var _FlexibleErroredView = _interopRequireDefault(require("./views/flexible/FlexibleErroredView"));
|
|
@@ -150,7 +151,9 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
|
|
|
150
151
|
onAuthorize: handleAuthorize
|
|
151
152
|
}));
|
|
152
153
|
case 'not_found':
|
|
153
|
-
return (0, _react.jsx)(_FlexibleNotFoundView.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
154
|
+
return (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.cross-join') ? (0, _react.jsx)(_FlexibleNotFoundView.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
155
|
+
onAuthorize: handleAuthorize
|
|
156
|
+
})) : (0, _react.jsx)(_FlexibleNotFoundViewOld.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
154
157
|
onAuthorize: handleAuthorize
|
|
155
158
|
}));
|
|
156
159
|
case 'fallback':
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
11
|
+
var _lock = _interopRequireDefault(require("@atlaskit/icon/glyph/lock"));
|
|
12
|
+
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
13
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _reactIntlNext = require("react-intl-next");
|
|
16
|
+
var _messages = require("../../../../messages");
|
|
14
17
|
var _text = _interopRequireDefault(require("../../../FlexibleCard/components/elements/text"));
|
|
15
18
|
var _unresolvedView = _interopRequireDefault(require("./unresolved-view"));
|
|
16
19
|
var _withFlexibleUIBlockCardStyle = require("./utils/withFlexibleUIBlockCardStyle");
|
|
17
20
|
var _excluded = ["testId"];
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
18
23
|
/**
|
|
19
24
|
* This view represents a Block Card with a 'Not_Found' status.
|
|
20
25
|
*
|
|
@@ -22,20 +27,38 @@ var _excluded = ["testId"];
|
|
|
22
27
|
* @see FlexibleCardProps
|
|
23
28
|
*/
|
|
24
29
|
var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
|
|
30
|
+
var _cardState$details2;
|
|
25
31
|
var _ref$testId = _ref.testId,
|
|
26
32
|
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
27
33
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
34
|
+
var intl = (0, _reactIntlNext.useIntl)();
|
|
35
|
+
var cardState = props.cardState;
|
|
36
|
+
var product = (0, _react.useMemo)(function () {
|
|
37
|
+
var _cardState$details, _provider$text;
|
|
38
|
+
var provider = (0, _linkExtractors.extractProvider)(cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
|
|
39
|
+
return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
|
|
40
|
+
}, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
|
|
41
|
+
var title = (0, _react.useMemo)(function () {
|
|
42
|
+
return intl.formatMessage(_messages.messages.not_found_title_crossjoin, {
|
|
43
|
+
product: product
|
|
44
|
+
});
|
|
45
|
+
}, [intl, product]);
|
|
46
|
+
var description = (0, _react.useMemo)(function () {
|
|
47
|
+
return {
|
|
48
|
+
descriptor: _messages.messages.not_found_description_crossjoin
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
28
51
|
return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, props, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
52
|
+
showPreview: true,
|
|
53
|
+
testId: testId,
|
|
54
|
+
title: title
|
|
55
|
+
}), /*#__PURE__*/_react.default.createElement(_lock.default, {
|
|
56
|
+
label: "not-found-lock-icon",
|
|
32
57
|
size: "small",
|
|
33
|
-
primaryColor: "var(--ds-icon-
|
|
34
|
-
testId: "".concat(testId, "-
|
|
58
|
+
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
|
|
59
|
+
testId: "".concat(testId, "-lock-icon")
|
|
35
60
|
}), /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
36
|
-
message:
|
|
37
|
-
descriptor: _messages.messages.not_found_description
|
|
38
|
-
},
|
|
61
|
+
message: description,
|
|
39
62
|
testId: "".concat(testId, "-message")
|
|
40
63
|
}));
|
|
41
64
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _messages = require("../../../../messages");
|
|
12
|
+
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
13
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
14
|
+
var _text = _interopRequireDefault(require("../../../FlexibleCard/components/elements/text"));
|
|
15
|
+
var _unresolvedView = _interopRequireDefault(require("./unresolved-view"));
|
|
16
|
+
var _withFlexibleUIBlockCardStyle = require("./utils/withFlexibleUIBlockCardStyle");
|
|
17
|
+
var _excluded = ["testId"];
|
|
18
|
+
/**
|
|
19
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
20
|
+
*
|
|
21
|
+
* @see SmartLinkStatus
|
|
22
|
+
* @see FlexibleCardProps
|
|
23
|
+
*/
|
|
24
|
+
var FlexibleNotFoundViewOld = function FlexibleNotFoundViewOld(_ref) {
|
|
25
|
+
var _ref$testId = _ref.testId,
|
|
26
|
+
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
27
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, props, {
|
|
29
|
+
testId: testId
|
|
30
|
+
}), /*#__PURE__*/_react.default.createElement(_warning.default, {
|
|
31
|
+
label: "not-found-warning-icon",
|
|
32
|
+
size: "small",
|
|
33
|
+
primaryColor: "var(--ds-icon-warning, ".concat(_colors.R300, ")"),
|
|
34
|
+
testId: "".concat(testId, "-warning-icon")
|
|
35
|
+
}), /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
36
|
+
message: {
|
|
37
|
+
descriptor: _messages.messages.not_found_description
|
|
38
|
+
},
|
|
39
|
+
testId: "".concat(testId, "-message")
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @private
|
|
45
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
46
|
+
* @deprecated Replaced by FlexibleNotFoundView
|
|
47
|
+
*/
|
|
48
|
+
var _default = exports.default = (0, _withFlexibleUIBlockCardStyle.withFlexibleUIBlockCardStyle)(FlexibleNotFoundViewOld);
|
|
@@ -32,6 +32,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
32
32
|
ui: _utils.FlexibleCardUiOptions,
|
|
33
33
|
url: url
|
|
34
34
|
}, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, (0, _utils.getTitleBlockOptions)(), {
|
|
35
|
+
hideIcon: !!title,
|
|
35
36
|
text: title
|
|
36
37
|
})), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, null, children), showPreview && /*#__PURE__*/_react.default.createElement(_blocks.PreviewBlock, _utils.PreviewBlockOptions), /*#__PURE__*/_react.default.createElement(_blocks.InternalFooterBlock, (0, _extends2.default)({}, (0, _utils.getFooterBlockOptions)(), {
|
|
37
38
|
actions: actions,
|
|
@@ -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.40.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.40.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -17,6 +17,7 @@ import { ErroredView as BlockCardErroredView } from './views/ErroredView';
|
|
|
17
17
|
import FlexibleResolvedView from './views/flexible/FlexibleResolvedView';
|
|
18
18
|
import FlexibleUnauthorisedView from './views/flexible/FlexibleUnauthorisedView';
|
|
19
19
|
import FlexibleNotFoundView from './views/flexible/FlexibleNotFoundView';
|
|
20
|
+
import FlexibleNotFoundViewOld from './views/flexible/FlexibleNotFoundViewOld';
|
|
20
21
|
import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
|
|
21
22
|
import FlexibleForbiddenViewOld from './views/flexible/FlexibleForbiddenViewOld';
|
|
22
23
|
import FlexibleErroredView from './views/flexible/FlexibleErroredView';
|
|
@@ -91,7 +92,9 @@ export const BlockCard = ({
|
|
|
91
92
|
onAuthorize: handleAuthorize
|
|
92
93
|
}));
|
|
93
94
|
case 'not_found':
|
|
94
|
-
return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
95
|
+
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
96
|
+
onAuthorize: handleAuthorize
|
|
97
|
+
})) : jsx(FlexibleNotFoundViewOld, _extends({}, flexibleBlockCardProps, {
|
|
95
98
|
onAuthorize: handleAuthorize
|
|
96
99
|
}));
|
|
97
100
|
case 'fallback':
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
2
|
+
import LockIcon from '@atlaskit/icon/glyph/lock';
|
|
3
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
5
4
|
import { R300 } from '@atlaskit/theme/colors';
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
import { useIntl } from 'react-intl-next';
|
|
7
|
+
import { messages } from '../../../../messages';
|
|
6
8
|
import Text from '../../../FlexibleCard/components/elements/text';
|
|
7
9
|
import UnresolvedView from './unresolved-view';
|
|
8
10
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
@@ -16,17 +18,35 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
16
18
|
const FlexibleNotFoundView = ({
|
|
17
19
|
testId = 'smart-block-not-found-view',
|
|
18
20
|
...props
|
|
19
|
-
}) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
}) => {
|
|
22
|
+
var _cardState$details2;
|
|
23
|
+
const intl = useIntl();
|
|
24
|
+
const {
|
|
25
|
+
cardState
|
|
26
|
+
} = props;
|
|
27
|
+
const product = useMemo(() => {
|
|
28
|
+
var _cardState$details, _provider$text;
|
|
29
|
+
const provider = extractProvider(cardState === null || cardState === void 0 ? void 0 : (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
|
|
30
|
+
return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
|
|
31
|
+
}, [cardState === null || cardState === void 0 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
|
|
32
|
+
const title = useMemo(() => intl.formatMessage(messages.not_found_title_crossjoin, {
|
|
33
|
+
product
|
|
34
|
+
}), [intl, product]);
|
|
35
|
+
const description = useMemo(() => ({
|
|
36
|
+
descriptor: messages.not_found_description_crossjoin
|
|
37
|
+
}), []);
|
|
38
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
39
|
+
showPreview: true,
|
|
40
|
+
testId: testId,
|
|
41
|
+
title: title
|
|
42
|
+
}), /*#__PURE__*/React.createElement(LockIcon, {
|
|
43
|
+
label: "not-found-lock-icon",
|
|
44
|
+
size: "small",
|
|
45
|
+
primaryColor: `var(--ds-icon-danger, ${R300})`,
|
|
46
|
+
testId: `${testId}-lock-icon`
|
|
47
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
message: description,
|
|
49
|
+
testId: `${testId}-message`
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
32
52
|
export default withFlexibleUIBlockCardStyle(FlexibleNotFoundView);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { messages } from '../../../../messages';
|
|
4
|
+
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
5
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
6
|
+
import Text from '../../../FlexibleCard/components/elements/text';
|
|
7
|
+
import UnresolvedView from './unresolved-view';
|
|
8
|
+
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
12
|
+
*
|
|
13
|
+
* @see SmartLinkStatus
|
|
14
|
+
* @see FlexibleCardProps
|
|
15
|
+
*/
|
|
16
|
+
const FlexibleNotFoundViewOld = ({
|
|
17
|
+
testId = 'smart-block-not-found-view',
|
|
18
|
+
...props
|
|
19
|
+
}) => /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
20
|
+
testId: testId
|
|
21
|
+
}), /*#__PURE__*/React.createElement(WarningIcon, {
|
|
22
|
+
label: "not-found-warning-icon",
|
|
23
|
+
size: "small",
|
|
24
|
+
primaryColor: `var(--ds-icon-warning, ${R300})`,
|
|
25
|
+
testId: `${testId}-warning-icon`
|
|
26
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
27
|
+
message: {
|
|
28
|
+
descriptor: messages.not_found_description
|
|
29
|
+
},
|
|
30
|
+
testId: `${testId}-message`
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @private
|
|
35
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
36
|
+
* @deprecated Replaced by FlexibleNotFoundView
|
|
37
|
+
*/
|
|
38
|
+
export default withFlexibleUIBlockCardStyle(FlexibleNotFoundViewOld);
|
|
@@ -25,6 +25,7 @@ const UnresolvedView = ({
|
|
|
25
25
|
ui: FlexibleCardUiOptions,
|
|
26
26
|
url: url
|
|
27
27
|
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
|
|
28
|
+
hideIcon: !!title,
|
|
28
29
|
text: title
|
|
29
30
|
})), /*#__PURE__*/React.createElement(CustomBlock, null, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({}, getFooterBlockOptions(), {
|
|
30
31
|
actions: actions,
|
|
@@ -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.40.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.40.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -17,6 +17,7 @@ import { ErroredView as BlockCardErroredView } from './views/ErroredView';
|
|
|
17
17
|
import FlexibleResolvedView from './views/flexible/FlexibleResolvedView';
|
|
18
18
|
import FlexibleUnauthorisedView from './views/flexible/FlexibleUnauthorisedView';
|
|
19
19
|
import FlexibleNotFoundView from './views/flexible/FlexibleNotFoundView';
|
|
20
|
+
import FlexibleNotFoundViewOld from './views/flexible/FlexibleNotFoundViewOld';
|
|
20
21
|
import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
|
|
21
22
|
import FlexibleForbiddenViewOld from './views/flexible/FlexibleForbiddenViewOld';
|
|
22
23
|
import FlexibleErroredView from './views/flexible/FlexibleErroredView';
|
|
@@ -90,7 +91,9 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
90
91
|
onAuthorize: handleAuthorize
|
|
91
92
|
}));
|
|
92
93
|
case 'not_found':
|
|
93
|
-
return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
94
|
+
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
95
|
+
onAuthorize: handleAuthorize
|
|
96
|
+
})) : jsx(FlexibleNotFoundViewOld, _extends({}, flexibleBlockCardProps, {
|
|
94
97
|
onAuthorize: handleAuthorize
|
|
95
98
|
}));
|
|
96
99
|
case 'fallback':
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["testId"];
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
4
|
+
import LockIcon from '@atlaskit/icon/glyph/lock';
|
|
5
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
7
6
|
import { R300 } from '@atlaskit/theme/colors';
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
|
+
import { useIntl } from 'react-intl-next';
|
|
9
|
+
import { messages } from '../../../../messages';
|
|
8
10
|
import Text from '../../../FlexibleCard/components/elements/text';
|
|
9
11
|
import UnresolvedView from './unresolved-view';
|
|
10
12
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
@@ -16,20 +18,38 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
16
18
|
* @see FlexibleCardProps
|
|
17
19
|
*/
|
|
18
20
|
var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
|
|
21
|
+
var _cardState$details2;
|
|
19
22
|
var _ref$testId = _ref.testId,
|
|
20
23
|
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
21
24
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
var intl = useIntl();
|
|
26
|
+
var cardState = props.cardState;
|
|
27
|
+
var product = useMemo(function () {
|
|
28
|
+
var _cardState$details, _provider$text;
|
|
29
|
+
var provider = extractProvider(cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
|
|
30
|
+
return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
|
|
31
|
+
}, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
|
|
32
|
+
var title = useMemo(function () {
|
|
33
|
+
return intl.formatMessage(messages.not_found_title_crossjoin, {
|
|
34
|
+
product: product
|
|
35
|
+
});
|
|
36
|
+
}, [intl, product]);
|
|
37
|
+
var description = useMemo(function () {
|
|
38
|
+
return {
|
|
39
|
+
descriptor: messages.not_found_description_crossjoin
|
|
40
|
+
};
|
|
41
|
+
}, []);
|
|
22
42
|
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
showPreview: true,
|
|
44
|
+
testId: testId,
|
|
45
|
+
title: title
|
|
46
|
+
}), /*#__PURE__*/React.createElement(LockIcon, {
|
|
47
|
+
label: "not-found-lock-icon",
|
|
26
48
|
size: "small",
|
|
27
|
-
primaryColor: "var(--ds-icon-
|
|
28
|
-
testId: "".concat(testId, "-
|
|
49
|
+
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
50
|
+
testId: "".concat(testId, "-lock-icon")
|
|
29
51
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
30
|
-
message:
|
|
31
|
-
descriptor: messages.not_found_description
|
|
32
|
-
},
|
|
52
|
+
message: description,
|
|
33
53
|
testId: "".concat(testId, "-message")
|
|
34
54
|
}));
|
|
35
55
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["testId"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { messages } from '../../../../messages';
|
|
6
|
+
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
7
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
8
|
+
import Text from '../../../FlexibleCard/components/elements/text';
|
|
9
|
+
import UnresolvedView from './unresolved-view';
|
|
10
|
+
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
14
|
+
*
|
|
15
|
+
* @see SmartLinkStatus
|
|
16
|
+
* @see FlexibleCardProps
|
|
17
|
+
*/
|
|
18
|
+
var FlexibleNotFoundViewOld = function FlexibleNotFoundViewOld(_ref) {
|
|
19
|
+
var _ref$testId = _ref.testId,
|
|
20
|
+
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
23
|
+
testId: testId
|
|
24
|
+
}), /*#__PURE__*/React.createElement(WarningIcon, {
|
|
25
|
+
label: "not-found-warning-icon",
|
|
26
|
+
size: "small",
|
|
27
|
+
primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
|
|
28
|
+
testId: "".concat(testId, "-warning-icon")
|
|
29
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
30
|
+
message: {
|
|
31
|
+
descriptor: messages.not_found_description
|
|
32
|
+
},
|
|
33
|
+
testId: "".concat(testId, "-message")
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @private
|
|
39
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
40
|
+
* @deprecated Replaced by FlexibleNotFoundView
|
|
41
|
+
*/
|
|
42
|
+
export default withFlexibleUIBlockCardStyle(FlexibleNotFoundViewOld);
|
|
@@ -26,6 +26,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
26
26
|
ui: FlexibleCardUiOptions,
|
|
27
27
|
url: url
|
|
28
28
|
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
|
|
29
|
+
hideIcon: !!title,
|
|
29
30
|
text: title
|
|
30
31
|
})), /*#__PURE__*/React.createElement(CustomBlock, null, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({}, getFooterBlockOptions(), {
|
|
31
32
|
actions: actions,
|
|
@@ -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.40.0",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlexibleBlockCardProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
5
|
+
* @deprecated Replaced by FlexibleNotFoundView
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlexibleBlockCardProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
5
|
+
* @deprecated Replaced by FlexibleNotFoundView
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
|
|
8
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.40.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
37
37
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
38
38
|
"@atlaskit/link-analytics": "^8.3.0",
|
|
39
|
-
"@atlaskit/link-client-extension": "^1.
|
|
39
|
+
"@atlaskit/link-client-extension": "^1.8.0",
|
|
40
40
|
"@atlaskit/link-extractors": "^1.2.0",
|
|
41
41
|
"@atlaskit/linking-common": "^4.12.0",
|
|
42
42
|
"@atlaskit/linking-types": "^8.4.0",
|