@atlaskit/smart-card 26.5.5 → 26.5.6
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/version.json +1 -1
- package/dist/cjs/view/BlockCard/index.js +9 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +4 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +4 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +4 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +10 -5
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/index.js +6 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +3 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +3 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +3 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +9 -5
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/index.js +9 -2
- package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +4 -2
- package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +4 -2
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +4 -2
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +10 -5
- package/dist/types/view/BlockCard/views/flexible/FlexibleErroredView.d.ts +1 -1
- package/dist/types/view/BlockCard/views/flexible/FlexibleForbiddenView.d.ts +1 -1
- package/dist/types/view/BlockCard/views/flexible/FlexibleNotFoundView.d.ts +1 -1
- package/dist/types/view/BlockCard/views/flexible/FlexibleResolvedView.d.ts +1 -1
- package/dist/types/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +1 -1
- package/dist/types/view/BlockCard/views/flexible/types.d.ts +9 -4
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleErroredView.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleForbiddenView.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleNotFoundView.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleResolvedView.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/flexible/types.d.ts +9 -4
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`625aad4d6f8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/625aad4d6f8) - [ux] Change block card link clicks to open in the same tab by default unless overriden with onclick behaviour.
|
|
8
|
+
|
|
3
9
|
## 26.5.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -60,6 +60,7 @@ Object.defineProperty(exports, "PreviewAction", {
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
63
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
63
64
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
64
65
|
var _helpers = require("../../state/helpers");
|
|
65
66
|
var _block = require("../../extractors/block");
|
|
@@ -83,9 +84,12 @@ var _token = require("../../utils/token");
|
|
|
83
84
|
var _react = require("@emotion/react");
|
|
84
85
|
var _handlers = require("./utils/handlers");
|
|
85
86
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
87
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
86
88
|
var _PreviewAction = _interopRequireDefault(require("./actions/PreviewAction"));
|
|
87
89
|
var _templateObject;
|
|
88
90
|
/** @jsx jsx */
|
|
91
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
92
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
89
93
|
var flexibleBlockCardElevationStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 1.5px;\n box-shadow: ", ";\n margin: ", ";\n"])), _token.tokens.elevation, "var(--ds-space-025, 2px)");
|
|
90
94
|
var BlockCard = function BlockCard(_ref) {
|
|
91
95
|
var _details$meta, _forbiddenViewProps$c;
|
|
@@ -123,7 +127,8 @@ var BlockCard = function BlockCard(_ref) {
|
|
|
123
127
|
var ui = {
|
|
124
128
|
hideElevation: true
|
|
125
129
|
};
|
|
126
|
-
var
|
|
130
|
+
var anchorTarget = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab') ? '_self' : undefined;
|
|
131
|
+
var flexibleProps = _objectSpread({
|
|
127
132
|
id: id,
|
|
128
133
|
cardState: cardState,
|
|
129
134
|
url: url,
|
|
@@ -138,7 +143,9 @@ var BlockCard = function BlockCard(_ref) {
|
|
|
138
143
|
ui: ui,
|
|
139
144
|
analytics: analytics,
|
|
140
145
|
extensionKey: extensionKey
|
|
141
|
-
}
|
|
146
|
+
}, anchorTarget ? {
|
|
147
|
+
anchorTarget: anchorTarget
|
|
148
|
+
} : {});
|
|
142
149
|
switch (status) {
|
|
143
150
|
case 'pending':
|
|
144
151
|
case 'resolving':
|
|
@@ -25,7 +25,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
* @see FlexibleCardProps
|
|
26
26
|
*/
|
|
27
27
|
var FlexibleErroredView = function FlexibleErroredView(_ref) {
|
|
28
|
-
var
|
|
28
|
+
var anchorTarget = _ref.anchorTarget,
|
|
29
|
+
cardState = _ref.cardState,
|
|
29
30
|
onAuthorize = _ref.onAuthorize,
|
|
30
31
|
onError = _ref.onError,
|
|
31
32
|
ui = _ref.ui,
|
|
@@ -46,7 +47,8 @@ var FlexibleErroredView = function FlexibleErroredView(_ref) {
|
|
|
46
47
|
ui: ui,
|
|
47
48
|
url: url
|
|
48
49
|
}, /*#__PURE__*/_react.default.createElement(_titleBlock.default, {
|
|
49
|
-
hideRetry: true
|
|
50
|
+
hideRetry: true,
|
|
51
|
+
anchorTarget: anchorTarget
|
|
50
52
|
}), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, null, /*#__PURE__*/_react.default.createElement(_warning.default, {
|
|
51
53
|
label: "errored-warning-icon",
|
|
52
54
|
size: "small",
|
|
@@ -31,7 +31,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
31
31
|
*/
|
|
32
32
|
var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
|
|
33
33
|
var _details$meta;
|
|
34
|
-
var
|
|
34
|
+
var anchorTarget = _ref.anchorTarget,
|
|
35
|
+
cardState = _ref.cardState,
|
|
35
36
|
onAuthorize = _ref.onAuthorize,
|
|
36
37
|
onClick = _ref.onClick,
|
|
37
38
|
onError = _ref.onError,
|
|
@@ -70,7 +71,8 @@ var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
|
|
|
70
71
|
ui: ui,
|
|
71
72
|
url: url
|
|
72
73
|
}, /*#__PURE__*/_react.default.createElement(_titleBlock.default, {
|
|
73
|
-
hideRetry: true
|
|
74
|
+
hideRetry: true,
|
|
75
|
+
anchorTarget: anchorTarget
|
|
74
76
|
}), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
|
|
75
77
|
label: "forbidden-lock-icon",
|
|
76
78
|
size: "small",
|
|
@@ -21,7 +21,8 @@ var _blocks = require("../../../FlexibleCard/components/blocks");
|
|
|
21
21
|
* @see FlexibleCardProps
|
|
22
22
|
*/
|
|
23
23
|
var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
|
|
24
|
-
var
|
|
24
|
+
var anchorTarget = _ref.anchorTarget,
|
|
25
|
+
cardState = _ref.cardState,
|
|
25
26
|
onAuthorize = _ref.onAuthorize,
|
|
26
27
|
onError = _ref.onError,
|
|
27
28
|
ui = _ref.ui,
|
|
@@ -40,7 +41,8 @@ var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
|
|
|
40
41
|
ui: ui,
|
|
41
42
|
url: url
|
|
42
43
|
}, /*#__PURE__*/_react.default.createElement(_titleBlock.default, {
|
|
43
|
-
hideRetry: true
|
|
44
|
+
hideRetry: true,
|
|
45
|
+
anchorTarget: anchorTarget
|
|
44
46
|
}), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, null, /*#__PURE__*/_react.default.createElement(_warning.default, {
|
|
45
47
|
label: "not-found-warning-icon",
|
|
46
48
|
size: "small",
|
|
@@ -29,6 +29,7 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
29
29
|
onError = _ref.onError,
|
|
30
30
|
onResolve = _ref.onResolve,
|
|
31
31
|
showServerActions = _ref.showServerActions,
|
|
32
|
+
anchorTarget = _ref.anchorTarget,
|
|
32
33
|
_ref$testId = _ref.testId,
|
|
33
34
|
testId = _ref$testId === void 0 ? 'smart-block-resolved-view' : _ref$testId,
|
|
34
35
|
ui = _ref.ui,
|
|
@@ -94,7 +95,8 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
94
95
|
subtitle: [{
|
|
95
96
|
name: _constants.ElementName.Location
|
|
96
97
|
}],
|
|
97
|
-
metadataPosition: _constants.SmartLinkPosition.Top
|
|
98
|
+
metadataPosition: _constants.SmartLinkPosition.Top,
|
|
99
|
+
anchorTarget: anchorTarget
|
|
98
100
|
}), /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
|
|
99
101
|
primary: metadata,
|
|
100
102
|
maxLines: 1
|
|
@@ -31,7 +31,8 @@ var contentStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _
|
|
|
31
31
|
*/
|
|
32
32
|
var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
33
33
|
var _cardState$details, _extractProvider;
|
|
34
|
-
var
|
|
34
|
+
var anchorTarget = _ref.anchorTarget,
|
|
35
|
+
analytics = _ref.analytics,
|
|
35
36
|
cardState = _ref.cardState,
|
|
36
37
|
_ref$extensionKey = _ref.extensionKey,
|
|
37
38
|
extensionKey = _ref$extensionKey === void 0 ? '' : _ref$extensionKey,
|
|
@@ -65,7 +66,8 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
65
66
|
ui: ui,
|
|
66
67
|
url: url
|
|
67
68
|
}, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, {
|
|
68
|
-
hideRetry: true
|
|
69
|
+
hideRetry: true,
|
|
70
|
+
anchorTarget: anchorTarget
|
|
69
71
|
}), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, {
|
|
70
72
|
overrideCss: contentStyles,
|
|
71
73
|
testId: "".concat(testId, "-content")
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _react2 = require("@emotion/react");
|
|
@@ -78,21 +79,25 @@ var Link = function Link(_ref) {
|
|
|
78
79
|
theme = _ref$theme === void 0 ? _constants.SmartLinkTheme.Link : _ref$theme,
|
|
79
80
|
url = _ref.url,
|
|
80
81
|
onClick = _ref.onClick,
|
|
81
|
-
target = _ref.target
|
|
82
|
+
_ref$target = _ref.target,
|
|
83
|
+
target = _ref$target === void 0 ? '_blank' : _ref$target;
|
|
82
84
|
var onMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
83
85
|
var hasSpace = (0, _react.useMemo)(function () {
|
|
84
86
|
return text ? (0, _utils.hasWhiteSpace)(text) : false;
|
|
85
87
|
}, [text]);
|
|
86
|
-
var anchor = (0, _react2.jsx)("a", {
|
|
88
|
+
var anchor = (0, _react2.jsx)("a", (0, _extends2.default)({
|
|
87
89
|
css: [getAnchorStyles(size, theme, getMaxLines(maxLines), hasSpace), overrideCss],
|
|
88
90
|
"data-smart-element": name,
|
|
89
91
|
"data-smart-element-link": true,
|
|
90
92
|
"data-testid": testId,
|
|
91
93
|
onClick: onClick,
|
|
92
94
|
onMouseDown: onMouseDown,
|
|
93
|
-
href: url
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
href: url
|
|
96
|
+
// We do not want set the target if it is the default value of '_self'. This prevents link
|
|
97
|
+
// click issues in Confluence and Trello which rely on it not being set unless necessary.
|
|
98
|
+
}, target !== '_self' && {
|
|
99
|
+
target: target
|
|
100
|
+
}), text);
|
|
96
101
|
return (0, _react2.jsx)("span", {
|
|
97
102
|
css: containerStyles
|
|
98
103
|
}, hideTooltip || text === undefined ? anchor : withTooltip(anchor, text, testId));
|
package/dist/es2019/version.json
CHANGED
|
@@ -23,6 +23,7 @@ import { tokens } from '../../utils/token';
|
|
|
23
23
|
import { css, jsx } from '@emotion/react';
|
|
24
24
|
import { handleClickCommon } from './utils/handlers';
|
|
25
25
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
26
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
26
27
|
export { default as PreviewAction } from './actions/PreviewAction';
|
|
27
28
|
export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, BlockCardForbiddenView, BlockCardErroredView, BlockCardNotFoundView };
|
|
28
29
|
const flexibleBlockCardElevationStyle = css`
|
|
@@ -69,6 +70,7 @@ export const BlockCard = ({
|
|
|
69
70
|
const ui = {
|
|
70
71
|
hideElevation: true
|
|
71
72
|
};
|
|
73
|
+
const anchorTarget = getBooleanFF('platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab') ? '_self' : undefined;
|
|
72
74
|
const flexibleProps = {
|
|
73
75
|
id,
|
|
74
76
|
cardState,
|
|
@@ -81,7 +83,10 @@ export const BlockCard = ({
|
|
|
81
83
|
showServerActions,
|
|
82
84
|
ui,
|
|
83
85
|
analytics,
|
|
84
|
-
extensionKey
|
|
86
|
+
extensionKey,
|
|
87
|
+
...(anchorTarget ? {
|
|
88
|
+
anchorTarget
|
|
89
|
+
} : {})
|
|
85
90
|
};
|
|
86
91
|
switch (status) {
|
|
87
92
|
case 'pending':
|
|
@@ -15,6 +15,7 @@ import Text from '../../../FlexibleCard/components/elements/text';
|
|
|
15
15
|
* @see FlexibleCardProps
|
|
16
16
|
*/
|
|
17
17
|
const FlexibleErroredView = ({
|
|
18
|
+
anchorTarget,
|
|
18
19
|
cardState,
|
|
19
20
|
onAuthorize,
|
|
20
21
|
onError,
|
|
@@ -34,7 +35,8 @@ const FlexibleErroredView = ({
|
|
|
34
35
|
ui: ui,
|
|
35
36
|
url: url
|
|
36
37
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
37
|
-
hideRetry: true
|
|
38
|
+
hideRetry: true,
|
|
39
|
+
anchorTarget: anchorTarget
|
|
38
40
|
}), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
39
41
|
label: "errored-warning-icon",
|
|
40
42
|
size: "small",
|
|
@@ -20,6 +20,7 @@ import { extractRequestAccessContext } from '../../../../extractors/common/conte
|
|
|
20
20
|
* @see FlexibleCardProps
|
|
21
21
|
*/
|
|
22
22
|
const FlexibleForbiddenView = ({
|
|
23
|
+
anchorTarget,
|
|
23
24
|
cardState,
|
|
24
25
|
onAuthorize,
|
|
25
26
|
onClick,
|
|
@@ -62,7 +63,8 @@ const FlexibleForbiddenView = ({
|
|
|
62
63
|
ui: ui,
|
|
63
64
|
url: url
|
|
64
65
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
65
|
-
hideRetry: true
|
|
66
|
+
hideRetry: true,
|
|
67
|
+
anchorTarget: anchorTarget
|
|
66
68
|
}), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
67
69
|
label: "forbidden-lock-icon",
|
|
68
70
|
size: "small",
|
|
@@ -14,6 +14,7 @@ import { CustomBlock } from '../../../FlexibleCard/components/blocks';
|
|
|
14
14
|
* @see FlexibleCardProps
|
|
15
15
|
*/
|
|
16
16
|
const FlexibleNotFoundView = ({
|
|
17
|
+
anchorTarget,
|
|
17
18
|
cardState,
|
|
18
19
|
onAuthorize,
|
|
19
20
|
onError,
|
|
@@ -33,7 +34,8 @@ const FlexibleNotFoundView = ({
|
|
|
33
34
|
ui: ui,
|
|
34
35
|
url: url
|
|
35
36
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
36
|
-
hideRetry: true
|
|
37
|
+
hideRetry: true,
|
|
38
|
+
anchorTarget: anchorTarget
|
|
37
39
|
}), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
38
40
|
label: "not-found-warning-icon",
|
|
39
41
|
size: "small",
|
|
@@ -17,6 +17,7 @@ const FlexibleResolvedView = ({
|
|
|
17
17
|
onError,
|
|
18
18
|
onResolve,
|
|
19
19
|
showServerActions,
|
|
20
|
+
anchorTarget,
|
|
20
21
|
testId = 'smart-block-resolved-view',
|
|
21
22
|
ui,
|
|
22
23
|
url,
|
|
@@ -76,7 +77,8 @@ const FlexibleResolvedView = ({
|
|
|
76
77
|
subtitle: [{
|
|
77
78
|
name: ElementName.Location
|
|
78
79
|
}],
|
|
79
|
-
metadataPosition: SmartLinkPosition.Top
|
|
80
|
+
metadataPosition: SmartLinkPosition.Top,
|
|
81
|
+
anchorTarget: anchorTarget
|
|
80
82
|
}), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
81
83
|
primary: metadata,
|
|
82
84
|
maxLines: 1
|
|
@@ -22,6 +22,7 @@ const contentStyles = css`
|
|
|
22
22
|
* @see FlexibleCardProps
|
|
23
23
|
*/
|
|
24
24
|
const FlexibleUnauthorisedView = ({
|
|
25
|
+
anchorTarget,
|
|
25
26
|
analytics,
|
|
26
27
|
cardState,
|
|
27
28
|
extensionKey = '',
|
|
@@ -54,7 +55,8 @@ const FlexibleUnauthorisedView = ({
|
|
|
54
55
|
ui: ui,
|
|
55
56
|
url: url
|
|
56
57
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
57
|
-
hideRetry: true
|
|
58
|
+
hideRetry: true,
|
|
59
|
+
anchorTarget: anchorTarget
|
|
58
60
|
}), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
59
61
|
overrideCss: contentStyles,
|
|
60
62
|
testId: `${testId}-content`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/** @jsx jsx */
|
|
2
3
|
import React, { useMemo } from 'react';
|
|
3
4
|
import { css, jsx } from '@emotion/react';
|
|
@@ -98,20 +99,23 @@ const Link = ({
|
|
|
98
99
|
theme = SmartLinkTheme.Link,
|
|
99
100
|
url,
|
|
100
101
|
onClick,
|
|
101
|
-
target
|
|
102
|
+
target = '_blank'
|
|
102
103
|
}) => {
|
|
103
104
|
const onMouseDown = useMouseDownEvent();
|
|
104
105
|
const hasSpace = useMemo(() => text ? hasWhiteSpace(text) : false, [text]);
|
|
105
|
-
const anchor = jsx("a", {
|
|
106
|
+
const anchor = jsx("a", _extends({
|
|
106
107
|
css: [getAnchorStyles(size, theme, getMaxLines(maxLines), hasSpace), overrideCss],
|
|
107
108
|
"data-smart-element": name,
|
|
108
109
|
"data-smart-element-link": true,
|
|
109
110
|
"data-testid": testId,
|
|
110
111
|
onClick: onClick,
|
|
111
112
|
onMouseDown: onMouseDown,
|
|
112
|
-
href: url
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
href: url
|
|
114
|
+
// We do not want set the target if it is the default value of '_self'. This prevents link
|
|
115
|
+
// click issues in Confluence and Trello which rely on it not being set unless necessary.
|
|
116
|
+
}, target !== '_self' && {
|
|
117
|
+
target
|
|
118
|
+
}), text);
|
|
115
119
|
return jsx("span", {
|
|
116
120
|
css: containerStyles
|
|
117
121
|
}, hideTooltip || text === undefined ? anchor : withTooltip(anchor, text, testId));
|
package/dist/esm/version.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
4
|
var _templateObject;
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
|
|
6
9
|
import { getExtensionKey } from '../../state/helpers';
|
|
@@ -25,6 +28,7 @@ import { tokens } from '../../utils/token';
|
|
|
25
28
|
import { css, jsx } from '@emotion/react';
|
|
26
29
|
import { handleClickCommon } from './utils/handlers';
|
|
27
30
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
31
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
28
32
|
export { default as PreviewAction } from './actions/PreviewAction';
|
|
29
33
|
export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, BlockCardForbiddenView, BlockCardErroredView, BlockCardNotFoundView };
|
|
30
34
|
var flexibleBlockCardElevationStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 1.5px;\n box-shadow: ", ";\n margin: ", ";\n"])), tokens.elevation, "var(--ds-space-025, 2px)");
|
|
@@ -64,7 +68,8 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
64
68
|
var ui = {
|
|
65
69
|
hideElevation: true
|
|
66
70
|
};
|
|
67
|
-
var
|
|
71
|
+
var anchorTarget = getBooleanFF('platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab') ? '_self' : undefined;
|
|
72
|
+
var flexibleProps = _objectSpread({
|
|
68
73
|
id: id,
|
|
69
74
|
cardState: cardState,
|
|
70
75
|
url: url,
|
|
@@ -79,7 +84,9 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
79
84
|
ui: ui,
|
|
80
85
|
analytics: analytics,
|
|
81
86
|
extensionKey: extensionKey
|
|
82
|
-
}
|
|
87
|
+
}, anchorTarget ? {
|
|
88
|
+
anchorTarget: anchorTarget
|
|
89
|
+
} : {});
|
|
83
90
|
switch (status) {
|
|
84
91
|
case 'pending':
|
|
85
92
|
case 'resolving':
|
|
@@ -15,7 +15,8 @@ import Text from '../../../FlexibleCard/components/elements/text';
|
|
|
15
15
|
* @see FlexibleCardProps
|
|
16
16
|
*/
|
|
17
17
|
var FlexibleErroredView = function FlexibleErroredView(_ref) {
|
|
18
|
-
var
|
|
18
|
+
var anchorTarget = _ref.anchorTarget,
|
|
19
|
+
cardState = _ref.cardState,
|
|
19
20
|
onAuthorize = _ref.onAuthorize,
|
|
20
21
|
onError = _ref.onError,
|
|
21
22
|
ui = _ref.ui,
|
|
@@ -36,7 +37,8 @@ var FlexibleErroredView = function FlexibleErroredView(_ref) {
|
|
|
36
37
|
ui: ui,
|
|
37
38
|
url: url
|
|
38
39
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
39
|
-
hideRetry: true
|
|
40
|
+
hideRetry: true,
|
|
41
|
+
anchorTarget: anchorTarget
|
|
40
42
|
}), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
41
43
|
label: "errored-warning-icon",
|
|
42
44
|
size: "small",
|
|
@@ -22,7 +22,8 @@ import { extractRequestAccessContext } from '../../../../extractors/common/conte
|
|
|
22
22
|
*/
|
|
23
23
|
var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
|
|
24
24
|
var _details$meta;
|
|
25
|
-
var
|
|
25
|
+
var anchorTarget = _ref.anchorTarget,
|
|
26
|
+
cardState = _ref.cardState,
|
|
26
27
|
onAuthorize = _ref.onAuthorize,
|
|
27
28
|
onClick = _ref.onClick,
|
|
28
29
|
onError = _ref.onError,
|
|
@@ -61,7 +62,8 @@ var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
|
|
|
61
62
|
ui: ui,
|
|
62
63
|
url: url
|
|
63
64
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
64
|
-
hideRetry: true
|
|
65
|
+
hideRetry: true,
|
|
66
|
+
anchorTarget: anchorTarget
|
|
65
67
|
}), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
66
68
|
label: "forbidden-lock-icon",
|
|
67
69
|
size: "small",
|
|
@@ -14,7 +14,8 @@ import { CustomBlock } from '../../../FlexibleCard/components/blocks';
|
|
|
14
14
|
* @see FlexibleCardProps
|
|
15
15
|
*/
|
|
16
16
|
var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
|
|
17
|
-
var
|
|
17
|
+
var anchorTarget = _ref.anchorTarget,
|
|
18
|
+
cardState = _ref.cardState,
|
|
18
19
|
onAuthorize = _ref.onAuthorize,
|
|
19
20
|
onError = _ref.onError,
|
|
20
21
|
ui = _ref.ui,
|
|
@@ -33,7 +34,8 @@ var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
|
|
|
33
34
|
ui: ui,
|
|
34
35
|
url: url
|
|
35
36
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
36
|
-
hideRetry: true
|
|
37
|
+
hideRetry: true,
|
|
38
|
+
anchorTarget: anchorTarget
|
|
37
39
|
}), /*#__PURE__*/React.createElement(CustomBlock, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
38
40
|
label: "not-found-warning-icon",
|
|
39
41
|
size: "small",
|
|
@@ -19,6 +19,7 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
19
19
|
onError = _ref.onError,
|
|
20
20
|
onResolve = _ref.onResolve,
|
|
21
21
|
showServerActions = _ref.showServerActions,
|
|
22
|
+
anchorTarget = _ref.anchorTarget,
|
|
22
23
|
_ref$testId = _ref.testId,
|
|
23
24
|
testId = _ref$testId === void 0 ? 'smart-block-resolved-view' : _ref$testId,
|
|
24
25
|
ui = _ref.ui,
|
|
@@ -84,7 +85,8 @@ var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
|
84
85
|
subtitle: [{
|
|
85
86
|
name: ElementName.Location
|
|
86
87
|
}],
|
|
87
|
-
metadataPosition: SmartLinkPosition.Top
|
|
88
|
+
metadataPosition: SmartLinkPosition.Top,
|
|
89
|
+
anchorTarget: anchorTarget
|
|
88
90
|
}), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
89
91
|
primary: metadata,
|
|
90
92
|
maxLines: 1
|
|
@@ -21,7 +21,8 @@ var contentStyles = css(_templateObject || (_templateObject = _taggedTemplateLit
|
|
|
21
21
|
*/
|
|
22
22
|
var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
23
23
|
var _cardState$details, _extractProvider;
|
|
24
|
-
var
|
|
24
|
+
var anchorTarget = _ref.anchorTarget,
|
|
25
|
+
analytics = _ref.analytics,
|
|
25
26
|
cardState = _ref.cardState,
|
|
26
27
|
_ref$extensionKey = _ref.extensionKey,
|
|
27
28
|
extensionKey = _ref$extensionKey === void 0 ? '' : _ref$extensionKey,
|
|
@@ -55,7 +56,8 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
55
56
|
ui: ui,
|
|
56
57
|
url: url
|
|
57
58
|
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
58
|
-
hideRetry: true
|
|
59
|
+
hideRetry: true,
|
|
60
|
+
anchorTarget: anchorTarget
|
|
59
61
|
}), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
60
62
|
overrideCss: contentStyles,
|
|
61
63
|
testId: "".concat(testId, "-content")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
4
|
/** @jsx jsx */
|
|
@@ -68,21 +69,25 @@ var Link = function Link(_ref) {
|
|
|
68
69
|
theme = _ref$theme === void 0 ? SmartLinkTheme.Link : _ref$theme,
|
|
69
70
|
url = _ref.url,
|
|
70
71
|
onClick = _ref.onClick,
|
|
71
|
-
target = _ref.target
|
|
72
|
+
_ref$target = _ref.target,
|
|
73
|
+
target = _ref$target === void 0 ? '_blank' : _ref$target;
|
|
72
74
|
var onMouseDown = useMouseDownEvent();
|
|
73
75
|
var hasSpace = useMemo(function () {
|
|
74
76
|
return text ? hasWhiteSpace(text) : false;
|
|
75
77
|
}, [text]);
|
|
76
|
-
var anchor = jsx("a", {
|
|
78
|
+
var anchor = jsx("a", _extends({
|
|
77
79
|
css: [getAnchorStyles(size, theme, getMaxLines(maxLines), hasSpace), overrideCss],
|
|
78
80
|
"data-smart-element": name,
|
|
79
81
|
"data-smart-element-link": true,
|
|
80
82
|
"data-testid": testId,
|
|
81
83
|
onClick: onClick,
|
|
82
84
|
onMouseDown: onMouseDown,
|
|
83
|
-
href: url
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
href: url
|
|
86
|
+
// We do not want set the target if it is the default value of '_self'. This prevents link
|
|
87
|
+
// click issues in Confluence and Trello which rely on it not being set unless necessary.
|
|
88
|
+
}, target !== '_self' && {
|
|
89
|
+
target: target
|
|
90
|
+
}), text);
|
|
86
91
|
return jsx("span", {
|
|
87
92
|
css: containerStyles
|
|
88
93
|
}, hideTooltip || text === undefined ? anchor : withTooltip(anchor, text, testId));
|
|
@@ -6,5 +6,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
6
6
|
* @see SmartLinkStatus
|
|
7
7
|
* @see FlexibleCardProps
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleErroredView: ({ cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
9
|
+
declare const FlexibleErroredView: ({ anchorTarget, cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleErroredView;
|
|
@@ -7,5 +7,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
7
7
|
* @see SmartLinkStatus
|
|
8
8
|
* @see FlexibleCardProps
|
|
9
9
|
*/
|
|
10
|
-
declare const FlexibleForbiddenView: ({ cardState, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
|
+
declare const FlexibleForbiddenView: ({ anchorTarget, cardState, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
11
11
|
export default FlexibleForbiddenView;
|
|
@@ -6,5 +6,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
6
6
|
* @see SmartLinkStatus
|
|
7
7
|
* @see FlexibleCardProps
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleNotFoundView: ({ cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
9
|
+
declare const FlexibleNotFoundView: ({ anchorTarget, cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleNotFoundView;
|
|
@@ -5,5 +5,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
5
5
|
* @see SmartLinkStatus
|
|
6
6
|
* @see FlexibleCardProps
|
|
7
7
|
*/
|
|
8
|
-
declare const FlexibleResolvedView: ({ id, cardState, onClick, onError, onResolve, showServerActions, testId, ui, url, analytics, }: FlexibleBlockCardProps) => JSX.Element;
|
|
8
|
+
declare const FlexibleResolvedView: ({ id, cardState, onClick, onError, onResolve, showServerActions, anchorTarget, testId, ui, url, analytics, }: FlexibleBlockCardProps) => JSX.Element;
|
|
9
9
|
export default FlexibleResolvedView;
|
|
@@ -7,5 +7,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
7
7
|
* @see SmartLinkStatus
|
|
8
8
|
* @see FlexibleCardProps
|
|
9
9
|
*/
|
|
10
|
-
declare const FlexibleUnauthorisedView: ({ analytics, cardState, extensionKey, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
|
+
declare const FlexibleUnauthorisedView: ({ anchorTarget, analytics, cardState, extensionKey, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
11
11
|
export default FlexibleUnauthorisedView;
|
|
@@ -5,11 +5,16 @@ import { FlexibleUiOptions } from '../../../FlexibleCard/types';
|
|
|
5
5
|
import { OnResolveCallback } from '../../../Card/types';
|
|
6
6
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
7
7
|
import { AnalyticsFacade } from '../../../../state/analytics';
|
|
8
|
+
import { AnchorTarget } from '../../../FlexibleCard/components/types';
|
|
8
9
|
export type FlexibleBlockCardProps = {
|
|
9
10
|
/**
|
|
10
11
|
* An AnalyticsFacade object used for calling analytics.
|
|
11
12
|
*/
|
|
12
13
|
analytics: AnalyticsFacade;
|
|
14
|
+
/**
|
|
15
|
+
* Determines the anchor target to be passed to the title block.
|
|
16
|
+
*/
|
|
17
|
+
anchorTarget?: AnchorTarget;
|
|
13
18
|
/**
|
|
14
19
|
* Determines the status and data of the Smart Link.
|
|
15
20
|
* @internal
|
|
@@ -42,15 +47,15 @@ export type FlexibleBlockCardProps = {
|
|
|
42
47
|
* function to be called after a flexible card has rendered its resolved state
|
|
43
48
|
*/
|
|
44
49
|
onResolve?: OnResolveCallback;
|
|
50
|
+
/**
|
|
51
|
+
* A name of the provider, needed to specify to user which account has to be connected
|
|
52
|
+
*/
|
|
53
|
+
providerName?: string;
|
|
45
54
|
/**
|
|
46
55
|
* Any additional renderers required by Flexible UI. Currently used by icon
|
|
47
56
|
* to render Emoji.
|
|
48
57
|
*/
|
|
49
58
|
renderers?: CardProviderRenderers;
|
|
50
|
-
/**
|
|
51
|
-
* A name of the provider, needed to specify to user which account has to be connected
|
|
52
|
-
*/
|
|
53
|
-
providerName?: string;
|
|
54
59
|
/**
|
|
55
60
|
* Determines whether to show available server actions.
|
|
56
61
|
*/
|
|
@@ -6,5 +6,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
6
6
|
* @see SmartLinkStatus
|
|
7
7
|
* @see FlexibleCardProps
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleErroredView: ({ cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
9
|
+
declare const FlexibleErroredView: ({ anchorTarget, cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleErroredView;
|
|
@@ -7,5 +7,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
7
7
|
* @see SmartLinkStatus
|
|
8
8
|
* @see FlexibleCardProps
|
|
9
9
|
*/
|
|
10
|
-
declare const FlexibleForbiddenView: ({ cardState, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
|
+
declare const FlexibleForbiddenView: ({ anchorTarget, cardState, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
11
11
|
export default FlexibleForbiddenView;
|
|
@@ -6,5 +6,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
6
6
|
* @see SmartLinkStatus
|
|
7
7
|
* @see FlexibleCardProps
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleNotFoundView: ({ cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
9
|
+
declare const FlexibleNotFoundView: ({ anchorTarget, cardState, onAuthorize, onError, ui, url, onClick, testId, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleNotFoundView;
|
|
@@ -5,5 +5,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
5
5
|
* @see SmartLinkStatus
|
|
6
6
|
* @see FlexibleCardProps
|
|
7
7
|
*/
|
|
8
|
-
declare const FlexibleResolvedView: ({ id, cardState, onClick, onError, onResolve, showServerActions, testId, ui, url, analytics, }: FlexibleBlockCardProps) => JSX.Element;
|
|
8
|
+
declare const FlexibleResolvedView: ({ id, cardState, onClick, onError, onResolve, showServerActions, anchorTarget, testId, ui, url, analytics, }: FlexibleBlockCardProps) => JSX.Element;
|
|
9
9
|
export default FlexibleResolvedView;
|
|
@@ -7,5 +7,5 @@ import { FlexibleBlockCardProps } from './types';
|
|
|
7
7
|
* @see SmartLinkStatus
|
|
8
8
|
* @see FlexibleCardProps
|
|
9
9
|
*/
|
|
10
|
-
declare const FlexibleUnauthorisedView: ({ analytics, cardState, extensionKey, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
10
|
+
declare const FlexibleUnauthorisedView: ({ anchorTarget, analytics, cardState, extensionKey, onAuthorize, onClick, onError, testId, ui, url, }: FlexibleBlockCardProps) => JSX.Element;
|
|
11
11
|
export default FlexibleUnauthorisedView;
|
|
@@ -5,11 +5,16 @@ import { FlexibleUiOptions } from '../../../FlexibleCard/types';
|
|
|
5
5
|
import { OnResolveCallback } from '../../../Card/types';
|
|
6
6
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
7
7
|
import { AnalyticsFacade } from '../../../../state/analytics';
|
|
8
|
+
import { AnchorTarget } from '../../../FlexibleCard/components/types';
|
|
8
9
|
export type FlexibleBlockCardProps = {
|
|
9
10
|
/**
|
|
10
11
|
* An AnalyticsFacade object used for calling analytics.
|
|
11
12
|
*/
|
|
12
13
|
analytics: AnalyticsFacade;
|
|
14
|
+
/**
|
|
15
|
+
* Determines the anchor target to be passed to the title block.
|
|
16
|
+
*/
|
|
17
|
+
anchorTarget?: AnchorTarget;
|
|
13
18
|
/**
|
|
14
19
|
* Determines the status and data of the Smart Link.
|
|
15
20
|
* @internal
|
|
@@ -42,15 +47,15 @@ export type FlexibleBlockCardProps = {
|
|
|
42
47
|
* function to be called after a flexible card has rendered its resolved state
|
|
43
48
|
*/
|
|
44
49
|
onResolve?: OnResolveCallback;
|
|
50
|
+
/**
|
|
51
|
+
* A name of the provider, needed to specify to user which account has to be connected
|
|
52
|
+
*/
|
|
53
|
+
providerName?: string;
|
|
45
54
|
/**
|
|
46
55
|
* Any additional renderers required by Flexible UI. Currently used by icon
|
|
47
56
|
* to render Emoji.
|
|
48
57
|
*/
|
|
49
58
|
renderers?: CardProviderRenderers;
|
|
50
|
-
/**
|
|
51
|
-
* A name of the provider, needed to specify to user which account has to be connected
|
|
52
|
-
*/
|
|
53
|
-
providerName?: string;
|
|
54
59
|
/**
|
|
55
60
|
* Determines whether to show available server actions.
|
|
56
61
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.5.
|
|
3
|
+
"version": "26.5.6",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
45
45
|
"@atlaskit/link-analytics": "^8.0.2",
|
|
46
46
|
"@atlaskit/link-client-extension": "^1.2.0",
|
|
47
|
-
"@atlaskit/linking-common": "^2.
|
|
47
|
+
"@atlaskit/linking-common": "^2.15.0",
|
|
48
48
|
"@atlaskit/linking-types": "^6.0.0",
|
|
49
49
|
"@atlaskit/logo": "^13.14.0",
|
|
50
50
|
"@atlaskit/lozenge": "^11.4.0",
|
|
@@ -146,6 +146,9 @@
|
|
|
146
146
|
},
|
|
147
147
|
"platform.linking-platform.smart-card.remove-dispatch-analytics-as-prop": {
|
|
148
148
|
"type": "boolean"
|
|
149
|
+
},
|
|
150
|
+
"platform.linking-platform.smart-card.enable-block-card-clicks-opening-in-same-tab": {
|
|
151
|
+
"type": "boolean"
|
|
149
152
|
}
|
|
150
153
|
},
|
|
151
154
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|