@atlaskit/smart-card 43.29.3 → 43.30.1
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 +17 -0
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +58 -0
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +10 -7
- package/dist/cjs/view/InlineCard/ResolvedView/renderLozenge.js +47 -0
- package/dist/cjs/view/InlineCard/ResolvedView/types.js +5 -0
- package/dist/cjs/view/InlineCard/common/action-button/index.compiled.css +8 -0
- package/dist/cjs/view/InlineCard/common/action-button/index.js +2 -1
- package/dist/cjs/view/InlineCard/common/rovo-actions-button/index.compiled.css +15 -0
- package/dist/cjs/view/InlineCard/common/rovo-actions-button/index.js +110 -0
- package/dist/cjs/view/InlineCard/common/rovo-post-auth-actions-modal/index.compiled.css +41 -0
- package/dist/cjs/view/InlineCard/common/rovo-post-auth-actions-modal/index.js +86 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +49 -0
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +5 -2
- package/dist/es2019/view/InlineCard/ResolvedView/renderLozenge.js +37 -0
- package/dist/es2019/view/InlineCard/ResolvedView/types.js +1 -0
- package/dist/es2019/view/InlineCard/common/action-button/index.compiled.css +8 -0
- package/dist/es2019/view/InlineCard/common/action-button/index.js +2 -1
- package/dist/es2019/view/InlineCard/common/rovo-actions-button/index.compiled.css +15 -0
- package/dist/es2019/view/InlineCard/common/rovo-actions-button/index.js +78 -0
- package/dist/es2019/view/InlineCard/common/rovo-post-auth-actions-modal/index.compiled.css +41 -0
- package/dist/es2019/view/InlineCard/common/rovo-post-auth-actions-modal/index.js +78 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/messages.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +51 -0
- package/dist/esm/view/InlineCard/ResolvedView/index.js +10 -7
- package/dist/esm/view/InlineCard/ResolvedView/renderLozenge.js +40 -0
- package/dist/esm/view/InlineCard/ResolvedView/types.js +1 -0
- package/dist/esm/view/InlineCard/common/action-button/index.compiled.css +8 -0
- package/dist/esm/view/InlineCard/common/action-button/index.js +2 -1
- package/dist/esm/view/InlineCard/common/rovo-actions-button/index.compiled.css +15 -0
- package/dist/esm/view/InlineCard/common/rovo-actions-button/index.js +101 -0
- package/dist/esm/view/InlineCard/common/rovo-post-auth-actions-modal/index.compiled.css +41 -0
- package/dist/esm/view/InlineCard/common/rovo-post-auth-actions-modal/index.js +77 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/InlineCard/Frame/index.d.ts +1 -1
- package/dist/types/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.d.ts +3 -0
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +1 -4
- package/dist/types/view/InlineCard/ResolvedView/renderLozenge.d.ts +3 -0
- package/dist/types/view/InlineCard/ResolvedView/types.d.ts +42 -0
- package/dist/types/view/InlineCard/common/action-button/index.d.ts +1 -1
- package/dist/types/view/InlineCard/common/rovo-actions-button/index.d.ts +12 -0
- package/dist/types/view/InlineCard/common/rovo-post-auth-actions-modal/index.d.ts +11 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.d.ts +3 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +1 -4
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/renderLozenge.d.ts +3 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/types.d.ts +42 -0
- package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/common/rovo-actions-button/index.d.ts +12 -0
- package/dist/types-ts4.5/view/InlineCard/common/rovo-post-auth-actions-modal/index.d.ts +11 -0
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.30.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3818980705c0f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3818980705c0f) -
|
|
8
|
+
[ux] Adds an (unused) placeholder RovoActionsButton CTA component, as well as a
|
|
9
|
+
RovoPostAuthActionsModal placeholder component. These will be used as part of the experiment for
|
|
10
|
+
inline post-auth Rovo hovercard modal CTA
|
|
11
|
+
|
|
12
|
+
## 43.30.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [`89dbf61281d0a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/89dbf61281d0a) -
|
|
17
|
+
Refactor InlineCardResolvedView from class to functional component, gated behind
|
|
18
|
+
smart-card-inline-resolved-view-refactor
|
|
19
|
+
|
|
3
20
|
## 43.29.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/messages.js
CHANGED
|
@@ -576,6 +576,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
576
576
|
defaultMessage: "We can't display private pages",
|
|
577
577
|
description: 'Shown when a user does not have access to a link.'
|
|
578
578
|
},
|
|
579
|
+
rovo_actions_explore: {
|
|
580
|
+
id: 'fabric.linking.rovo_actions_explore-non-final',
|
|
581
|
+
defaultMessage: 'Explore',
|
|
582
|
+
description: 'Label for the Rovo Actions button that allows users to explore AI actions for a link'
|
|
583
|
+
},
|
|
579
584
|
unassigned: {
|
|
580
585
|
id: 'fabric.linking.unassigned',
|
|
581
586
|
defaultMessage: 'Unassigned',
|
|
@@ -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: "43.
|
|
14
|
+
packageVersion: "43.30.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.InlineCardResolvedViewFunctional = InlineCardResolvedViewFunctional;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _HoverCard = require("../../HoverCard");
|
|
10
|
+
var _Frame = require("../Frame");
|
|
11
|
+
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
12
|
+
var _renderLozenge = require("./renderLozenge");
|
|
13
|
+
function InlineCardResolvedViewFunctional(_ref) {
|
|
14
|
+
var id = _ref.id,
|
|
15
|
+
_ref$title = _ref.title,
|
|
16
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
|
17
|
+
isSelected = _ref.isSelected,
|
|
18
|
+
isHovered = _ref.isHovered,
|
|
19
|
+
onClick = _ref.onClick,
|
|
20
|
+
icon = _ref.icon,
|
|
21
|
+
link = _ref.link,
|
|
22
|
+
_ref$testId = _ref.testId,
|
|
23
|
+
testId = _ref$testId === void 0 ? 'inline-card-resolved-view' : _ref$testId,
|
|
24
|
+
titleTextColor = _ref.titleTextColor,
|
|
25
|
+
titlePrefix = _ref.titlePrefix,
|
|
26
|
+
_ref$showHoverPreview = _ref.showHoverPreview,
|
|
27
|
+
showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
|
|
28
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
29
|
+
actionOptions = _ref.actionOptions,
|
|
30
|
+
truncateInline = _ref.truncateInline,
|
|
31
|
+
type = _ref.type,
|
|
32
|
+
hideIconLoadingSkeleton = _ref.hideIconLoadingSkeleton,
|
|
33
|
+
lozenge = _ref.lozenge;
|
|
34
|
+
var frame = /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
|
|
35
|
+
testId: testId,
|
|
36
|
+
link: link,
|
|
37
|
+
isSelected: isSelected,
|
|
38
|
+
isHovered: isHovered,
|
|
39
|
+
onClick: onClick,
|
|
40
|
+
truncateInline: truncateInline
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
|
|
42
|
+
emoji: titlePrefix,
|
|
43
|
+
icon: icon,
|
|
44
|
+
title: title,
|
|
45
|
+
titleTextColor: titleTextColor,
|
|
46
|
+
type: type,
|
|
47
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
48
|
+
}), (0, _renderLozenge.renderLozenge)(lozenge));
|
|
49
|
+
if (!showHoverPreview || !link) {
|
|
50
|
+
return frame;
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
|
|
53
|
+
id: id,
|
|
54
|
+
url: link,
|
|
55
|
+
actionOptions: actionOptions,
|
|
56
|
+
hoverPreviewOptions: hoverPreviewOptions
|
|
57
|
+
}, frame);
|
|
58
|
+
}
|
|
@@ -13,19 +13,21 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
16
17
|
var _HoverCard = require("../../HoverCard");
|
|
17
18
|
var _inlineLozenge = _interopRequireDefault(require("../common/inline-lozenge"));
|
|
18
19
|
var _Frame = require("../Frame");
|
|
19
20
|
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
21
|
+
var _InlineCardResolvedViewFunctional = require("./InlineCardResolvedViewFunctional");
|
|
20
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
21
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
(0, _classCallCheck2.default)(this,
|
|
25
|
-
return _callSuper(this,
|
|
24
|
+
var InlineCardResolvedViewClass = /*#__PURE__*/function (_React$Component) {
|
|
25
|
+
function InlineCardResolvedViewClass() {
|
|
26
|
+
(0, _classCallCheck2.default)(this, InlineCardResolvedViewClass);
|
|
27
|
+
return _callSuper(this, InlineCardResolvedViewClass, arguments);
|
|
26
28
|
}
|
|
27
|
-
(0, _inherits2.default)(
|
|
28
|
-
return (0, _createClass2.default)(
|
|
29
|
+
(0, _inherits2.default)(InlineCardResolvedViewClass, _React$Component);
|
|
30
|
+
return (0, _createClass2.default)(InlineCardResolvedViewClass, [{
|
|
29
31
|
key: "renderLozenge",
|
|
30
32
|
value: function renderLozenge() {
|
|
31
33
|
var _lozenge$style3, _lozenge$style4;
|
|
@@ -112,4 +114,5 @@ var InlineCardResolvedView = exports.InlineCardResolvedView = /*#__PURE__*/funct
|
|
|
112
114
|
return inlineCardResolvedView;
|
|
113
115
|
}
|
|
114
116
|
}]);
|
|
115
|
-
}(_react.default.Component);
|
|
117
|
+
}(_react.default.Component);
|
|
118
|
+
var InlineCardResolvedView = exports.InlineCardResolvedView = (0, _platformFeatureFlagsReact.componentWithFG)('smart-card-inline-resolved-view-refactor', _InlineCardResolvedViewFunctional.InlineCardResolvedViewFunctional, InlineCardResolvedViewClass);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.renderLozenge = renderLozenge;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
+
var _inlineLozenge = _interopRequireDefault(require("../common/inline-lozenge"));
|
|
12
|
+
var LOZENGE_TEST_ID = 'inline-card-resolved-view-lozenge';
|
|
13
|
+
function renderLozenge(lozenge) {
|
|
14
|
+
var _lozenge$style3, _lozenge$style4;
|
|
15
|
+
if (!lozenge || !(lozenge !== null && lozenge !== void 0 && lozenge.text)) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if ((0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts')) {
|
|
19
|
+
var stateMetricMatch = lozenge.text.match(/^(.+?)\s+-\s+(\d+(?:\.\d+)?)$/);
|
|
20
|
+
if (stateMetricMatch) {
|
|
21
|
+
var _lozenge$style, _lozenge$style2;
|
|
22
|
+
var _stateMetricMatch = (0, _slicedToArray2.default)(stateMetricMatch, 3),
|
|
23
|
+
label = _stateMetricMatch[1],
|
|
24
|
+
metric = _stateMetricMatch[2];
|
|
25
|
+
var _appearance = lozenge.appearance || 'neutral';
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_inlineLozenge.default, {
|
|
27
|
+
testId: LOZENGE_TEST_ID,
|
|
28
|
+
appearance: _appearance,
|
|
29
|
+
style: {
|
|
30
|
+
backgroundColor: lozenge === null || lozenge === void 0 || (_lozenge$style = lozenge.style) === null || _lozenge$style === void 0 ? void 0 : _lozenge$style.backgroundColor,
|
|
31
|
+
color: lozenge === null || lozenge === void 0 || (_lozenge$style2 = lozenge.style) === null || _lozenge$style2 === void 0 ? void 0 : _lozenge$style2.color
|
|
32
|
+
},
|
|
33
|
+
trailingMetric: metric
|
|
34
|
+
}, label);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var appearance = lozenge.appearance || 'default';
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_inlineLozenge.default, {
|
|
39
|
+
testId: LOZENGE_TEST_ID,
|
|
40
|
+
appearance: appearance,
|
|
41
|
+
style: {
|
|
42
|
+
backgroundColor: lozenge === null || lozenge === void 0 || (_lozenge$style3 = lozenge.style) === null || _lozenge$style3 === void 0 ? void 0 : _lozenge$style3.backgroundColor,
|
|
43
|
+
color: lozenge === null || lozenge === void 0 || (_lozenge$style4 = lozenge.style) === null || _lozenge$style4 === void 0 ? void 0 : _lozenge$style4.color
|
|
44
|
+
},
|
|
45
|
+
isBold: lozenge.isBold !== false
|
|
46
|
+
}, lozenge.text);
|
|
47
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
._1s7zia51{border-right:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
3
|
+
._n7zlia51{border-bottom:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
4
|
+
._x3doia51{border-top:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._13liidpf{border-top-left-radius:0}
|
|
1
5
|
._13lilb4i{border-top-left-radius:var(--ds-radius-xsmall,2px)}
|
|
2
6
|
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
3
7
|
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
@@ -7,6 +11,7 @@
|
|
|
7
11
|
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
8
12
|
._1y1m1u8q{background-clip:padding-box}
|
|
9
13
|
._2hwxt94y{margin-right:1px}
|
|
14
|
+
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
10
15
|
._80om13gf{cursor:not-allowed}
|
|
11
16
|
._80omtlke{cursor:pointer}
|
|
12
17
|
._bfhkby5v{background-color:var(--ds-background-disabled,#17171708)}
|
|
@@ -16,16 +21,19 @@
|
|
|
16
21
|
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
17
22
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
18
23
|
._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
|
|
24
|
+
._mrkbidpf{border-bottom-left-radius:0}
|
|
19
25
|
._mrkblb4i{border-bottom-left-radius:var(--ds-radius-xsmall,2px)}
|
|
20
26
|
._n3tdt94y{padding-bottom:1px}
|
|
21
27
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
22
28
|
._o5721btx{white-space:break-spaces}
|
|
29
|
+
._o5721q9c{white-space:nowrap}
|
|
23
30
|
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
24
31
|
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
25
32
|
._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
|
|
26
33
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
27
34
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
28
35
|
._y3gn18uv{text-align:initial}
|
|
36
|
+
._4cvxq98m:hover{border-color:var(--ds-border-selected,#1868db)}
|
|
29
37
|
._irr31q28:hover{background-color:var(--ds-background-selected-bold-hovered,#1558bc)}
|
|
30
38
|
._irr3plhp:hover{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
|
|
31
39
|
._1di612kk:active{background-color:var(--ds-background-selected-bold-pressed,#123263)}
|
|
@@ -21,7 +21,8 @@ var styles = {
|
|
|
21
21
|
innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _k48p1wq8 _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _o5721btx _1nmz9jpi",
|
|
22
22
|
enabled: "_syazi7uo _80omtlke _bfhki8nm _irr3plhp _1di61gdz",
|
|
23
23
|
disabled: "_syaz1gmx _80om13gf _bfhkby5v",
|
|
24
|
-
unauthorised: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _13lilb4i _mrkblb4i _ca0qt94y _n3tdt94y _2hwxt94y _k48pi7a9 _irr31q28 _1di612kk"
|
|
24
|
+
unauthorised: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _13lilb4i _mrkblb4i _ca0qt94y _n3tdt94y _2hwxt94y _k48pi7a9 _irr31q28 _1di612kk",
|
|
25
|
+
action: "_x3doia51 _1s7zia51 _n7zlia51 _syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _13liidpf _mrkbidpf _2hwxv77o _k48pi7a9 _o5721q9c _4cvxq98m _irr31q28 _1di612kk"
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Action button has to be a span for the overflow to work correctly
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
._v564hlhx{transition:max-width .3s ease-in-out,padding-right .3s ease-in-out}._154iidpf{top:0}
|
|
3
|
+
._18m915vq{overflow-y:hidden}
|
|
4
|
+
._1e0c1nu9{display:inline}
|
|
5
|
+
._1e0c1o8l{display:inline-block}
|
|
6
|
+
._1pbykb7n{z-index:1}
|
|
7
|
+
._1reo15vq{overflow-x:hidden}
|
|
8
|
+
._1xi2idpf{right:0}
|
|
9
|
+
._kqswh2mm{position:relative}
|
|
10
|
+
._kqswstnw{position:absolute}
|
|
11
|
+
._o5721q9c{white-space:nowrap}
|
|
12
|
+
._p12fidpf{max-width:0}
|
|
13
|
+
._p12fuuw1{max-width:200px}
|
|
14
|
+
._s7n4jp4b{vertical-align:top}
|
|
15
|
+
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.RovoActionsButton = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _reactIntlNext = require("react-intl-next");
|
|
16
|
+
var _css = require("@atlaskit/css");
|
|
17
|
+
var _rovoChat = _interopRequireDefault(require("@atlaskit/icon/core/rovo-chat"));
|
|
18
|
+
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
19
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
|
+
var _messages = require("../../../../messages");
|
|
21
|
+
var _aiPrism = _interopRequireDefault(require("../../../common/ai-prism"));
|
|
22
|
+
var _actionButton = require("../action-button");
|
|
23
|
+
var _rovoPostAuthActionsModal = require("../rovo-post-auth-actions-modal");
|
|
24
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
|
+
var styles = {
|
|
26
|
+
wrapper: "_kqswh2mm _1e0c1o8l",
|
|
27
|
+
expanded: "_kqswstnw _154iidpf _1xi2idpf _1e0c1nu9 _o5721q9c _1pbykb7n",
|
|
28
|
+
expandedText: "_1reo15vq _18m915vq _v564hlhx _1e0c1o8l _p12fidpf _s7n4jp4b _o5721q9c",
|
|
29
|
+
expandedTextVisible: "_p12fuuw1 _u5f31b66"
|
|
30
|
+
};
|
|
31
|
+
var RovoActionsButton = exports.RovoActionsButton = function RovoActionsButton(_ref) {
|
|
32
|
+
var onClick = _ref.onClick,
|
|
33
|
+
testId = _ref.testId,
|
|
34
|
+
_ref$title = _ref.title,
|
|
35
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
|
36
|
+
_ref$url = _ref.url,
|
|
37
|
+
url = _ref$url === void 0 ? '' : _ref$url;
|
|
38
|
+
var _useState = (0, _react.useState)(false),
|
|
39
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
40
|
+
isHovered = _useState2[0],
|
|
41
|
+
setIsHovered = _useState2[1];
|
|
42
|
+
var _useState3 = (0, _react.useState)(false),
|
|
43
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
44
|
+
isPopupOpen = _useState4[0],
|
|
45
|
+
setIsPopupOpen = _useState4[1];
|
|
46
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
47
|
+
formatMessage = _useIntl.formatMessage;
|
|
48
|
+
var handleClick = function handleClick(e) {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
e.stopPropagation();
|
|
51
|
+
setIsPopupOpen(function (prev) {
|
|
52
|
+
return !prev;
|
|
53
|
+
});
|
|
54
|
+
onClick === null || onClick === void 0 || onClick(e);
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
57
|
+
isOpen: isPopupOpen,
|
|
58
|
+
onClose: function onClose() {
|
|
59
|
+
return setIsPopupOpen(false);
|
|
60
|
+
},
|
|
61
|
+
placement: "right-start",
|
|
62
|
+
content: function content() {
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_aiPrism.default, {
|
|
64
|
+
isVisible: true,
|
|
65
|
+
isMoving: true,
|
|
66
|
+
isGlowing: true
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_rovoPostAuthActionsModal.RovoPostAuthActionsModal, {
|
|
68
|
+
title: title,
|
|
69
|
+
url: url,
|
|
70
|
+
testId: testId && "".concat(testId, "-popup")
|
|
71
|
+
}));
|
|
72
|
+
},
|
|
73
|
+
trigger: function trigger(triggerProps) {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
75
|
+
xcss: styles.wrapper,
|
|
76
|
+
onMouseEnter: function onMouseEnter() {
|
|
77
|
+
return setIsHovered(true);
|
|
78
|
+
},
|
|
79
|
+
onMouseLeave: function onMouseLeave() {
|
|
80
|
+
return setIsHovered(false);
|
|
81
|
+
},
|
|
82
|
+
onFocus: function onFocus() {
|
|
83
|
+
return setIsHovered(true);
|
|
84
|
+
},
|
|
85
|
+
onBlur: function onBlur() {
|
|
86
|
+
return setIsHovered(false);
|
|
87
|
+
}
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, (0, _extends2.default)({
|
|
89
|
+
onClick: handleClick,
|
|
90
|
+
viewType: "action",
|
|
91
|
+
testId: testId
|
|
92
|
+
}, triggerProps), /*#__PURE__*/_react.default.createElement(_rovoChat.default, {
|
|
93
|
+
label: "Rovo",
|
|
94
|
+
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
95
|
+
size: "small"
|
|
96
|
+
})), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
97
|
+
xcss: styles.expanded
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, (0, _extends2.default)({
|
|
99
|
+
onClick: handleClick,
|
|
100
|
+
viewType: "action"
|
|
101
|
+
}, triggerProps), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
102
|
+
xcss: (0, _css.cx)(styles.expandedText, isHovered && styles.expandedTextVisible)
|
|
103
|
+
}, formatMessage(_messages.messages.rovo_actions_explore)), /*#__PURE__*/_react.default.createElement(_rovoChat.default, {
|
|
104
|
+
label: "Rovo",
|
|
105
|
+
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
106
|
+
size: "small"
|
|
107
|
+
}))));
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._19it1cdj{border:var(--ds-border-width,1px) solid var(--ds-border-accent-lime,#6a9a23)}
|
|
3
|
+
._19it1kc4{border:var(--ds-border-width,1px) solid var(--ds-border-accent-orange,#e06c00)}
|
|
4
|
+
._19itia51{border:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
5
|
+
._19itnf5y{border:var(--ds-border-width,1px) solid var(--ds-border-accent-purple,#af59e1)}
|
|
6
|
+
._2rko1mok{border-radius:var(--ds-radius-large,8px)}
|
|
7
|
+
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
8
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
9
|
+
._195gpxbi{margin-inline:var(--ds-space-200,1pc)}
|
|
10
|
+
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
11
|
+
._18m915vq{overflow-y:hidden}
|
|
12
|
+
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
13
|
+
._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
14
|
+
._1bsb1kdj{width:25pc}
|
|
15
|
+
._1bsb1ns9{width:-moz-fit-content;width:fit-content}
|
|
16
|
+
._1e0c1bgi{display:contents}
|
|
17
|
+
._1e0c1txw{display:flex}
|
|
18
|
+
._1reo15vq{overflow-x:hidden}
|
|
19
|
+
._2lx21bp4{flex-direction:column}
|
|
20
|
+
._4cvr1h6o{align-items:center}
|
|
21
|
+
._4t3it94y{height:1px}
|
|
22
|
+
._80omtlke{cursor:pointer}
|
|
23
|
+
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
24
|
+
._bfhkf5uh{background-color:var(--ds-background-accent-orange-subtlest,#fff5db)}
|
|
25
|
+
._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
|
|
26
|
+
._bfhkm890{background-color:var(--ds-background-accent-lime-subtlest,#efffd6)}
|
|
27
|
+
._bfhkp2ly{background-color:var(--ds-background-accent-purple-subtlest,#f8eefe)}
|
|
28
|
+
._bfhkplhp{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
|
|
29
|
+
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
30
|
+
._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
|
|
31
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
32
|
+
._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
|
|
33
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
34
|
+
._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
|
|
35
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
36
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
37
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
38
|
+
._irr319yr:hover{background-color:var(--ds-background-accent-orange-subtlest-hovered,#fce4a6)}
|
|
39
|
+
._irr3d4y8:hover{background-color:var(--ds-background-accent-lime-subtlest-hovered,#d3f1a7)}
|
|
40
|
+
._irr3kca2:hover{background-color:var(--ds-background-accent-purple-subtlest-hovered,#eed7fc)}
|
|
41
|
+
._irr3plhp:hover{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.RovoPostAuthActionsModal = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _aiGenerativeRemove = _interopRequireDefault(require("@atlaskit/icon-lab/core/ai-generative-remove"));
|
|
14
|
+
var _aiGenerativeText = _interopRequireDefault(require("@atlaskit/icon-lab/core/ai-generative-text"));
|
|
15
|
+
var _aiSearch = _interopRequireDefault(require("@atlaskit/icon-lab/core/ai-search"));
|
|
16
|
+
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
17
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
|
+
var styles = {
|
|
20
|
+
container: "_2rko1mok _1reo15vq _18m915vq _bfhk1bhr _16qs130s _1bsb1kdj _1e0c1txw _2lx21bp4",
|
|
21
|
+
header: "_ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi",
|
|
22
|
+
title: "_11c8fhey _k48pwu06",
|
|
23
|
+
divider: "_195gpxbi _4t3it94y _bfhkplhp",
|
|
24
|
+
actions: "_ca0qutpp _u5f3pxbi _n3tdutpp _19bvpxbi",
|
|
25
|
+
pressable: "_1e0c1bgi",
|
|
26
|
+
actionButtonBase: "_zulpu2gc _2rkopb1k _11c8fhey _1e0c1txw _4cvr1h6o _ca0q1b66 _u5f3utpp _n3td1b66 _19bvutpp _80omtlke _1bsb1ns9",
|
|
27
|
+
actionButtonImproveDraft: "_19itnf5y _bfhkp2ly _irr3kca2",
|
|
28
|
+
actionButtonFindRelated: "_19it1kc4 _bfhkf5uh _irr319yr",
|
|
29
|
+
actionButtonCreateActions: "_19it1cdj _bfhkm890 _irr3d4y8",
|
|
30
|
+
actionButtonShowRelevance: "_19itia51 _bfhkhfxm _irr3plhp"
|
|
31
|
+
};
|
|
32
|
+
var RovoPostAuthActionsModal = exports.RovoPostAuthActionsModal = function RovoPostAuthActionsModal(_ref) {
|
|
33
|
+
var title = _ref.title,
|
|
34
|
+
url = _ref.url,
|
|
35
|
+
testId = _ref.testId;
|
|
36
|
+
return /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
37
|
+
xcss: styles.container,
|
|
38
|
+
testId: testId,
|
|
39
|
+
space: "space.0"
|
|
40
|
+
}, /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
41
|
+
xcss: styles.header,
|
|
42
|
+
space: "space.100"
|
|
43
|
+
}, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
44
|
+
xcss: styles.title
|
|
45
|
+
}, /*#__PURE__*/React.createElement(_link.default, {
|
|
46
|
+
href: url
|
|
47
|
+
}, title))), /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
48
|
+
xcss: styles.divider
|
|
49
|
+
}), /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
50
|
+
xcss: styles.actions,
|
|
51
|
+
space: "space.100",
|
|
52
|
+
alignInline: "start"
|
|
53
|
+
}, /*#__PURE__*/React.createElement(_compiled.Pressable, {
|
|
54
|
+
xcss: styles.pressable
|
|
55
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
56
|
+
className: (0, _runtime.ax)([styles.actionButtonBase, styles.actionButtonImproveDraft])
|
|
57
|
+
}, /*#__PURE__*/React.createElement(_aiGenerativeRemove.default, {
|
|
58
|
+
label: "Improve draft icon",
|
|
59
|
+
color: "var(--ds-icon-accent-purple, #AF59E1)",
|
|
60
|
+
size: "small"
|
|
61
|
+
}))), /*#__PURE__*/React.createElement(_compiled.Pressable, {
|
|
62
|
+
xcss: styles.pressable
|
|
63
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
64
|
+
className: (0, _runtime.ax)([styles.actionButtonBase, styles.actionButtonFindRelated])
|
|
65
|
+
}, /*#__PURE__*/React.createElement(_aiSearch.default, {
|
|
66
|
+
label: "Find related icon",
|
|
67
|
+
color: "var(--ds-icon-accent-orange, #E06C00)",
|
|
68
|
+
size: "small"
|
|
69
|
+
}))), /*#__PURE__*/React.createElement(_compiled.Pressable, {
|
|
70
|
+
xcss: styles.pressable
|
|
71
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
72
|
+
className: (0, _runtime.ax)([styles.actionButtonBase, styles.actionButtonCreateActions])
|
|
73
|
+
}, /*#__PURE__*/React.createElement(_aiGenerativeText.default, {
|
|
74
|
+
label: "Create actions icon",
|
|
75
|
+
color: "var(--ds-icon-accent-lime, #6A9A23)",
|
|
76
|
+
size: "small"
|
|
77
|
+
}))), /*#__PURE__*/React.createElement(_compiled.Pressable, {
|
|
78
|
+
xcss: styles.pressable
|
|
79
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
80
|
+
className: (0, _runtime.ax)([styles.actionButtonBase, styles.actionButtonShowRelevance])
|
|
81
|
+
}, /*#__PURE__*/React.createElement(_aiGenerativeText.default, {
|
|
82
|
+
label: "Show relevance icon",
|
|
83
|
+
color: "var(--ds-icon-subtle, #505258)",
|
|
84
|
+
size: "small"
|
|
85
|
+
})))));
|
|
86
|
+
};
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "43.
|
|
25
|
+
packageVersion: "43.30.0",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
package/dist/es2019/messages.js
CHANGED
|
@@ -570,6 +570,11 @@ export const messages = defineMessages({
|
|
|
570
570
|
defaultMessage: "We can't display private pages",
|
|
571
571
|
description: 'Shown when a user does not have access to a link.'
|
|
572
572
|
},
|
|
573
|
+
rovo_actions_explore: {
|
|
574
|
+
id: 'fabric.linking.rovo_actions_explore-non-final',
|
|
575
|
+
defaultMessage: 'Explore',
|
|
576
|
+
description: 'Label for the Rovo Actions button that allows users to explore AI actions for a link'
|
|
577
|
+
},
|
|
573
578
|
unassigned: {
|
|
574
579
|
id: 'fabric.linking.unassigned',
|
|
575
580
|
defaultMessage: 'Unassigned',
|
|
@@ -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: "43.
|
|
5
|
+
packageVersion: "43.30.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HoverCard } from '../../HoverCard';
|
|
3
|
+
import { Frame } from '../Frame';
|
|
4
|
+
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
5
|
+
import { renderLozenge } from './renderLozenge';
|
|
6
|
+
export function InlineCardResolvedViewFunctional({
|
|
7
|
+
id,
|
|
8
|
+
title = '',
|
|
9
|
+
isSelected,
|
|
10
|
+
isHovered,
|
|
11
|
+
onClick,
|
|
12
|
+
icon,
|
|
13
|
+
link,
|
|
14
|
+
testId = 'inline-card-resolved-view',
|
|
15
|
+
titleTextColor,
|
|
16
|
+
titlePrefix,
|
|
17
|
+
showHoverPreview = false,
|
|
18
|
+
hoverPreviewOptions,
|
|
19
|
+
actionOptions,
|
|
20
|
+
truncateInline,
|
|
21
|
+
type,
|
|
22
|
+
hideIconLoadingSkeleton,
|
|
23
|
+
lozenge
|
|
24
|
+
}) {
|
|
25
|
+
const frame = /*#__PURE__*/React.createElement(Frame, {
|
|
26
|
+
testId: testId,
|
|
27
|
+
link: link,
|
|
28
|
+
isSelected: isSelected,
|
|
29
|
+
isHovered: isHovered,
|
|
30
|
+
onClick: onClick,
|
|
31
|
+
truncateInline: truncateInline
|
|
32
|
+
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
33
|
+
emoji: titlePrefix,
|
|
34
|
+
icon: icon,
|
|
35
|
+
title: title,
|
|
36
|
+
titleTextColor: titleTextColor,
|
|
37
|
+
type: type,
|
|
38
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
39
|
+
}), renderLozenge(lozenge));
|
|
40
|
+
if (!showHoverPreview || !link) {
|
|
41
|
+
return frame;
|
|
42
|
+
}
|
|
43
|
+
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
44
|
+
id: id,
|
|
45
|
+
url: link,
|
|
46
|
+
actionOptions: actionOptions,
|
|
47
|
+
hoverPreviewOptions: hoverPreviewOptions
|
|
48
|
+
}, frame);
|
|
49
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
3
4
|
import { HoverCard } from '../../HoverCard';
|
|
4
5
|
import InlineLozenge from '../common/inline-lozenge';
|
|
5
6
|
import { Frame } from '../Frame';
|
|
6
7
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
7
|
-
|
|
8
|
+
import { InlineCardResolvedViewFunctional } from './InlineCardResolvedViewFunctional';
|
|
9
|
+
class InlineCardResolvedViewClass extends React.Component {
|
|
8
10
|
renderLozenge() {
|
|
9
11
|
var _lozenge$style3, _lozenge$style4;
|
|
10
12
|
const {
|
|
@@ -85,4 +87,5 @@ export class InlineCardResolvedView extends React.Component {
|
|
|
85
87
|
}
|
|
86
88
|
return inlineCardResolvedView;
|
|
87
89
|
}
|
|
88
|
-
}
|
|
90
|
+
}
|
|
91
|
+
export const InlineCardResolvedView = componentWithFG('smart-card-inline-resolved-view-refactor', InlineCardResolvedViewFunctional, InlineCardResolvedViewClass);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import InlineLozenge from '../common/inline-lozenge';
|
|
4
|
+
const LOZENGE_TEST_ID = 'inline-card-resolved-view-lozenge';
|
|
5
|
+
export function renderLozenge(lozenge) {
|
|
6
|
+
var _lozenge$style3, _lozenge$style4;
|
|
7
|
+
if (!lozenge || !(lozenge !== null && lozenge !== void 0 && lozenge.text)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
if (fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
|
|
11
|
+
const stateMetricMatch = lozenge.text.match(/^(.+?)\s+-\s+(\d+(?:\.\d+)?)$/);
|
|
12
|
+
if (stateMetricMatch) {
|
|
13
|
+
var _lozenge$style, _lozenge$style2;
|
|
14
|
+
const [, label, metric] = stateMetricMatch;
|
|
15
|
+
const appearance = lozenge.appearance || 'neutral';
|
|
16
|
+
return /*#__PURE__*/React.createElement(InlineLozenge, {
|
|
17
|
+
testId: LOZENGE_TEST_ID,
|
|
18
|
+
appearance: appearance,
|
|
19
|
+
style: {
|
|
20
|
+
backgroundColor: lozenge === null || lozenge === void 0 ? void 0 : (_lozenge$style = lozenge.style) === null || _lozenge$style === void 0 ? void 0 : _lozenge$style.backgroundColor,
|
|
21
|
+
color: lozenge === null || lozenge === void 0 ? void 0 : (_lozenge$style2 = lozenge.style) === null || _lozenge$style2 === void 0 ? void 0 : _lozenge$style2.color
|
|
22
|
+
},
|
|
23
|
+
trailingMetric: metric
|
|
24
|
+
}, label);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const appearance = lozenge.appearance || 'default';
|
|
28
|
+
return /*#__PURE__*/React.createElement(InlineLozenge, {
|
|
29
|
+
testId: LOZENGE_TEST_ID,
|
|
30
|
+
appearance: appearance,
|
|
31
|
+
style: {
|
|
32
|
+
backgroundColor: lozenge === null || lozenge === void 0 ? void 0 : (_lozenge$style3 = lozenge.style) === null || _lozenge$style3 === void 0 ? void 0 : _lozenge$style3.backgroundColor,
|
|
33
|
+
color: lozenge === null || lozenge === void 0 ? void 0 : (_lozenge$style4 = lozenge.style) === null || _lozenge$style4 === void 0 ? void 0 : _lozenge$style4.color
|
|
34
|
+
},
|
|
35
|
+
isBold: lozenge.isBold !== false
|
|
36
|
+
}, lozenge.text);
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|