@atlaskit/rovo-agent-components 8.0.0 → 8.0.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 8.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d5999d2cd6719`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5999d2cd6719) -
|
|
8
|
+
Use the ADS icon button for agent favourite actions.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.0.0
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
|
@@ -11,11 +11,14 @@ require("./index.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
16
|
var _reactIntl = require("react-intl");
|
|
17
|
+
var _new = require("@atlaskit/button/new");
|
|
16
18
|
var _css = require("@atlaskit/css");
|
|
17
19
|
var _starStarred = _interopRequireDefault(require("@atlaskit/icon/core/star-starred"));
|
|
18
20
|
var _starUnstarred = _interopRequireDefault(require("@atlaskit/icon/core/star-unstarred"));
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
22
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
23
|
var _messages = _interopRequireDefault(require("./messages"));
|
|
21
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); }
|
|
@@ -35,6 +38,31 @@ var StarIconButton = exports.StarIconButton = function StarIconButton(_ref) {
|
|
|
35
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
39
|
isHovered = _useState2[0],
|
|
37
40
|
setIsHovered = _useState2[1];
|
|
41
|
+
if ((0, _platformFeatureFlags.fg)('rovo_agent_star_icon_button')) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
43
|
+
xcss: (0, _css.cx)(!visible && styles.hidden)
|
|
44
|
+
}, /*#__PURE__*/React.createElement(_new.IconButton, {
|
|
45
|
+
appearance: "subtle",
|
|
46
|
+
spacing: "compact",
|
|
47
|
+
icon: function icon(iconProps) {
|
|
48
|
+
return isStarred || isHovered ? /*#__PURE__*/React.createElement(_starStarred.default, (0, _extends2.default)({}, iconProps, {
|
|
49
|
+
color: "var(--ds-icon-accent-orange, #E06C00)"
|
|
50
|
+
})) : /*#__PURE__*/React.createElement(_starUnstarred.default, (0, _extends2.default)({}, iconProps, {
|
|
51
|
+
color: "var(--ds-icon, #292A2E)"
|
|
52
|
+
}));
|
|
53
|
+
},
|
|
54
|
+
label: formatMessage(isStarred ? _messages.default.removeFromFavouritesLabel : _messages.default.clickToFavouriteLabel, {
|
|
55
|
+
agentName: agentName
|
|
56
|
+
}),
|
|
57
|
+
onClick: handleToggle,
|
|
58
|
+
onMouseEnter: function onMouseEnter() {
|
|
59
|
+
return setIsHovered(true);
|
|
60
|
+
},
|
|
61
|
+
onMouseLeave: function onMouseLeave() {
|
|
62
|
+
return setIsHovered(false);
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
38
66
|
return /*#__PURE__*/React.createElement(_compiled.Pressable, {
|
|
39
67
|
xcss: (0, _css.cx)(styles.pressableStarIcon, !visible && styles.hidden),
|
|
40
68
|
onClick: handleToggle,
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { useState } from 'react';
|
|
6
7
|
import { useIntl } from 'react-intl';
|
|
8
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
7
9
|
import { cx } from '@atlaskit/css';
|
|
8
10
|
import StarIconMigration from '@atlaskit/icon/core/star-starred';
|
|
9
11
|
import StarUnstarredIconMigration from '@atlaskit/icon/core/star-unstarred';
|
|
10
|
-
import {
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
11
14
|
import messages from './messages';
|
|
12
15
|
const styles = {
|
|
13
16
|
pressableStarIcon: "_bfhk1j28 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _4t3i1tcg _1bsb1tcg",
|
|
@@ -23,6 +26,25 @@ export const StarIconButton = ({
|
|
|
23
26
|
formatMessage
|
|
24
27
|
} = useIntl();
|
|
25
28
|
const [isHovered, setIsHovered] = useState(false);
|
|
29
|
+
if (fg('rovo_agent_star_icon_button')) {
|
|
30
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
31
|
+
xcss: cx(!visible && styles.hidden)
|
|
32
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
33
|
+
appearance: "subtle",
|
|
34
|
+
spacing: "compact",
|
|
35
|
+
icon: iconProps => isStarred || isHovered ? /*#__PURE__*/React.createElement(StarIconMigration, _extends({}, iconProps, {
|
|
36
|
+
color: "var(--ds-icon-accent-orange, #E06C00)"
|
|
37
|
+
})) : /*#__PURE__*/React.createElement(StarUnstarredIconMigration, _extends({}, iconProps, {
|
|
38
|
+
color: "var(--ds-icon, #292A2E)"
|
|
39
|
+
})),
|
|
40
|
+
label: formatMessage(isStarred ? messages.removeFromFavouritesLabel : messages.clickToFavouriteLabel, {
|
|
41
|
+
agentName
|
|
42
|
+
}),
|
|
43
|
+
onClick: handleToggle,
|
|
44
|
+
onMouseEnter: () => setIsHovered(true),
|
|
45
|
+
onMouseLeave: () => setIsHovered(false)
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
26
48
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
27
49
|
xcss: cx(styles.pressableStarIcon, !visible && styles.hidden),
|
|
28
50
|
onClick: handleToggle,
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
4
|
import "./index.compiled.css";
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
7
|
import { useState } from 'react';
|
|
7
8
|
import { useIntl } from 'react-intl';
|
|
9
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
8
10
|
import { cx } from '@atlaskit/css';
|
|
9
11
|
import StarIconMigration from '@atlaskit/icon/core/star-starred';
|
|
10
12
|
import StarUnstarredIconMigration from '@atlaskit/icon/core/star-unstarred';
|
|
11
|
-
import {
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import { Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
12
15
|
import messages from './messages';
|
|
13
16
|
var styles = {
|
|
14
17
|
pressableStarIcon: "_bfhk1j28 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _4t3i1tcg _1bsb1tcg",
|
|
@@ -26,6 +29,31 @@ export var StarIconButton = function StarIconButton(_ref) {
|
|
|
26
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
30
|
isHovered = _useState2[0],
|
|
28
31
|
setIsHovered = _useState2[1];
|
|
32
|
+
if (fg('rovo_agent_star_icon_button')) {
|
|
33
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
34
|
+
xcss: cx(!visible && styles.hidden)
|
|
35
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
36
|
+
appearance: "subtle",
|
|
37
|
+
spacing: "compact",
|
|
38
|
+
icon: function icon(iconProps) {
|
|
39
|
+
return isStarred || isHovered ? /*#__PURE__*/React.createElement(StarIconMigration, _extends({}, iconProps, {
|
|
40
|
+
color: "var(--ds-icon-accent-orange, #E06C00)"
|
|
41
|
+
})) : /*#__PURE__*/React.createElement(StarUnstarredIconMigration, _extends({}, iconProps, {
|
|
42
|
+
color: "var(--ds-icon, #292A2E)"
|
|
43
|
+
}));
|
|
44
|
+
},
|
|
45
|
+
label: formatMessage(isStarred ? messages.removeFromFavouritesLabel : messages.clickToFavouriteLabel, {
|
|
46
|
+
agentName: agentName
|
|
47
|
+
}),
|
|
48
|
+
onClick: handleToggle,
|
|
49
|
+
onMouseEnter: function onMouseEnter() {
|
|
50
|
+
return setIsHovered(true);
|
|
51
|
+
},
|
|
52
|
+
onMouseLeave: function onMouseLeave() {
|
|
53
|
+
return setIsHovered(false);
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
29
57
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
30
58
|
xcss: cx(styles.pressableStarIcon, !visible && styles.hidden),
|
|
31
59
|
onClick: handleToggle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
|
|
6
6
|
"atlassian": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/rovo-agent-analytics": "^5.3.0",
|
|
50
50
|
"@atlaskit/skeleton": "^4.2.0",
|
|
51
51
|
"@atlaskit/spinner": "^20.1.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^127.0.0",
|
|
53
53
|
"@atlaskit/tokens": "^16.0.0",
|
|
54
54
|
"@atlaskit/tooltip": "^23.1.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
"platform_editor_agent_mentions_drop_one_fixes": {
|
|
117
117
|
"type": "boolean"
|
|
118
118
|
},
|
|
119
|
+
"rovo_agent_star_icon_button": {
|
|
120
|
+
"type": "boolean"
|
|
121
|
+
},
|
|
119
122
|
"rovo_chat_bugfix_agent_avatar_squish": {
|
|
120
123
|
"type": "boolean"
|
|
121
124
|
},
|