@atlaskit/smart-card 44.0.1 → 44.0.3
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 +15 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +3 -0
- package/dist/cjs/state/hooks/use-inline-action-nudge-experiment/index.js +2 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +6 -6
- package/dist/cjs/view/InlineCard/common/rovo-actions-cta/index.compiled.css +12 -0
- package/dist/cjs/view/InlineCard/common/rovo-actions-cta/index.js +31 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +3 -0
- package/dist/es2019/state/hooks/use-inline-action-nudge-experiment/index.js +2 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +5 -5
- package/dist/es2019/view/InlineCard/common/rovo-actions-cta/index.compiled.css +12 -0
- package/dist/es2019/view/InlineCard/common/rovo-actions-cta/index.js +23 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +3 -0
- package/dist/esm/state/hooks/use-inline-action-nudge-experiment/index.js +2 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +5 -5
- package/dist/esm/view/InlineCard/common/rovo-actions-cta/index.compiled.css +12 -0
- package/dist/esm/view/InlineCard/common/rovo-actions-cta/index.js +22 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.d.ts +1 -1
- package/dist/types/view/InlineCard/common/rovo-actions-cta/index.d.ts +7 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/common/rovo-actions-cta/index.d.ts +7 -0
- package/package.json +5 -5
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-button-treatment---default.png +0 -3
- package/dist/cjs/view/InlineCard/common/rovo-actions-button/index.js +0 -19
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-button-treatment---default.png +0 -3
- package/dist/es2019/view/InlineCard/common/rovo-actions-button/index.js +0 -13
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-button-treatment---default.png +0 -3
- package/dist/esm/view/InlineCard/common/rovo-actions-button/index.js +0 -12
- package/dist/types/view/InlineCard/common/rovo-actions-button/index.d.ts +0 -5
- package/dist/types-ts4.5/view/InlineCard/common/rovo-actions-button/index.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 44.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 44.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`58913fb961b08`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/58913fb961b08) -
|
|
14
|
+
[ux] Remove button/popup functionality from Rovo action CTA - just keep as icon for the inline
|
|
15
|
+
link.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 44.0.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
10
|
var _rovo = require("../../../utils/rovo");
|
|
11
11
|
var _helpers = require("../../helpers");
|
|
12
12
|
var _store = require("../../store");
|
|
@@ -40,7 +40,7 @@ var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url
|
|
|
40
40
|
if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
|
|
41
41
|
return NOT_ENABLED_RESULT;
|
|
42
42
|
}
|
|
43
|
-
var isEnabled = (0,
|
|
43
|
+
var isEnabled = (0, _expValEquals.expValEquals)('rovogrowth_640_inline_action_nudge', 'isEnabled', true);
|
|
44
44
|
return {
|
|
45
45
|
isEnabled: isEnabled
|
|
46
46
|
};
|
|
@@ -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: "44.0.
|
|
14
|
+
packageVersion: "44.0.2"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.InlineCardResolvedViewBase = InlineCardResolvedViewBase;
|
|
8
8
|
exports.InlineCardResolvedViewFunctional = void 0;
|
|
9
|
-
exports.
|
|
9
|
+
exports.InlineCardResolvedViewFunctionalWithRovoActions = InlineCardResolvedViewFunctionalWithRovoActions;
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
12
12
|
var _useInlineActionNudgeExperiment = _interopRequireDefault(require("../../../state/hooks/use-inline-action-nudge-experiment"));
|
|
13
13
|
var _HoverCard = require("../../HoverCard");
|
|
14
|
-
var
|
|
14
|
+
var _rovoActionsCta = require("../common/rovo-actions-cta");
|
|
15
15
|
var _Frame = require("../Frame");
|
|
16
16
|
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
17
17
|
var _renderLozenge = require("./renderLozenge");
|
|
@@ -61,7 +61,7 @@ function InlineCardResolvedViewBase(_ref) {
|
|
|
61
61
|
hoverPreviewOptions: hoverPreviewOptions
|
|
62
62
|
}, frame);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function InlineCardResolvedViewFunctionalWithRovoActions(_ref2) {
|
|
65
65
|
var id = _ref2.id,
|
|
66
66
|
_ref2$title = _ref2.title,
|
|
67
67
|
title = _ref2$title === void 0 ? '' : _ref2$title,
|
|
@@ -100,8 +100,8 @@ function InlineCardResolvedViewFunctionalWithRovoActionsButton(_ref2) {
|
|
|
100
100
|
titleTextColor: titleTextColor,
|
|
101
101
|
type: type,
|
|
102
102
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
103
|
-
}), (0, _renderLozenge.renderLozenge)(lozenge), isEnabled && link && /*#__PURE__*/_react.default.createElement(
|
|
104
|
-
testId: "".concat(testId, "-rovo-actions-
|
|
103
|
+
}), (0, _renderLozenge.renderLozenge)(lozenge), isEnabled && link && /*#__PURE__*/_react.default.createElement(_rovoActionsCta.RovoActionsCta, {
|
|
104
|
+
testId: "".concat(testId, "-rovo-actions-cta")
|
|
105
105
|
}));
|
|
106
106
|
if (!showHoverPreview || !link) {
|
|
107
107
|
return frame;
|
|
@@ -113,4 +113,4 @@ function InlineCardResolvedViewFunctionalWithRovoActionsButton(_ref2) {
|
|
|
113
113
|
hoverPreviewOptions: hoverPreviewOptions
|
|
114
114
|
}, frame);
|
|
115
115
|
}
|
|
116
|
-
var InlineCardResolvedViewFunctional = exports.InlineCardResolvedViewFunctional = (0, _platformFeatureFlagsReact.componentWithFG)('rovogrowth-640-inline-action-nudge-fg',
|
|
116
|
+
var InlineCardResolvedViewFunctional = exports.InlineCardResolvedViewFunctional = (0, _platformFeatureFlagsReact.componentWithFG)('rovogrowth-640-inline-action-nudge-fg', InlineCardResolvedViewFunctionalWithRovoActions, InlineCardResolvedViewBase);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
2
|
+
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
3
|
+
._1e0c1nu9{display:inline}
|
|
4
|
+
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
5
|
+
._1y1m1u8q{background-clip:padding-box}
|
|
6
|
+
._80omtlke{cursor:pointer}
|
|
7
|
+
._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
|
|
8
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
9
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
10
|
+
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
11
|
+
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
12
|
+
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.RovoActionsCta = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _css = require("@atlaskit/css");
|
|
14
|
+
var _rovoChat = _interopRequireDefault(require("@atlaskit/icon/core/rovo-chat"));
|
|
15
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
|
+
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); }
|
|
17
|
+
var styles = {
|
|
18
|
+
innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _19bv12x7 _u5f312x7",
|
|
19
|
+
rovoIcon: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _ca0qv77o _n3tdv77o"
|
|
20
|
+
};
|
|
21
|
+
var RovoActionsCta = exports.RovoActionsCta = function RovoActionsCta(_ref) {
|
|
22
|
+
var testId = _ref.testId;
|
|
23
|
+
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
24
|
+
xcss: (0, _css.cx)(styles.innerContainer, styles.rovoIcon),
|
|
25
|
+
testId: testId
|
|
26
|
+
}, /*#__PURE__*/React.createElement(_rovoChat.default, {
|
|
27
|
+
label: "Rovo",
|
|
28
|
+
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
29
|
+
size: "small"
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
@@ -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: "44.0.
|
|
25
|
+
packageVersion: "44.0.2",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
4
4
|
import { getExtensionKey } from '../../helpers';
|
|
5
5
|
import { useSmartCardState } from '../../store';
|
|
@@ -33,7 +33,7 @@ const useInlineActionNudgeExperiment = url => {
|
|
|
33
33
|
if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
|
|
34
34
|
return NOT_ENABLED_RESULT;
|
|
35
35
|
}
|
|
36
|
-
const isEnabled =
|
|
36
|
+
const isEnabled = expValEquals('rovogrowth_640_inline_action_nudge', 'isEnabled', true);
|
|
37
37
|
return {
|
|
38
38
|
isEnabled
|
|
39
39
|
};
|
|
@@ -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: "44.0.
|
|
5
|
+
packageVersion: "44.0.2"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
3
3
|
import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
|
|
4
4
|
import { HoverCard } from '../../HoverCard';
|
|
5
|
-
import {
|
|
5
|
+
import { RovoActionsCta } from '../common/rovo-actions-cta';
|
|
6
6
|
import { Frame } from '../Frame';
|
|
7
7
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
8
8
|
import { renderLozenge } from './renderLozenge';
|
|
@@ -50,7 +50,7 @@ export function InlineCardResolvedViewBase({
|
|
|
50
50
|
hoverPreviewOptions: hoverPreviewOptions
|
|
51
51
|
}, frame);
|
|
52
52
|
}
|
|
53
|
-
export function
|
|
53
|
+
export function InlineCardResolvedViewFunctionalWithRovoActions({
|
|
54
54
|
id,
|
|
55
55
|
title = '',
|
|
56
56
|
isSelected,
|
|
@@ -88,8 +88,8 @@ export function InlineCardResolvedViewFunctionalWithRovoActionsButton({
|
|
|
88
88
|
titleTextColor: titleTextColor,
|
|
89
89
|
type: type,
|
|
90
90
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
91
|
-
}), renderLozenge(lozenge), isEnabled && link && /*#__PURE__*/React.createElement(
|
|
92
|
-
testId: `${testId}-rovo-actions-
|
|
91
|
+
}), renderLozenge(lozenge), isEnabled && link && /*#__PURE__*/React.createElement(RovoActionsCta, {
|
|
92
|
+
testId: `${testId}-rovo-actions-cta`
|
|
93
93
|
}));
|
|
94
94
|
if (!showHoverPreview || !link) {
|
|
95
95
|
return frame;
|
|
@@ -101,4 +101,4 @@ export function InlineCardResolvedViewFunctionalWithRovoActionsButton({
|
|
|
101
101
|
hoverPreviewOptions: hoverPreviewOptions
|
|
102
102
|
}, frame);
|
|
103
103
|
}
|
|
104
|
-
export const InlineCardResolvedViewFunctional = componentWithFG('rovogrowth-640-inline-action-nudge-fg',
|
|
104
|
+
export const InlineCardResolvedViewFunctional = componentWithFG('rovogrowth-640-inline-action-nudge-fg', InlineCardResolvedViewFunctionalWithRovoActions, InlineCardResolvedViewBase);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
2
|
+
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
3
|
+
._1e0c1nu9{display:inline}
|
|
4
|
+
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
5
|
+
._1y1m1u8q{background-clip:padding-box}
|
|
6
|
+
._80omtlke{cursor:pointer}
|
|
7
|
+
._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
|
|
8
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
9
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
10
|
+
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
11
|
+
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
12
|
+
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { cx } from '@atlaskit/css';
|
|
6
|
+
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
7
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
+
const styles = {
|
|
9
|
+
innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _19bv12x7 _u5f312x7",
|
|
10
|
+
rovoIcon: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _ca0qv77o _n3tdv77o"
|
|
11
|
+
};
|
|
12
|
+
export const RovoActionsCta = ({
|
|
13
|
+
testId
|
|
14
|
+
}) => {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
16
|
+
xcss: cx(styles.innerContainer, styles.rovoIcon),
|
|
17
|
+
testId: testId
|
|
18
|
+
}, /*#__PURE__*/React.createElement(RovoChatIcon, {
|
|
19
|
+
label: "Rovo",
|
|
20
|
+
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
21
|
+
size: "small"
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "44.0.
|
|
15
|
+
packageVersion: "44.0.2",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
4
4
|
import { getExtensionKey } from '../../helpers';
|
|
5
5
|
import { useSmartCardState } from '../../store';
|
|
@@ -33,7 +33,7 @@ var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url
|
|
|
33
33
|
if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
|
|
34
34
|
return NOT_ENABLED_RESULT;
|
|
35
35
|
}
|
|
36
|
-
var isEnabled =
|
|
36
|
+
var isEnabled = expValEquals('rovogrowth_640_inline_action_nudge', 'isEnabled', true);
|
|
37
37
|
return {
|
|
38
38
|
isEnabled: isEnabled
|
|
39
39
|
};
|
|
@@ -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: "44.0.
|
|
7
|
+
packageVersion: "44.0.2"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
3
3
|
import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
|
|
4
4
|
import { HoverCard } from '../../HoverCard';
|
|
5
|
-
import {
|
|
5
|
+
import { RovoActionsCta } from '../common/rovo-actions-cta';
|
|
6
6
|
import { Frame } from '../Frame';
|
|
7
7
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
8
8
|
import { renderLozenge } from './renderLozenge';
|
|
@@ -52,7 +52,7 @@ export function InlineCardResolvedViewBase(_ref) {
|
|
|
52
52
|
hoverPreviewOptions: hoverPreviewOptions
|
|
53
53
|
}, frame);
|
|
54
54
|
}
|
|
55
|
-
export function
|
|
55
|
+
export function InlineCardResolvedViewFunctionalWithRovoActions(_ref2) {
|
|
56
56
|
var id = _ref2.id,
|
|
57
57
|
_ref2$title = _ref2.title,
|
|
58
58
|
title = _ref2$title === void 0 ? '' : _ref2$title,
|
|
@@ -91,8 +91,8 @@ export function InlineCardResolvedViewFunctionalWithRovoActionsButton(_ref2) {
|
|
|
91
91
|
titleTextColor: titleTextColor,
|
|
92
92
|
type: type,
|
|
93
93
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
94
|
-
}), renderLozenge(lozenge), isEnabled && link && /*#__PURE__*/React.createElement(
|
|
95
|
-
testId: "".concat(testId, "-rovo-actions-
|
|
94
|
+
}), renderLozenge(lozenge), isEnabled && link && /*#__PURE__*/React.createElement(RovoActionsCta, {
|
|
95
|
+
testId: "".concat(testId, "-rovo-actions-cta")
|
|
96
96
|
}));
|
|
97
97
|
if (!showHoverPreview || !link) {
|
|
98
98
|
return frame;
|
|
@@ -104,4 +104,4 @@ export function InlineCardResolvedViewFunctionalWithRovoActionsButton(_ref2) {
|
|
|
104
104
|
hoverPreviewOptions: hoverPreviewOptions
|
|
105
105
|
}, frame);
|
|
106
106
|
}
|
|
107
|
-
export var InlineCardResolvedViewFunctional = componentWithFG('rovogrowth-640-inline-action-nudge-fg',
|
|
107
|
+
export var InlineCardResolvedViewFunctional = componentWithFG('rovogrowth-640-inline-action-nudge-fg', InlineCardResolvedViewFunctionalWithRovoActions, InlineCardResolvedViewBase);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
2
|
+
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
3
|
+
._1e0c1nu9{display:inline}
|
|
4
|
+
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
5
|
+
._1y1m1u8q{background-clip:padding-box}
|
|
6
|
+
._80omtlke{cursor:pointer}
|
|
7
|
+
._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
|
|
8
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
9
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
10
|
+
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
11
|
+
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
12
|
+
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { cx } from '@atlaskit/css';
|
|
6
|
+
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
7
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
+
var styles = {
|
|
9
|
+
innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _19bv12x7 _u5f312x7",
|
|
10
|
+
rovoIcon: "_syaz15cr _80omtlke _bfhkjmqp _qrwqlb4i _1o0zlb4i _ca0qv77o _n3tdv77o"
|
|
11
|
+
};
|
|
12
|
+
export var RovoActionsCta = function RovoActionsCta(_ref) {
|
|
13
|
+
var testId = _ref.testId;
|
|
14
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
15
|
+
xcss: cx(styles.innerContainer, styles.rovoIcon),
|
|
16
|
+
testId: testId
|
|
17
|
+
}, /*#__PURE__*/React.createElement(RovoChatIcon, {
|
|
18
|
+
label: "Rovo",
|
|
19
|
+
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
20
|
+
size: "small"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "44.0.
|
|
18
|
+
packageVersion: "44.0.2",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type InlineCardResolvedViewFunctionalProps } from './types';
|
|
3
3
|
export declare function InlineCardResolvedViewBase({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function InlineCardResolvedViewFunctionalWithRovoActions({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
|
|
5
5
|
export declare const InlineCardResolvedViewFunctional: React.FC<InlineCardResolvedViewFunctionalProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type InlineCardResolvedViewFunctionalProps } from './types';
|
|
3
3
|
export declare function InlineCardResolvedViewBase({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function InlineCardResolvedViewFunctionalWithRovoActions({ id, title, isSelected, isHovered, onClick, icon, link, testId, titleTextColor, titlePrefix, showHoverPreview, hoverPreviewOptions, actionOptions, truncateInline, type, hideIconLoadingSkeleton, lozenge, }: InlineCardResolvedViewFunctionalProps): React.JSX.Element;
|
|
5
5
|
export declare const InlineCardResolvedViewFunctional: React.FC<InlineCardResolvedViewFunctionalProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "44.0.
|
|
3
|
+
"version": "44.0.3",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@atlaskit/form": "^15.5.0",
|
|
52
52
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
53
53
|
"@atlaskit/heading": "^5.4.0",
|
|
54
|
-
"@atlaskit/icon": "^34.
|
|
54
|
+
"@atlaskit/icon": "^34.1.0",
|
|
55
55
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
56
|
-
"@atlaskit/icon-lab": "^6.
|
|
56
|
+
"@atlaskit/icon-lab": "^6.5.0",
|
|
57
57
|
"@atlaskit/icon-object": "^7.5.0",
|
|
58
58
|
"@atlaskit/image": "^3.0.0",
|
|
59
59
|
"@atlaskit/json-ld-types": "^1.4.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@atlaskit/popup": "^4.16.0",
|
|
75
75
|
"@atlaskit/primitives": "^19.0.0",
|
|
76
76
|
"@atlaskit/react-ufo": "^5.13.0",
|
|
77
|
-
"@atlaskit/rovo-triggers": "^5.
|
|
77
|
+
"@atlaskit/rovo-triggers": "^5.38.0",
|
|
78
78
|
"@atlaskit/section-message": "^8.12.0",
|
|
79
79
|
"@atlaskit/select": "^21.10.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.1.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@atlaskit/textfield": "^8.3.0",
|
|
84
84
|
"@atlaskit/theme": "^23.0.0",
|
|
85
85
|
"@atlaskit/tile": "^1.0.0",
|
|
86
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
86
|
+
"@atlaskit/tmp-editor-statsig": "^62.0.0",
|
|
87
87
|
"@atlaskit/tokens": "^13.0.0",
|
|
88
88
|
"@atlaskit/tooltip": "^21.1.0",
|
|
89
89
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.RovoActionsButton = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _rovoChat = _interopRequireDefault(require("@atlaskit/icon/core/rovo-chat"));
|
|
10
|
-
var RovoActionsButton = exports.RovoActionsButton = function RovoActionsButton(_ref) {
|
|
11
|
-
var testId = _ref.testId;
|
|
12
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
13
|
-
"data-testid": testId
|
|
14
|
-
}, /*#__PURE__*/_react.default.createElement(_rovoChat.default, {
|
|
15
|
-
label: "Rovo",
|
|
16
|
-
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
17
|
-
size: "small"
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
3
|
-
export const RovoActionsButton = ({
|
|
4
|
-
testId
|
|
5
|
-
}) => {
|
|
6
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
7
|
-
"data-testid": testId
|
|
8
|
-
}, /*#__PURE__*/React.createElement(RovoChatIcon, {
|
|
9
|
-
label: "Rovo",
|
|
10
|
-
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
11
|
-
size: "small"
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
3
|
-
export var RovoActionsButton = function RovoActionsButton(_ref) {
|
|
4
|
-
var testId = _ref.testId;
|
|
5
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
6
|
-
"data-testid": testId
|
|
7
|
-
}, /*#__PURE__*/React.createElement(RovoChatIcon, {
|
|
8
|
-
label: "Rovo",
|
|
9
|
-
color: "var(--ds-icon-inverse, #FFFFFF)",
|
|
10
|
-
size: "small"
|
|
11
|
-
}));
|
|
12
|
-
};
|