@atlaskit/smart-card 34.4.0 → 34.5.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 +9 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +12 -12
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/MetadataBlockOld.js +85 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +10 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +39 -29
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +12 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/MetadataBlockOld.js +75 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +10 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +29 -24
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +2 -2
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +2 -2
- package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +2 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +12 -12
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/MetadataBlockOld.js +80 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +10 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +29 -24
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +4 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +2 -2
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +2 -2
- package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +2 -2
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/MetadataBlockOld.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +2 -9
- package/dist/types-ts4.5/utils/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/MetadataBlockOld.d.ts +11 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +2 -9
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 34.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#99391](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99391)
|
|
8
|
+
[`0ef7aea2187eb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0ef7aea2187eb) -
|
|
9
|
+
[ux] Allow shift key to be considered a special key to allow Chromium-based browsers behave
|
|
10
|
+
natively when users click on smart links while holding the shift key.
|
|
11
|
+
|
|
3
12
|
## 34.4.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "34.
|
|
14
|
+
packageVersion: "34.5.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -29,13 +29,15 @@ var isIframe = exports.isIframe = function isIframe() {
|
|
|
29
29
|
* Meta key = cmd on mac, windows key on windows
|
|
30
30
|
* Ctrl key on mac by default triggers a right click instead of left click
|
|
31
31
|
* Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
|
|
32
|
+
* Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
|
|
33
|
+
* link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
|
|
32
34
|
*
|
|
33
35
|
* `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
|
|
34
36
|
* On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
|
|
35
37
|
* in which case typically only a standard clickthrough will occur, this is likely a small portion of events
|
|
36
38
|
*/
|
|
37
39
|
var isSpecialKey = exports.isSpecialKey = function isSpecialKey(event) {
|
|
38
|
-
return event.metaKey || event.ctrlKey;
|
|
40
|
+
return (0, _platformFeatureFlags.fg)('platform-smart-card-shift-key') ? event.metaKey || event.ctrlKey || event.shiftKey : event.metaKey || event.ctrlKey;
|
|
39
41
|
};
|
|
40
42
|
var isSpecialClick = exports.isSpecialClick = function isSpecialClick(event) {
|
|
41
43
|
return event.button === 1;
|
|
@@ -40,22 +40,22 @@ var positionStyle = {
|
|
|
40
40
|
};
|
|
41
41
|
var horizontalStyleBase = null;
|
|
42
42
|
var horizontalStyleByHeight = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
xlarge: "_1e0ccj1k _102k1m1q",
|
|
44
|
+
large: "_1e0ccj1k _102k1m1q",
|
|
45
|
+
medium: "_1e0ccj1k _102k1k8s",
|
|
46
|
+
small: "_1e0ccj1k _102k1k8s"
|
|
47
47
|
};
|
|
48
48
|
var gapStylesLeft = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
xlarge: "_7yhb147b _m6ukidpf",
|
|
50
|
+
large: "_7yhb1e9d _m6ukidpf",
|
|
51
|
+
medium: "_7yhbcxkx _m6ukidpf",
|
|
52
|
+
small: "_7yhbpdf9 _m6ukidpf"
|
|
53
53
|
};
|
|
54
54
|
var gapStylesRight = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
xlarge: "_24rc147b _3dveidpf",
|
|
56
|
+
large: "_24rc1e9d _3dveidpf",
|
|
57
|
+
medium: "_24rccxkx _3dveidpf",
|
|
58
|
+
small: "_24rcpdf9 _3dveidpf"
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -0,0 +1,85 @@
|
|
|
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 _react2 = require("@emotion/react");
|
|
12
|
+
var _constants = require("../../../../../constants");
|
|
13
|
+
var _utils = require("../../utils");
|
|
14
|
+
var _block = _interopRequireDefault(require("../block"));
|
|
15
|
+
var _elementGroup = _interopRequireDefault(require("../element-group"));
|
|
16
|
+
var _utils2 = require("../utils");
|
|
17
|
+
var _excluded = ["maxLines", "status", "testId", "primary", "secondary"]; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
|
+
var DEFAULT_MAX_LINES = 2;
|
|
19
|
+
var MAXIMUM_MAX_LINES = 2;
|
|
20
|
+
var MINIMUM_MAX_LINES = 1;
|
|
21
|
+
var getElementGroupStyles = function getElementGroupStyles(size, maxLines) {
|
|
22
|
+
// MetadataBlock allows metadata elements to be displayed in
|
|
23
|
+
// multiple lines, with maximum of 2 lines.
|
|
24
|
+
// We need the height of the line to be equal on both left and right
|
|
25
|
+
// sides so they line up nicely.
|
|
26
|
+
var lineHeight = (0, _utils.getMaxLineHeight)(size);
|
|
27
|
+
return (0, _react2.css)({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
29
|
+
lineHeight: "".concat(lineHeight, "rem")
|
|
30
|
+
},
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
+
(0, _utils.getTruncateStyles)(maxLines, lineHeight + 'rem'));
|
|
33
|
+
};
|
|
34
|
+
var getMaxLines = function getMaxLines(maxLines) {
|
|
35
|
+
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
36
|
+
return DEFAULT_MAX_LINES;
|
|
37
|
+
}
|
|
38
|
+
if (maxLines < MINIMUM_MAX_LINES) {
|
|
39
|
+
return MINIMUM_MAX_LINES;
|
|
40
|
+
}
|
|
41
|
+
return maxLines;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
46
|
+
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
47
|
+
* @public
|
|
48
|
+
* @param {MetadataBlockProps} MetadataBlockProps
|
|
49
|
+
* @see Block
|
|
50
|
+
*/
|
|
51
|
+
var MetadataBlockOld = function MetadataBlockOld(_ref) {
|
|
52
|
+
var _ref$maxLines = _ref.maxLines,
|
|
53
|
+
maxLines = _ref$maxLines === void 0 ? DEFAULT_MAX_LINES : _ref$maxLines,
|
|
54
|
+
_ref$status = _ref.status,
|
|
55
|
+
status = _ref$status === void 0 ? _constants.SmartLinkStatus.Fallback : _ref$status,
|
|
56
|
+
_ref$testId = _ref.testId,
|
|
57
|
+
testId = _ref$testId === void 0 ? 'smart-block-metadata' : _ref$testId,
|
|
58
|
+
_ref$primary = _ref.primary,
|
|
59
|
+
primary = _ref$primary === void 0 ? [] : _ref$primary,
|
|
60
|
+
_ref$secondary = _ref.secondary,
|
|
61
|
+
secondary = _ref$secondary === void 0 ? [] : _ref$secondary,
|
|
62
|
+
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
63
|
+
if (primary.length === 0 && secondary.length === 0 || status !== _constants.SmartLinkStatus.Resolved) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
var primaryElements = (0, _utils2.renderElementItems)(primary);
|
|
67
|
+
var secondaryElements = (0, _utils2.renderElementItems)(secondary);
|
|
68
|
+
var _blockProps$size = blockProps.size,
|
|
69
|
+
size = _blockProps$size === void 0 ? _constants.SmartLinkSize.Medium : _blockProps$size;
|
|
70
|
+
var elementGroupStyles = getElementGroupStyles(size, getMaxLines(maxLines));
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
72
|
+
testId: "".concat(testId, "-resolved-view")
|
|
73
|
+
}), primaryElements && /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
74
|
+
align: _constants.SmartLinkAlignment.Left,
|
|
75
|
+
overrideCss: elementGroupStyles,
|
|
76
|
+
direction: _constants.SmartLinkDirection.Horizontal,
|
|
77
|
+
width: _constants.SmartLinkWidth.Flexible
|
|
78
|
+
}, primaryElements), secondaryElements && /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
79
|
+
align: _constants.SmartLinkAlignment.Right,
|
|
80
|
+
overrideCss: elementGroupStyles,
|
|
81
|
+
direction: _constants.SmartLinkDirection.Horizontal,
|
|
82
|
+
width: _constants.SmartLinkWidth.Flexible
|
|
83
|
+
}, secondaryElements));
|
|
84
|
+
};
|
|
85
|
+
var _default = exports.default = MetadataBlockOld;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
4
|
+
._1e0ccj1k{display:-webkit-box}
|
|
5
|
+
._1nmz1hna{word-break:break-word}
|
|
6
|
+
._1reo15vq{overflow-x:hidden}
|
|
7
|
+
._1yyjcs5v{-webkit-line-clamp:2}
|
|
8
|
+
._1yyjkb7n{-webkit-line-clamp:1}
|
|
9
|
+
._sudp1e54{-webkit-box-orient:vertical}
|
|
10
|
+
@supports not (-webkit-line-clamp:1){._102k1k7u{max-height:3.5rem}._102k1wto{max-height:3rem}}
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
16
|
var _constants = require("../../../../../constants");
|
|
13
|
-
var _utils = require("../../utils");
|
|
14
17
|
var _block = _interopRequireDefault(require("../block"));
|
|
15
|
-
var _elementGroup =
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
+
var _elementGroup = require("../element-group");
|
|
19
|
+
var _utils = require("../utils");
|
|
20
|
+
var _MetadataBlockOld = _interopRequireDefault(require("./MetadataBlockOld"));
|
|
21
|
+
var _excluded = ["maxLines", "status", "testId", "primary", "secondary"];
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
24
|
var DEFAULT_MAX_LINES = 2;
|
|
19
25
|
var MAXIMUM_MAX_LINES = 2;
|
|
20
26
|
var MINIMUM_MAX_LINES = 1;
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
-
(0, _utils.getTruncateStyles)(maxLines, lineHeight + 'rem'));
|
|
27
|
+
var truncateStyles = {
|
|
28
|
+
'1': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54",
|
|
29
|
+
'2': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjcs5v _sudp1e54"
|
|
30
|
+
};
|
|
31
|
+
var sizeStyles = {
|
|
32
|
+
xlarge: "_11c81oud _102k1k7u",
|
|
33
|
+
large: "_11c81oud _102k1k7u",
|
|
34
|
+
medium: "_11c81oud _102k1wto",
|
|
35
|
+
small: "_11c81oud _102k1wto"
|
|
33
36
|
};
|
|
34
37
|
var getMaxLines = function getMaxLines(maxLines) {
|
|
35
38
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
@@ -63,23 +66,30 @@ var MetadataBlock = function MetadataBlock(_ref) {
|
|
|
63
66
|
if (primary.length === 0 && secondary.length === 0 || status !== _constants.SmartLinkStatus.Resolved) {
|
|
64
67
|
return null;
|
|
65
68
|
}
|
|
66
|
-
var primaryElements = (0,
|
|
67
|
-
var secondaryElements = (0,
|
|
69
|
+
var primaryElements = (0, _utils.renderElementItems)(primary);
|
|
70
|
+
var secondaryElements = (0, _utils.renderElementItems)(secondary);
|
|
68
71
|
var _blockProps$size = blockProps.size,
|
|
69
72
|
size = _blockProps$size === void 0 ? _constants.SmartLinkSize.Medium : _blockProps$size;
|
|
70
|
-
var
|
|
71
|
-
return /*#__PURE__*/
|
|
73
|
+
var maxLinesTotal = getMaxLines(maxLines);
|
|
74
|
+
return /*#__PURE__*/React.createElement(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
72
75
|
testId: "".concat(testId, "-resolved-view")
|
|
73
|
-
}), primaryElements && /*#__PURE__*/
|
|
76
|
+
}), primaryElements && /*#__PURE__*/React.createElement(_elementGroup.ElementGroupNew, {
|
|
74
77
|
align: _constants.SmartLinkAlignment.Left,
|
|
75
|
-
overrideCss: elementGroupStyles,
|
|
76
78
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
77
|
-
width: _constants.SmartLinkWidth.Flexible
|
|
78
|
-
|
|
79
|
+
width: _constants.SmartLinkWidth.Flexible,
|
|
80
|
+
className: (0, _runtime.ax)([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
81
|
+
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(_elementGroup.ElementGroupNew, {
|
|
79
82
|
align: _constants.SmartLinkAlignment.Right,
|
|
80
|
-
overrideCss: elementGroupStyles,
|
|
81
83
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
82
|
-
width: _constants.SmartLinkWidth.Flexible
|
|
84
|
+
width: _constants.SmartLinkWidth.Flexible,
|
|
85
|
+
className: (0, _runtime.ax)([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
83
86
|
}, secondaryElements));
|
|
84
87
|
};
|
|
85
|
-
var
|
|
88
|
+
var MetadataBlockExported = function MetadataBlockExported(props) {
|
|
89
|
+
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
90
|
+
return /*#__PURE__*/React.createElement(MetadataBlock, props);
|
|
91
|
+
} else {
|
|
92
|
+
return /*#__PURE__*/React.createElement(_MetadataBlockOld.default, props);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var _default = exports.default = MetadataBlockExported;
|
|
@@ -21,10 +21,10 @@ var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
var iconStyle = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
xlarge: "_16jlidpf _1o9zidpf _i0dl1wug _4t3iviql _1tkeviql _c71lviql _1bsbviql _1ul9viql _p12fviql _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7viql _1xjxviql _1752viql _qci8viql _15izviql _erubviql _19l3viql _1pr2viql _1u5tviql _mezjviql _e2ooviql _w8l5viql _1rg2viql _q7cvviql _xwbjviql _rtysviql _b8nkviql _4x20viql",
|
|
25
|
+
large: "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1k8s _1tke1k8s _c71l1k8s _1bsb1k8s _1ul91k8s _p12f1k8s _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71k8s _1xjx1k8s _17521k8s _qci81k8s _15iz1k8s _erub1k8s _19l31k8s _1pr21k8s _1u5t1k8s _mezj1k8s _e2oo1k8s _w8l51k8s _1rg21k8s _q7cv1k8s _xwbj1k8s _rtys1k8s _b8nk1k8s _4x201k8s",
|
|
26
|
+
medium: "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1j6v _1tke1j6v _c71l1j6v _1bsb1j6v _1ul91j6v _p12f1j6v _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71j6v _1xjx1j6v _17521j6v _qci81j6v _15iz1j6v _erub1j6v _19l31j6v _1pr21j6v _1u5t1j6v _mezj1j6v _e2oo1j6v _w8l51j6v _1rg21j6v _q7cv1j6v _xwbj1j6v _rtys1j6v _b8nk1j6v _4x201j6v",
|
|
27
|
+
small: "_16jlidpf _1o9zidpf _i0dl1wug _4t3ioqnp _1tkeoqnp _c71loqnp _1bsboqnp _1ul9oqnp _p12foqnp _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7oqnp _1xjxoqnp _1752oqnp _qci8oqnp _15izoqnp _eruboqnp _19l3oqnp _1pr2oqnp _1u5toqnp _mezjoqnp _e2oooqnp _w8l5oqnp _1rg2oqnp _q7cvoqnp _xwbjoqnp _rtysoqnp _b8nkoqnp _4x20oqnp"
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "34.
|
|
23
|
+
packageVersion: "34.5.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "34.
|
|
5
|
+
packageVersion: "34.5.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -11,12 +11,16 @@ export const isIframe = () => window.parent !== parent;
|
|
|
11
11
|
* Meta key = cmd on mac, windows key on windows
|
|
12
12
|
* Ctrl key on mac by default triggers a right click instead of left click
|
|
13
13
|
* Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
|
|
14
|
+
* Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
|
|
15
|
+
* link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
|
|
14
16
|
*
|
|
15
17
|
* `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
|
|
16
18
|
* On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
|
|
17
19
|
* in which case typically only a standard clickthrough will occur, this is likely a small portion of events
|
|
18
20
|
*/
|
|
19
|
-
export const isSpecialKey = event =>
|
|
21
|
+
export const isSpecialKey = event => {
|
|
22
|
+
return fg('platform-smart-card-shift-key') ? event.metaKey || event.ctrlKey || event.shiftKey : event.metaKey || event.ctrlKey;
|
|
23
|
+
};
|
|
20
24
|
export const isSpecialClick = event => event.button === 1;
|
|
21
25
|
export const getIconForFileType = fileMimeType => {
|
|
22
26
|
if (!fileMimeType) {
|
|
@@ -30,22 +30,22 @@ const positionStyle = {
|
|
|
30
30
|
};
|
|
31
31
|
const horizontalStyleBase = null;
|
|
32
32
|
const horizontalStyleByHeight = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
xlarge: "_1e0ccj1k _102k1m1q",
|
|
34
|
+
large: "_1e0ccj1k _102k1m1q",
|
|
35
|
+
medium: "_1e0ccj1k _102k1k8s",
|
|
36
|
+
small: "_1e0ccj1k _102k1k8s"
|
|
37
37
|
};
|
|
38
38
|
const gapStylesLeft = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
xlarge: "_7yhb147b _m6ukidpf",
|
|
40
|
+
large: "_7yhb1e9d _m6ukidpf",
|
|
41
|
+
medium: "_7yhbcxkx _m6ukidpf",
|
|
42
|
+
small: "_7yhbpdf9 _m6ukidpf"
|
|
43
43
|
};
|
|
44
44
|
const gapStylesRight = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
xlarge: "_24rc147b _3dveidpf",
|
|
46
|
+
large: "_24rc1e9d _3dveidpf",
|
|
47
|
+
medium: "_24rccxkx _3dveidpf",
|
|
48
|
+
small: "_24rcpdf9 _3dveidpf"
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
|
|
7
|
+
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
8
|
+
import Block from '../block';
|
|
9
|
+
import ElementGroup from '../element-group';
|
|
10
|
+
import { renderElementItems } from '../utils';
|
|
11
|
+
const DEFAULT_MAX_LINES = 2;
|
|
12
|
+
const MAXIMUM_MAX_LINES = 2;
|
|
13
|
+
const MINIMUM_MAX_LINES = 1;
|
|
14
|
+
const getElementGroupStyles = (size, maxLines) => {
|
|
15
|
+
// MetadataBlock allows metadata elements to be displayed in
|
|
16
|
+
// multiple lines, with maximum of 2 lines.
|
|
17
|
+
// We need the height of the line to be equal on both left and right
|
|
18
|
+
// sides so they line up nicely.
|
|
19
|
+
const lineHeight = getMaxLineHeight(size);
|
|
20
|
+
return css({
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
22
|
+
lineHeight: `${lineHeight}rem`
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
|
+
getTruncateStyles(maxLines, lineHeight + 'rem'));
|
|
26
|
+
};
|
|
27
|
+
const getMaxLines = maxLines => {
|
|
28
|
+
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
29
|
+
return DEFAULT_MAX_LINES;
|
|
30
|
+
}
|
|
31
|
+
if (maxLines < MINIMUM_MAX_LINES) {
|
|
32
|
+
return MINIMUM_MAX_LINES;
|
|
33
|
+
}
|
|
34
|
+
return maxLines;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
39
|
+
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
40
|
+
* @public
|
|
41
|
+
* @param {MetadataBlockProps} MetadataBlockProps
|
|
42
|
+
* @see Block
|
|
43
|
+
*/
|
|
44
|
+
const MetadataBlockOld = ({
|
|
45
|
+
maxLines = DEFAULT_MAX_LINES,
|
|
46
|
+
status = SmartLinkStatus.Fallback,
|
|
47
|
+
testId = 'smart-block-metadata',
|
|
48
|
+
primary = [],
|
|
49
|
+
secondary = [],
|
|
50
|
+
...blockProps
|
|
51
|
+
}) => {
|
|
52
|
+
if (primary.length === 0 && secondary.length === 0 || status !== SmartLinkStatus.Resolved) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const primaryElements = renderElementItems(primary);
|
|
56
|
+
const secondaryElements = renderElementItems(secondary);
|
|
57
|
+
const {
|
|
58
|
+
size = SmartLinkSize.Medium
|
|
59
|
+
} = blockProps;
|
|
60
|
+
const elementGroupStyles = getElementGroupStyles(size, getMaxLines(maxLines));
|
|
61
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
62
|
+
testId: `${testId}-resolved-view`
|
|
63
|
+
}), primaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
64
|
+
align: SmartLinkAlignment.Left,
|
|
65
|
+
overrideCss: elementGroupStyles,
|
|
66
|
+
direction: SmartLinkDirection.Horizontal,
|
|
67
|
+
width: SmartLinkWidth.Flexible
|
|
68
|
+
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
69
|
+
align: SmartLinkAlignment.Right,
|
|
70
|
+
overrideCss: elementGroupStyles,
|
|
71
|
+
direction: SmartLinkDirection.Horizontal,
|
|
72
|
+
width: SmartLinkWidth.Flexible
|
|
73
|
+
}, secondaryElements));
|
|
74
|
+
};
|
|
75
|
+
export default MetadataBlockOld;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
4
|
+
._1e0ccj1k{display:-webkit-box}
|
|
5
|
+
._1nmz1hna{word-break:break-word}
|
|
6
|
+
._1reo15vq{overflow-x:hidden}
|
|
7
|
+
._1yyjcs5v{-webkit-line-clamp:2}
|
|
8
|
+
._1yyjkb7n{-webkit-line-clamp:1}
|
|
9
|
+
._sudp1e54{-webkit-box-orient:vertical}
|
|
10
|
+
@supports not (-webkit-line-clamp:1){._102k1k7u{max-height:3.5rem}._102k1wto{max-height:3rem}}
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
|
|
7
|
-
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
8
8
|
import Block from '../block';
|
|
9
|
-
import ElementGroup from '../element-group';
|
|
9
|
+
import { ElementGroupNew as ElementGroup } from '../element-group';
|
|
10
10
|
import { renderElementItems } from '../utils';
|
|
11
|
+
import MetadataBlockOld from './MetadataBlockOld';
|
|
11
12
|
const DEFAULT_MAX_LINES = 2;
|
|
12
13
|
const MAXIMUM_MAX_LINES = 2;
|
|
13
14
|
const MINIMUM_MAX_LINES = 1;
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
|
-
getTruncateStyles(maxLines, lineHeight + 'rem'));
|
|
15
|
+
const truncateStyles = {
|
|
16
|
+
'1': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54",
|
|
17
|
+
'2': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjcs5v _sudp1e54"
|
|
18
|
+
};
|
|
19
|
+
const sizeStyles = {
|
|
20
|
+
xlarge: "_11c81oud _102k1k7u",
|
|
21
|
+
large: "_11c81oud _102k1k7u",
|
|
22
|
+
medium: "_11c81oud _102k1wto",
|
|
23
|
+
small: "_11c81oud _102k1wto"
|
|
26
24
|
};
|
|
27
25
|
const getMaxLines = maxLines => {
|
|
28
26
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
@@ -57,19 +55,26 @@ const MetadataBlock = ({
|
|
|
57
55
|
const {
|
|
58
56
|
size = SmartLinkSize.Medium
|
|
59
57
|
} = blockProps;
|
|
60
|
-
const
|
|
58
|
+
const maxLinesTotal = getMaxLines(maxLines);
|
|
61
59
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
62
60
|
testId: `${testId}-resolved-view`
|
|
63
61
|
}), primaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
64
62
|
align: SmartLinkAlignment.Left,
|
|
65
|
-
overrideCss: elementGroupStyles,
|
|
66
63
|
direction: SmartLinkDirection.Horizontal,
|
|
67
|
-
width: SmartLinkWidth.Flexible
|
|
64
|
+
width: SmartLinkWidth.Flexible,
|
|
65
|
+
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
68
66
|
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
69
67
|
align: SmartLinkAlignment.Right,
|
|
70
|
-
overrideCss: elementGroupStyles,
|
|
71
68
|
direction: SmartLinkDirection.Horizontal,
|
|
72
|
-
width: SmartLinkWidth.Flexible
|
|
69
|
+
width: SmartLinkWidth.Flexible,
|
|
70
|
+
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
73
71
|
}, secondaryElements));
|
|
74
72
|
};
|
|
75
|
-
|
|
73
|
+
const MetadataBlockExported = props => {
|
|
74
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
75
|
+
return /*#__PURE__*/React.createElement(MetadataBlock, props);
|
|
76
|
+
} else {
|
|
77
|
+
return /*#__PURE__*/React.createElement(MetadataBlockOld, props);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export default MetadataBlockExported;
|
|
@@ -10,10 +10,10 @@ import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
|
10
10
|
import Block from '../../block';
|
|
11
11
|
import TitleBlockResolvingViewOld from './TitleBlockResolvingViewOld';
|
|
12
12
|
const iconStyle = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
xlarge: "_16jlidpf _1o9zidpf _i0dl1wug _4t3iviql _1tkeviql _c71lviql _1bsbviql _1ul9viql _p12fviql _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7viql _1xjxviql _1752viql _qci8viql _15izviql _erubviql _19l3viql _1pr2viql _1u5tviql _mezjviql _e2ooviql _w8l5viql _1rg2viql _q7cvviql _xwbjviql _rtysviql _b8nkviql _4x20viql",
|
|
14
|
+
large: "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1k8s _1tke1k8s _c71l1k8s _1bsb1k8s _1ul91k8s _p12f1k8s _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71k8s _1xjx1k8s _17521k8s _qci81k8s _15iz1k8s _erub1k8s _19l31k8s _1pr21k8s _1u5t1k8s _mezj1k8s _e2oo1k8s _w8l51k8s _1rg21k8s _q7cv1k8s _xwbj1k8s _rtys1k8s _b8nk1k8s _4x201k8s",
|
|
15
|
+
medium: "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1j6v _1tke1j6v _c71l1j6v _1bsb1j6v _1ul91j6v _p12f1j6v _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71j6v _1xjx1j6v _17521j6v _qci81j6v _15iz1j6v _erub1j6v _19l31j6v _1pr21j6v _1u5t1j6v _mezj1j6v _e2oo1j6v _w8l51j6v _1rg21j6v _q7cv1j6v _xwbj1j6v _rtys1j6v _b8nk1j6v _4x201j6v",
|
|
16
|
+
small: "_16jlidpf _1o9zidpf _i0dl1wug _4t3ioqnp _1tkeoqnp _c71loqnp _1bsboqnp _1ul9oqnp _p12foqnp _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7oqnp _1xjxoqnp _1752oqnp _qci8oqnp _15izoqnp _eruboqnp _19l3oqnp _1pr2oqnp _1u5toqnp _mezjoqnp _e2oooqnp _w8l5oqnp _1rg2oqnp _q7cvoqnp _xwbjoqnp _rtysoqnp _b8nkoqnp _4x20oqnp"
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "34.
|
|
13
|
+
packageVersion: "34.5.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -2,11 +2,11 @@ import React, { useCallback, useRef } from 'react';
|
|
|
2
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
3
|
import Button from '@atlaskit/button/new';
|
|
4
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { fg } from
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
9
|
-
import RelatedLinksBaseModalOld from
|
|
9
|
+
import RelatedLinksBaseModalOld from './RelatedLinksBaseModalOld';
|
|
10
10
|
const fixedWidth = 'small'; // pre-defined 400px by Atlaskit
|
|
11
11
|
|
|
12
12
|
const boxStyles = xcss({
|
|
@@ -3,8 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { fg } from
|
|
7
|
-
import { ErrorSVGOld } from
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { ErrorSVGOld } from './ErrorSvgOld';
|
|
8
8
|
const errorStyles = null;
|
|
9
9
|
const ErrorSVGNew = props => {
|
|
10
10
|
const id = 'related-links-error-svg';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
|
-
import { fg } from
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { Stack } from '@atlaskit/primitives';
|
|
5
5
|
import { messages } from '../../../../messages';
|
|
6
6
|
import RelatedLinksList from '../../components/related-links-list';
|
|
@@ -3,8 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { fg } from
|
|
7
|
-
import { UnavailableSVGOld } from
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { UnavailableSVGOld } from './UnavailableSvgOld';
|
|
8
8
|
const unavailableStyles = null;
|
|
9
9
|
const UnavailableSVGNew = props => {
|
|
10
10
|
const id = 'related-links-unavailable-svg';
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "34.
|
|
7
|
+
packageVersion: "34.5.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -19,13 +19,15 @@ export var isIframe = function isIframe() {
|
|
|
19
19
|
* Meta key = cmd on mac, windows key on windows
|
|
20
20
|
* Ctrl key on mac by default triggers a right click instead of left click
|
|
21
21
|
* Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
|
|
22
|
+
* Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
|
|
23
|
+
* link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
|
|
22
24
|
*
|
|
23
25
|
* `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
|
|
24
26
|
* On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
|
|
25
27
|
* in which case typically only a standard clickthrough will occur, this is likely a small portion of events
|
|
26
28
|
*/
|
|
27
29
|
export var isSpecialKey = function isSpecialKey(event) {
|
|
28
|
-
return event.metaKey || event.ctrlKey;
|
|
30
|
+
return fg('platform-smart-card-shift-key') ? event.metaKey || event.ctrlKey || event.shiftKey : event.metaKey || event.ctrlKey;
|
|
29
31
|
};
|
|
30
32
|
export var isSpecialClick = function isSpecialClick(event) {
|
|
31
33
|
return event.button === 1;
|
|
@@ -30,22 +30,22 @@ var positionStyle = {
|
|
|
30
30
|
};
|
|
31
31
|
var horizontalStyleBase = null;
|
|
32
32
|
var horizontalStyleByHeight = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
xlarge: "_1e0ccj1k _102k1m1q",
|
|
34
|
+
large: "_1e0ccj1k _102k1m1q",
|
|
35
|
+
medium: "_1e0ccj1k _102k1k8s",
|
|
36
|
+
small: "_1e0ccj1k _102k1k8s"
|
|
37
37
|
};
|
|
38
38
|
var gapStylesLeft = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
xlarge: "_7yhb147b _m6ukidpf",
|
|
40
|
+
large: "_7yhb1e9d _m6ukidpf",
|
|
41
|
+
medium: "_7yhbcxkx _m6ukidpf",
|
|
42
|
+
small: "_7yhbpdf9 _m6ukidpf"
|
|
43
43
|
};
|
|
44
44
|
var gapStylesRight = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
xlarge: "_24rc147b _3dveidpf",
|
|
46
|
+
large: "_24rc1e9d _3dveidpf",
|
|
47
|
+
medium: "_24rccxkx _3dveidpf",
|
|
48
|
+
small: "_24rcpdf9 _3dveidpf"
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["maxLines", "status", "testId", "primary", "secondary"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
+
import { css } from '@emotion/react';
|
|
8
|
+
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
|
|
9
|
+
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
10
|
+
import Block from '../block';
|
|
11
|
+
import ElementGroup from '../element-group';
|
|
12
|
+
import { renderElementItems } from '../utils';
|
|
13
|
+
var DEFAULT_MAX_LINES = 2;
|
|
14
|
+
var MAXIMUM_MAX_LINES = 2;
|
|
15
|
+
var MINIMUM_MAX_LINES = 1;
|
|
16
|
+
var getElementGroupStyles = function getElementGroupStyles(size, maxLines) {
|
|
17
|
+
// MetadataBlock allows metadata elements to be displayed in
|
|
18
|
+
// multiple lines, with maximum of 2 lines.
|
|
19
|
+
// We need the height of the line to be equal on both left and right
|
|
20
|
+
// sides so they line up nicely.
|
|
21
|
+
var lineHeight = getMaxLineHeight(size);
|
|
22
|
+
return css({
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
24
|
+
lineHeight: "".concat(lineHeight, "rem")
|
|
25
|
+
},
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
|
+
getTruncateStyles(maxLines, lineHeight + 'rem'));
|
|
28
|
+
};
|
|
29
|
+
var getMaxLines = function getMaxLines(maxLines) {
|
|
30
|
+
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
31
|
+
return DEFAULT_MAX_LINES;
|
|
32
|
+
}
|
|
33
|
+
if (maxLines < MINIMUM_MAX_LINES) {
|
|
34
|
+
return MINIMUM_MAX_LINES;
|
|
35
|
+
}
|
|
36
|
+
return maxLines;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
41
|
+
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
42
|
+
* @public
|
|
43
|
+
* @param {MetadataBlockProps} MetadataBlockProps
|
|
44
|
+
* @see Block
|
|
45
|
+
*/
|
|
46
|
+
var MetadataBlockOld = function MetadataBlockOld(_ref) {
|
|
47
|
+
var _ref$maxLines = _ref.maxLines,
|
|
48
|
+
maxLines = _ref$maxLines === void 0 ? DEFAULT_MAX_LINES : _ref$maxLines,
|
|
49
|
+
_ref$status = _ref.status,
|
|
50
|
+
status = _ref$status === void 0 ? SmartLinkStatus.Fallback : _ref$status,
|
|
51
|
+
_ref$testId = _ref.testId,
|
|
52
|
+
testId = _ref$testId === void 0 ? 'smart-block-metadata' : _ref$testId,
|
|
53
|
+
_ref$primary = _ref.primary,
|
|
54
|
+
primary = _ref$primary === void 0 ? [] : _ref$primary,
|
|
55
|
+
_ref$secondary = _ref.secondary,
|
|
56
|
+
secondary = _ref$secondary === void 0 ? [] : _ref$secondary,
|
|
57
|
+
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
58
|
+
if (primary.length === 0 && secondary.length === 0 || status !== SmartLinkStatus.Resolved) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
var primaryElements = renderElementItems(primary);
|
|
62
|
+
var secondaryElements = renderElementItems(secondary);
|
|
63
|
+
var _blockProps$size = blockProps.size,
|
|
64
|
+
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
65
|
+
var elementGroupStyles = getElementGroupStyles(size, getMaxLines(maxLines));
|
|
66
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
67
|
+
testId: "".concat(testId, "-resolved-view")
|
|
68
|
+
}), primaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
69
|
+
align: SmartLinkAlignment.Left,
|
|
70
|
+
overrideCss: elementGroupStyles,
|
|
71
|
+
direction: SmartLinkDirection.Horizontal,
|
|
72
|
+
width: SmartLinkWidth.Flexible
|
|
73
|
+
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
74
|
+
align: SmartLinkAlignment.Right,
|
|
75
|
+
overrideCss: elementGroupStyles,
|
|
76
|
+
direction: SmartLinkDirection.Horizontal,
|
|
77
|
+
width: SmartLinkWidth.Flexible
|
|
78
|
+
}, secondaryElements));
|
|
79
|
+
};
|
|
80
|
+
export default MetadataBlockOld;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
4
|
+
._1e0ccj1k{display:-webkit-box}
|
|
5
|
+
._1nmz1hna{word-break:break-word}
|
|
6
|
+
._1reo15vq{overflow-x:hidden}
|
|
7
|
+
._1yyjcs5v{-webkit-line-clamp:2}
|
|
8
|
+
._1yyjkb7n{-webkit-line-clamp:1}
|
|
9
|
+
._sudp1e54{-webkit-box-orient:vertical}
|
|
10
|
+
@supports not (-webkit-line-clamp:1){._102k1k7u{max-height:3.5rem}._102k1wto{max-height:3rem}}
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["maxLines", "status", "testId", "primary", "secondary"];
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
5
|
+
import "./index.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
|
|
9
|
-
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
10
10
|
import Block from '../block';
|
|
11
|
-
import ElementGroup from '../element-group';
|
|
11
|
+
import { ElementGroupNew as ElementGroup } from '../element-group';
|
|
12
12
|
import { renderElementItems } from '../utils';
|
|
13
|
+
import MetadataBlockOld from './MetadataBlockOld';
|
|
13
14
|
var DEFAULT_MAX_LINES = 2;
|
|
14
15
|
var MAXIMUM_MAX_LINES = 2;
|
|
15
16
|
var MINIMUM_MAX_LINES = 1;
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
|
-
getTruncateStyles(maxLines, lineHeight + 'rem'));
|
|
17
|
+
var truncateStyles = {
|
|
18
|
+
'1': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54",
|
|
19
|
+
'2': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjcs5v _sudp1e54"
|
|
20
|
+
};
|
|
21
|
+
var sizeStyles = {
|
|
22
|
+
xlarge: "_11c81oud _102k1k7u",
|
|
23
|
+
large: "_11c81oud _102k1k7u",
|
|
24
|
+
medium: "_11c81oud _102k1wto",
|
|
25
|
+
small: "_11c81oud _102k1wto"
|
|
28
26
|
};
|
|
29
27
|
var getMaxLines = function getMaxLines(maxLines) {
|
|
30
28
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
@@ -62,19 +60,26 @@ var MetadataBlock = function MetadataBlock(_ref) {
|
|
|
62
60
|
var secondaryElements = renderElementItems(secondary);
|
|
63
61
|
var _blockProps$size = blockProps.size,
|
|
64
62
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
65
|
-
var
|
|
63
|
+
var maxLinesTotal = getMaxLines(maxLines);
|
|
66
64
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
67
65
|
testId: "".concat(testId, "-resolved-view")
|
|
68
66
|
}), primaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
69
67
|
align: SmartLinkAlignment.Left,
|
|
70
|
-
overrideCss: elementGroupStyles,
|
|
71
68
|
direction: SmartLinkDirection.Horizontal,
|
|
72
|
-
width: SmartLinkWidth.Flexible
|
|
69
|
+
width: SmartLinkWidth.Flexible,
|
|
70
|
+
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
73
71
|
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
74
72
|
align: SmartLinkAlignment.Right,
|
|
75
|
-
overrideCss: elementGroupStyles,
|
|
76
73
|
direction: SmartLinkDirection.Horizontal,
|
|
77
|
-
width: SmartLinkWidth.Flexible
|
|
74
|
+
width: SmartLinkWidth.Flexible,
|
|
75
|
+
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
78
76
|
}, secondaryElements));
|
|
79
77
|
};
|
|
80
|
-
|
|
78
|
+
var MetadataBlockExported = function MetadataBlockExported(props) {
|
|
79
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
80
|
+
return /*#__PURE__*/React.createElement(MetadataBlock, props);
|
|
81
|
+
} else {
|
|
82
|
+
return /*#__PURE__*/React.createElement(MetadataBlockOld, props);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
export default MetadataBlockExported;
|
|
@@ -12,10 +12,10 @@ import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
|
12
12
|
import Block from '../../block';
|
|
13
13
|
import TitleBlockResolvingViewOld from './TitleBlockResolvingViewOld';
|
|
14
14
|
var iconStyle = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
xlarge: "_16jlidpf _1o9zidpf _i0dl1wug _4t3iviql _1tkeviql _c71lviql _1bsbviql _1ul9viql _p12fviql _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7viql _1xjxviql _1752viql _qci8viql _15izviql _erubviql _19l3viql _1pr2viql _1u5tviql _mezjviql _e2ooviql _w8l5viql _1rg2viql _q7cvviql _xwbjviql _rtysviql _b8nkviql _4x20viql",
|
|
16
|
+
large: "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1k8s _1tke1k8s _c71l1k8s _1bsb1k8s _1ul91k8s _p12f1k8s _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71k8s _1xjx1k8s _17521k8s _qci81k8s _15iz1k8s _erub1k8s _19l31k8s _1pr21k8s _1u5t1k8s _mezj1k8s _e2oo1k8s _w8l51k8s _1rg21k8s _q7cv1k8s _xwbj1k8s _rtys1k8s _b8nk1k8s _4x201k8s",
|
|
17
|
+
medium: "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1j6v _1tke1j6v _c71l1j6v _1bsb1j6v _1ul91j6v _p12f1j6v _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71j6v _1xjx1j6v _17521j6v _qci81j6v _15iz1j6v _erub1j6v _19l31j6v _1pr21j6v _1u5t1j6v _mezj1j6v _e2oo1j6v _w8l51j6v _1rg21j6v _q7cv1j6v _xwbj1j6v _rtys1j6v _b8nk1j6v _4x201j6v",
|
|
18
|
+
small: "_16jlidpf _1o9zidpf _i0dl1wug _4t3ioqnp _1tkeoqnp _c71loqnp _1bsboqnp _1ul9oqnp _p12foqnp _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7oqnp _1xjxoqnp _1752oqnp _qci8oqnp _15izoqnp _eruboqnp _19l3oqnp _1pr2oqnp _1u5toqnp _mezjoqnp _e2oooqnp _w8l5oqnp _1rg2oqnp _q7cvoqnp _xwbjoqnp _rtysoqnp _b8nkoqnp _4x20oqnp"
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "34.
|
|
16
|
+
packageVersion: "34.5.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -2,11 +2,11 @@ import React, { useCallback, useRef } from 'react';
|
|
|
2
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
3
|
import Button from '@atlaskit/button/new';
|
|
4
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { fg } from
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
9
|
-
import RelatedLinksBaseModalOld from
|
|
9
|
+
import RelatedLinksBaseModalOld from './RelatedLinksBaseModalOld';
|
|
10
10
|
var fixedWidth = 'small'; // pre-defined 400px by Atlaskit
|
|
11
11
|
|
|
12
12
|
var boxStyles = xcss({
|
|
@@ -3,8 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { fg } from
|
|
7
|
-
import { ErrorSVGOld } from
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { ErrorSVGOld } from './ErrorSvgOld';
|
|
8
8
|
var errorStyles = null;
|
|
9
9
|
var ErrorSVGNew = function ErrorSVGNew(props) {
|
|
10
10
|
var id = 'related-links-error-svg';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
|
-
import { fg } from
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { Stack } from '@atlaskit/primitives';
|
|
5
5
|
import { messages } from '../../../../messages';
|
|
6
6
|
import RelatedLinksList from '../../components/related-links-list';
|
|
@@ -3,8 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { fg } from
|
|
7
|
-
import { UnavailableSVGOld } from
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { UnavailableSVGOld } from './UnavailableSvgOld';
|
|
8
8
|
var unavailableStyles = null;
|
|
9
9
|
var UnavailableSVGNew = function UnavailableSVGNew(props) {
|
|
10
10
|
var id = 'related-links-unavailable-svg';
|
|
@@ -7,6 +7,8 @@ export declare const isIframe: () => boolean;
|
|
|
7
7
|
* Meta key = cmd on mac, windows key on windows
|
|
8
8
|
* Ctrl key on mac by default triggers a right click instead of left click
|
|
9
9
|
* Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
|
|
10
|
+
* Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
|
|
11
|
+
* link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
|
|
10
12
|
*
|
|
11
13
|
* `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
|
|
12
14
|
* On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type MetadataBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
5
|
+
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
6
|
+
* @public
|
|
7
|
+
* @param {MetadataBlockProps} MetadataBlockProps
|
|
8
|
+
* @see Block
|
|
9
|
+
*/
|
|
10
|
+
declare const MetadataBlockOld: ({ maxLines, status, testId, primary, secondary, ...blockProps }: MetadataBlockProps) => JSX.Element | null;
|
|
11
|
+
export default MetadataBlockOld;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MetadataBlockProps } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
6
|
-
* @public
|
|
7
|
-
* @param {MetadataBlockProps} MetadataBlockProps
|
|
8
|
-
* @see Block
|
|
9
|
-
*/
|
|
10
|
-
declare const MetadataBlock: ({ maxLines, status, testId, primary, secondary, ...blockProps }: MetadataBlockProps) => JSX.Element | null;
|
|
11
|
-
export default MetadataBlock;
|
|
3
|
+
declare const MetadataBlockExported: (props: MetadataBlockProps) => JSX.Element;
|
|
4
|
+
export default MetadataBlockExported;
|
|
@@ -7,6 +7,8 @@ export declare const isIframe: () => boolean;
|
|
|
7
7
|
* Meta key = cmd on mac, windows key on windows
|
|
8
8
|
* Ctrl key on mac by default triggers a right click instead of left click
|
|
9
9
|
* Ctrl key on Windows has the same behaviour of cmd key of mac (open in new tab)
|
|
10
|
+
* Shift key is also a "special" key because the default behavior of Chromium-based browsers is to open the
|
|
11
|
+
* link in a new window; Arc browser has custom logic to show links in its "peek" window when shift is held.
|
|
10
12
|
*
|
|
11
13
|
* `isSpecialKey` on a mouse event on mac with default behaviour should be equivalent to opening in new tab
|
|
12
14
|
* On Windows it will be equivalent to opening a new tab, unless its the Window key that is held
|
package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/MetadataBlockOld.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type MetadataBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
5
|
+
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
6
|
+
* @public
|
|
7
|
+
* @param {MetadataBlockProps} MetadataBlockProps
|
|
8
|
+
* @see Block
|
|
9
|
+
*/
|
|
10
|
+
declare const MetadataBlockOld: ({ maxLines, status, testId, primary, secondary, ...blockProps }: MetadataBlockProps) => JSX.Element | null;
|
|
11
|
+
export default MetadataBlockOld;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MetadataBlockProps } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
6
|
-
* @public
|
|
7
|
-
* @param {MetadataBlockProps} MetadataBlockProps
|
|
8
|
-
* @see Block
|
|
9
|
-
*/
|
|
10
|
-
declare const MetadataBlock: ({ maxLines, status, testId, primary, secondary, ...blockProps }: MetadataBlockProps) => JSX.Element | null;
|
|
11
|
-
export default MetadataBlock;
|
|
3
|
+
declare const MetadataBlockExported: (props: MetadataBlockProps) => JSX.Element;
|
|
4
|
+
export default MetadataBlockExported;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.5.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -189,6 +189,9 @@
|
|
|
189
189
|
"bandicoots-compiled-migration-smartcard": {
|
|
190
190
|
"type": "boolean"
|
|
191
191
|
},
|
|
192
|
+
"platform-smart-card-shift-key": {
|
|
193
|
+
"type": "boolean"
|
|
194
|
+
},
|
|
192
195
|
"platform-smart-card-icon-migration": {
|
|
193
196
|
"type": "boolean"
|
|
194
197
|
}
|