@atlaskit/rovo-agent-components 0.4.0 → 0.4.2
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 +16 -0
- package/dist/cjs/common/ui/hidden-icon/index.js +29 -0
- package/dist/cjs/common/ui/show-icon/index.js +29 -0
- package/dist/cjs/index.js +14 -0
- package/dist/cjs/ui/agent-profile-info/index.js +25 -1
- package/dist/cjs/ui/agent-profile-info/messages.js +15 -0
- package/dist/es2019/common/ui/hidden-icon/index.js +18 -0
- package/dist/es2019/common/ui/show-icon/index.js +18 -0
- package/dist/es2019/index.js +2 -0
- package/dist/es2019/ui/agent-profile-info/index.js +26 -1
- package/dist/es2019/ui/agent-profile-info/messages.js +15 -0
- package/dist/esm/common/ui/hidden-icon/index.js +22 -0
- package/dist/esm/common/ui/show-icon/index.js +22 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/ui/agent-profile-info/index.js +25 -1
- package/dist/esm/ui/agent-profile-info/messages.js +15 -0
- package/dist/types/common/ui/hidden-icon/index.d.ts +3 -0
- package/dist/types/common/ui/show-icon/index.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/ui/agent-profile-info/index.d.ts +2 -1
- package/dist/types/ui/agent-profile-info/messages.d.ts +15 -0
- package/dist/types-ts4.5/common/ui/hidden-icon/index.d.ts +3 -0
- package/dist/types-ts4.5/common/ui/show-icon/index.d.ts +3 -0
- package/dist/types-ts4.5/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/agent-profile-info/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/agent-profile-info/messages.d.ts +15 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#132411](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/132411)
|
|
8
|
+
[`097911d8bb135`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/097911d8bb135) -
|
|
9
|
+
Added hidden icon to agent profile
|
|
10
|
+
|
|
11
|
+
## 0.4.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#131878](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/131878)
|
|
16
|
+
[`053f5c138b283`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/053f5c138b283) -
|
|
17
|
+
Add hide/show buttons to agent create dropdown
|
|
18
|
+
|
|
3
19
|
## 0.4.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.HiddenIcon = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _icon = _interopRequireDefault(require("@atlaskit/icon"));
|
|
11
|
+
var CustomGlyph = function CustomGlyph(props) {
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
|
13
|
+
width: "16",
|
|
14
|
+
height: "16",
|
|
15
|
+
viewBox: "0 0 16 16",
|
|
16
|
+
fill: "none",
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18
|
+
}, props), /*#__PURE__*/_react.default.createElement("path", {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M2.75961 3.82038L0.469614 1.53039L1.53027 0.469727L15.5303 14.4697L14.4696 15.5304L11.9569 13.0177C10.7749 13.6441 9.42396 14.0001 7.99985 14.0001C4.43327 14.0001 1.31894 11.7676 0.167087 8.61989C0.0206752 8.21978 0.0206129 7.78052 0.167056 7.38031C0.683493 5.96897 1.59401 4.74336 2.75961 3.82038ZM3.82896 4.88973C2.80461 5.65938 2.01287 6.70107 1.57571 7.89577C1.5511 7.96303 1.55109 8.03706 1.57574 8.10442C2.50926 10.6555 5.05721 12.5001 7.99985 12.5001C9.00694 12.5001 9.96863 12.284 10.8358 11.8965L9.52381 10.5846C9.07723 10.8483 8.55598 11.0001 7.99994 11.0001C6.34309 11.0001 4.99994 9.65691 4.99994 8.00006C4.99994 7.44402 5.15166 6.92277 5.41542 6.47619L3.82896 4.88973ZM6.55063 7.6114C6.51755 7.7353 6.49994 7.86555 6.49994 8.00006C6.49994 8.82848 7.17152 9.50006 7.99994 9.50006C8.13445 9.50006 8.2647 9.48246 8.3886 9.44937L6.55063 7.6114ZM7.99985 3.50006C7.50971 3.50006 7.03064 3.55121 6.56817 3.64826L6.26011 2.18024C6.82282 2.06215 7.40511 2.00006 7.99985 2.00006C11.5664 2.00006 14.6809 4.23249 15.8328 7.38022C15.9792 7.78032 15.9793 8.21955 15.8328 8.61977C15.5258 9.45892 15.0793 10.2324 14.5232 10.9153L13.3601 9.96815C13.8143 9.41034 14.1762 8.78194 14.4242 8.10432C14.4488 8.03708 14.4488 7.96307 14.4242 7.8957C13.4906 5.34464 10.9425 3.50006 7.99985 3.50006Z",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
var HiddenIcon = exports.HiddenIcon = function HiddenIcon(props) {
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({
|
|
27
|
+
glyph: CustomGlyph
|
|
28
|
+
}, props));
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ShowIcon = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _icon = _interopRequireDefault(require("@atlaskit/icon"));
|
|
11
|
+
var CustomGlyph = function CustomGlyph(props) {
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
13
|
+
width: "16",
|
|
14
|
+
height: "16",
|
|
15
|
+
viewBox: "0 0 16 16",
|
|
16
|
+
fill: "none",
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M7.99996 3.5C5.05732 3.5 2.50937 5.34456 1.57585 7.89564C1.55122 7.96295 1.55122 8.03705 1.57585 8.10436C2.50937 10.6554 5.05732 12.5 7.99996 12.5C10.9426 12.5 13.4907 10.6554 14.4243 8.10436C14.4489 8.03705 14.4489 7.96295 14.4243 7.89564C13.4907 5.34458 10.9426 3.5 7.99996 3.5ZM0.167196 7.38017C1.31905 4.23246 4.43338 2 7.99996 2C11.5665 2 14.681 4.23244 15.8329 7.38017C15.9793 7.78033 15.9793 8.21967 15.8329 8.61983C14.681 11.7676 11.5665 14 7.99996 14C4.43338 14 1.31905 11.7675 0.167196 8.61983C0.0207653 8.21967 0.0207653 7.78033 0.167196 7.38017ZM8.00005 6.5C7.17163 6.5 6.50005 7.17157 6.50005 8C6.50005 8.82843 7.17163 9.5 8.00005 9.5C8.82848 9.5 9.50005 8.82843 9.50005 8C9.50005 7.17157 8.82848 6.5 8.00005 6.5ZM5.00005 8C5.00005 6.34315 6.3432 5 8.00005 5C9.65691 5 11.0001 6.34315 11.0001 8C11.0001 9.65685 9.65691 11 8.00005 11C6.3432 11 5.00005 9.65685 5.00005 8Z",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
var ShowIcon = exports.ShowIcon = function ShowIcon(props) {
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({
|
|
27
|
+
glyph: CustomGlyph
|
|
28
|
+
}, props));
|
|
29
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -57,6 +57,18 @@ Object.defineProperty(exports, "ConversationStarters", {
|
|
|
57
57
|
return _agentConversationStarters.ConversationStarters;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "HiddenIcon", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _hiddenIcon.HiddenIcon;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "ShowIcon", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _showIcon.ShowIcon;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
60
72
|
Object.defineProperty(exports, "StarIconButton", {
|
|
61
73
|
enumerable: true,
|
|
62
74
|
get: function get() {
|
|
@@ -74,5 +86,7 @@ var _starIconButton = require("./common/ui/star-icon-button");
|
|
|
74
86
|
var _agentConversationStarters = require("./ui/agent-conversation-starters");
|
|
75
87
|
var _chatPill = require("./common/ui/chat-pill");
|
|
76
88
|
var _chatIcon = require("./common/ui/chat-icon");
|
|
89
|
+
var _showIcon = require("./common/ui/show-icon");
|
|
90
|
+
var _hiddenIcon = require("./common/ui/hidden-icon");
|
|
77
91
|
var _agentAvatar = require("./ui/agent-avatar");
|
|
78
92
|
var _generatedAvatars = require("./ui/agent-avatar/generated-avatars");
|
|
@@ -12,6 +12,8 @@ var _star = _interopRequireDefault(require("@atlaskit/icon/glyph/star"));
|
|
|
12
12
|
var _logo = require("@atlaskit/logo");
|
|
13
13
|
var _primitives = require("@atlaskit/primitives");
|
|
14
14
|
var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton"));
|
|
15
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
16
|
+
var _hiddenIcon = require("../../common/ui/hidden-icon");
|
|
15
17
|
var _starIconButton = require("../../common/ui/star-icon-button");
|
|
16
18
|
var _messages = require("./messages");
|
|
17
19
|
var clickableItemStyles = (0, _primitives.xcss)({
|
|
@@ -117,13 +119,25 @@ var AgentStarCount = exports.AgentStarCount = function AgentStarCount(_ref2) {
|
|
|
117
119
|
var wrapperStyles = (0, _primitives.xcss)({
|
|
118
120
|
marginBottom: 'space.100'
|
|
119
121
|
});
|
|
122
|
+
var tooltipWrapperStyles = (0, _primitives.xcss)({
|
|
123
|
+
display: 'inline-flex',
|
|
124
|
+
marginInline: 'space.100',
|
|
125
|
+
position: 'relative',
|
|
126
|
+
bottom: 'space.025'
|
|
127
|
+
});
|
|
128
|
+
var headingWrapperStyles = (0, _primitives.xcss)({
|
|
129
|
+
position: 'relative'
|
|
130
|
+
});
|
|
120
131
|
var AgentProfileInfo = exports.AgentProfileInfo = function AgentProfileInfo(_ref3) {
|
|
121
132
|
var agentName = _ref3.agentName,
|
|
122
133
|
agentDescription = _ref3.agentDescription,
|
|
123
134
|
creatorRender = _ref3.creatorRender,
|
|
124
135
|
starCountRender = _ref3.starCountRender,
|
|
125
136
|
isStarred = _ref3.isStarred,
|
|
137
|
+
isHidden = _ref3.isHidden,
|
|
126
138
|
onStarToggle = _ref3.onStarToggle;
|
|
139
|
+
var _useIntl3 = (0, _reactIntlNext.useIntl)(),
|
|
140
|
+
formatMessage = _useIntl3.formatMessage;
|
|
127
141
|
return /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
128
142
|
space: "space.100",
|
|
129
143
|
xcss: wrapperStyles
|
|
@@ -131,9 +145,19 @@ var AgentProfileInfo = exports.AgentProfileInfo = function AgentProfileInfo(_ref
|
|
|
131
145
|
xcss: nameStyles,
|
|
132
146
|
space: "space.100",
|
|
133
147
|
alignBlock: "center"
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
149
|
+
xcss: headingWrapperStyles
|
|
134
150
|
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
151
|
+
as: "span",
|
|
135
152
|
size: "xlarge"
|
|
136
|
-
}, agentName), /*#__PURE__*/_react.default.createElement(
|
|
153
|
+
}, agentName), isHidden && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
154
|
+
xcss: tooltipWrapperStyles
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
156
|
+
content: formatMessage(_messages.messages.hiddenTooltip),
|
|
157
|
+
position: "top"
|
|
158
|
+
}, /*#__PURE__*/_react.default.createElement(_hiddenIcon.HiddenIcon, {
|
|
159
|
+
label: formatMessage(_messages.messages.hiddenIcon)
|
|
160
|
+
})))), /*#__PURE__*/_react.default.createElement(_starIconButton.StarIconButton, {
|
|
137
161
|
isStarred: isStarred,
|
|
138
162
|
handleToggle: onStarToggle
|
|
139
163
|
})), creatorRender, !!agentDescription && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
@@ -15,5 +15,20 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
15
15
|
id: 'ai-mate.agent-profile-info.starred-count',
|
|
16
16
|
defaultMessage: '{count} starred',
|
|
17
17
|
description: 'Message to show how many times this agent has been starred by users'
|
|
18
|
+
},
|
|
19
|
+
hiddenIcon: {
|
|
20
|
+
id: 'ai-mate.agent-profile-info.hidden-icon',
|
|
21
|
+
defaultMessage: 'Hidden',
|
|
22
|
+
description: 'Icon to show that this agent is hidden'
|
|
23
|
+
},
|
|
24
|
+
hiddenTooltip: {
|
|
25
|
+
id: 'ai-mate.agent-profile-info.hidden-tooltip',
|
|
26
|
+
defaultMessage: "Agent won't show in search results",
|
|
27
|
+
description: 'Tooltip to explain what strikethough eye icon means'
|
|
28
|
+
},
|
|
29
|
+
starAgentTooltip: {
|
|
30
|
+
id: 'ai-mate.agent-profile-info.star-agent-tooltip',
|
|
31
|
+
defaultMessage: 'Star Agent',
|
|
32
|
+
description: 'Tooltip to explain what star icon does'
|
|
18
33
|
}
|
|
19
34
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
const CustomGlyph = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
fillRule: "evenodd",
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M2.75961 3.82038L0.469614 1.53039L1.53027 0.469727L15.5303 14.4697L14.4696 15.5304L11.9569 13.0177C10.7749 13.6441 9.42396 14.0001 7.99985 14.0001C4.43327 14.0001 1.31894 11.7676 0.167087 8.61989C0.0206752 8.21978 0.0206129 7.78052 0.167056 7.38031C0.683493 5.96897 1.59401 4.74336 2.75961 3.82038ZM3.82896 4.88973C2.80461 5.65938 2.01287 6.70107 1.57571 7.89577C1.5511 7.96303 1.55109 8.03706 1.57574 8.10442C2.50926 10.6555 5.05721 12.5001 7.99985 12.5001C9.00694 12.5001 9.96863 12.284 10.8358 11.8965L9.52381 10.5846C9.07723 10.8483 8.55598 11.0001 7.99994 11.0001C6.34309 11.0001 4.99994 9.65691 4.99994 8.00006C4.99994 7.44402 5.15166 6.92277 5.41542 6.47619L3.82896 4.88973ZM6.55063 7.6114C6.51755 7.7353 6.49994 7.86555 6.49994 8.00006C6.49994 8.82848 7.17152 9.50006 7.99994 9.50006C8.13445 9.50006 8.2647 9.48246 8.3886 9.44937L6.55063 7.6114ZM7.99985 3.50006C7.50971 3.50006 7.03064 3.55121 6.56817 3.64826L6.26011 2.18024C6.82282 2.06215 7.40511 2.00006 7.99985 2.00006C11.5664 2.00006 14.6809 4.23249 15.8328 7.38022C15.9792 7.78032 15.9793 8.21955 15.8328 8.61977C15.5258 9.45892 15.0793 10.2324 14.5232 10.9153L13.3601 9.96815C13.8143 9.41034 14.1762 8.78194 14.4242 8.10432C14.4488 8.03708 14.4488 7.96307 14.4242 7.8957C13.4906 5.34464 10.9425 3.50006 7.99985 3.50006Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
}));
|
|
16
|
+
export const HiddenIcon = props => /*#__PURE__*/React.createElement(Icon, _extends({
|
|
17
|
+
glyph: CustomGlyph
|
|
18
|
+
}, props));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
const CustomGlyph = props => /*#__PURE__*/React.createElement("svg", {
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
fillRule: "evenodd",
|
|
12
|
+
clipRule: "evenodd",
|
|
13
|
+
d: "M7.99996 3.5C5.05732 3.5 2.50937 5.34456 1.57585 7.89564C1.55122 7.96295 1.55122 8.03705 1.57585 8.10436C2.50937 10.6554 5.05732 12.5 7.99996 12.5C10.9426 12.5 13.4907 10.6554 14.4243 8.10436C14.4489 8.03705 14.4489 7.96295 14.4243 7.89564C13.4907 5.34458 10.9426 3.5 7.99996 3.5ZM0.167196 7.38017C1.31905 4.23246 4.43338 2 7.99996 2C11.5665 2 14.681 4.23244 15.8329 7.38017C15.9793 7.78033 15.9793 8.21967 15.8329 8.61983C14.681 11.7676 11.5665 14 7.99996 14C4.43338 14 1.31905 11.7675 0.167196 8.61983C0.0207653 8.21967 0.0207653 7.78033 0.167196 7.38017ZM8.00005 6.5C7.17163 6.5 6.50005 7.17157 6.50005 8C6.50005 8.82843 7.17163 9.5 8.00005 9.5C8.82848 9.5 9.50005 8.82843 9.50005 8C9.50005 7.17157 8.82848 6.5 8.00005 6.5ZM5.00005 8C5.00005 6.34315 6.3432 5 8.00005 5C9.65691 5 11.0001 6.34315 11.0001 8C11.0001 9.65685 9.65691 11 8.00005 11C6.3432 11 5.00005 9.65685 5.00005 8Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
}));
|
|
16
|
+
export const ShowIcon = props => /*#__PURE__*/React.createElement(Icon, _extends({
|
|
17
|
+
glyph: CustomGlyph
|
|
18
|
+
}, props));
|
package/dist/es2019/index.js
CHANGED
|
@@ -3,5 +3,7 @@ export { StarIconButton } from './common/ui/star-icon-button';
|
|
|
3
3
|
export { AgentConversationStarters, ConversationStarters, getConversationStarters } from './ui/agent-conversation-starters';
|
|
4
4
|
export { ChatPill } from './common/ui/chat-pill';
|
|
5
5
|
export { ChatPillIcon } from './common/ui/chat-icon';
|
|
6
|
+
export { ShowIcon } from './common/ui/show-icon';
|
|
7
|
+
export { HiddenIcon } from './common/ui/hidden-icon';
|
|
6
8
|
export { AgentAvatar } from './ui/agent-avatar';
|
|
7
9
|
export { AgentBanner } from './ui/agent-avatar/generated-avatars';
|
|
@@ -5,6 +5,8 @@ import StarIcon from '@atlaskit/icon/glyph/star';
|
|
|
5
5
|
import { AtlassianIcon, RovoIcon } from '@atlaskit/logo';
|
|
6
6
|
import { Box, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import Skeleton from '@atlaskit/skeleton';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import { HiddenIcon } from '../../common/ui/hidden-icon';
|
|
8
10
|
import { StarIconButton } from '../../common/ui/star-icon-button';
|
|
9
11
|
import { messages } from './messages';
|
|
10
12
|
const clickableItemStyles = xcss({
|
|
@@ -112,14 +114,27 @@ export const AgentStarCount = ({
|
|
|
112
114
|
const wrapperStyles = xcss({
|
|
113
115
|
marginBottom: 'space.100'
|
|
114
116
|
});
|
|
117
|
+
const tooltipWrapperStyles = xcss({
|
|
118
|
+
display: 'inline-flex',
|
|
119
|
+
marginInline: 'space.100',
|
|
120
|
+
position: 'relative',
|
|
121
|
+
bottom: 'space.025'
|
|
122
|
+
});
|
|
123
|
+
const headingWrapperStyles = xcss({
|
|
124
|
+
position: 'relative'
|
|
125
|
+
});
|
|
115
126
|
export const AgentProfileInfo = ({
|
|
116
127
|
agentName,
|
|
117
128
|
agentDescription,
|
|
118
129
|
creatorRender,
|
|
119
130
|
starCountRender,
|
|
120
131
|
isStarred,
|
|
132
|
+
isHidden,
|
|
121
133
|
onStarToggle
|
|
122
134
|
}) => {
|
|
135
|
+
const {
|
|
136
|
+
formatMessage
|
|
137
|
+
} = useIntl();
|
|
123
138
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
124
139
|
space: "space.100",
|
|
125
140
|
xcss: wrapperStyles
|
|
@@ -127,9 +142,19 @@ export const AgentProfileInfo = ({
|
|
|
127
142
|
xcss: nameStyles,
|
|
128
143
|
space: "space.100",
|
|
129
144
|
alignBlock: "center"
|
|
145
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
146
|
+
xcss: headingWrapperStyles
|
|
130
147
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
148
|
+
as: "span",
|
|
131
149
|
size: "xlarge"
|
|
132
|
-
}, agentName), /*#__PURE__*/React.createElement(
|
|
150
|
+
}, agentName), isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
151
|
+
xcss: tooltipWrapperStyles
|
|
152
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
153
|
+
content: formatMessage(messages.hiddenTooltip),
|
|
154
|
+
position: "top"
|
|
155
|
+
}, /*#__PURE__*/React.createElement(HiddenIcon, {
|
|
156
|
+
label: formatMessage(messages.hiddenIcon)
|
|
157
|
+
})))), /*#__PURE__*/React.createElement(StarIconButton, {
|
|
133
158
|
isStarred: isStarred,
|
|
134
159
|
handleToggle: onStarToggle
|
|
135
160
|
})), creatorRender, !!agentDescription && /*#__PURE__*/React.createElement(Box, {
|
|
@@ -9,5 +9,20 @@ export const messages = defineMessages({
|
|
|
9
9
|
id: 'ai-mate.agent-profile-info.starred-count',
|
|
10
10
|
defaultMessage: '{count} starred',
|
|
11
11
|
description: 'Message to show how many times this agent has been starred by users'
|
|
12
|
+
},
|
|
13
|
+
hiddenIcon: {
|
|
14
|
+
id: 'ai-mate.agent-profile-info.hidden-icon',
|
|
15
|
+
defaultMessage: 'Hidden',
|
|
16
|
+
description: 'Icon to show that this agent is hidden'
|
|
17
|
+
},
|
|
18
|
+
hiddenTooltip: {
|
|
19
|
+
id: 'ai-mate.agent-profile-info.hidden-tooltip',
|
|
20
|
+
defaultMessage: "Agent won't show in search results",
|
|
21
|
+
description: 'Tooltip to explain what strikethough eye icon means'
|
|
22
|
+
},
|
|
23
|
+
starAgentTooltip: {
|
|
24
|
+
id: 'ai-mate.agent-profile-info.star-agent-tooltip',
|
|
25
|
+
defaultMessage: 'Star Agent',
|
|
26
|
+
description: 'Tooltip to explain what star icon does'
|
|
12
27
|
}
|
|
13
28
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
var CustomGlyph = function CustomGlyph(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
|
+
width: "16",
|
|
7
|
+
height: "16",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
clipRule: "evenodd",
|
|
14
|
+
d: "M2.75961 3.82038L0.469614 1.53039L1.53027 0.469727L15.5303 14.4697L14.4696 15.5304L11.9569 13.0177C10.7749 13.6441 9.42396 14.0001 7.99985 14.0001C4.43327 14.0001 1.31894 11.7676 0.167087 8.61989C0.0206752 8.21978 0.0206129 7.78052 0.167056 7.38031C0.683493 5.96897 1.59401 4.74336 2.75961 3.82038ZM3.82896 4.88973C2.80461 5.65938 2.01287 6.70107 1.57571 7.89577C1.5511 7.96303 1.55109 8.03706 1.57574 8.10442C2.50926 10.6555 5.05721 12.5001 7.99985 12.5001C9.00694 12.5001 9.96863 12.284 10.8358 11.8965L9.52381 10.5846C9.07723 10.8483 8.55598 11.0001 7.99994 11.0001C6.34309 11.0001 4.99994 9.65691 4.99994 8.00006C4.99994 7.44402 5.15166 6.92277 5.41542 6.47619L3.82896 4.88973ZM6.55063 7.6114C6.51755 7.7353 6.49994 7.86555 6.49994 8.00006C6.49994 8.82848 7.17152 9.50006 7.99994 9.50006C8.13445 9.50006 8.2647 9.48246 8.3886 9.44937L6.55063 7.6114ZM7.99985 3.50006C7.50971 3.50006 7.03064 3.55121 6.56817 3.64826L6.26011 2.18024C6.82282 2.06215 7.40511 2.00006 7.99985 2.00006C11.5664 2.00006 14.6809 4.23249 15.8328 7.38022C15.9792 7.78032 15.9793 8.21955 15.8328 8.61977C15.5258 9.45892 15.0793 10.2324 14.5232 10.9153L13.3601 9.96815C13.8143 9.41034 14.1762 8.78194 14.4242 8.10432C14.4488 8.03708 14.4488 7.96307 14.4242 7.8957C13.4906 5.34464 10.9425 3.50006 7.99985 3.50006Z",
|
|
15
|
+
fill: "currentColor"
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
export var HiddenIcon = function HiddenIcon(props) {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
20
|
+
glyph: CustomGlyph
|
|
21
|
+
}, props));
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
var CustomGlyph = function CustomGlyph(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
width: "16",
|
|
7
|
+
height: "16",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
clipRule: "evenodd",
|
|
14
|
+
d: "M7.99996 3.5C5.05732 3.5 2.50937 5.34456 1.57585 7.89564C1.55122 7.96295 1.55122 8.03705 1.57585 8.10436C2.50937 10.6554 5.05732 12.5 7.99996 12.5C10.9426 12.5 13.4907 10.6554 14.4243 8.10436C14.4489 8.03705 14.4489 7.96295 14.4243 7.89564C13.4907 5.34458 10.9426 3.5 7.99996 3.5ZM0.167196 7.38017C1.31905 4.23246 4.43338 2 7.99996 2C11.5665 2 14.681 4.23244 15.8329 7.38017C15.9793 7.78033 15.9793 8.21967 15.8329 8.61983C14.681 11.7676 11.5665 14 7.99996 14C4.43338 14 1.31905 11.7675 0.167196 8.61983C0.0207653 8.21967 0.0207653 7.78033 0.167196 7.38017ZM8.00005 6.5C7.17163 6.5 6.50005 7.17157 6.50005 8C6.50005 8.82843 7.17163 9.5 8.00005 9.5C8.82848 9.5 9.50005 8.82843 9.50005 8C9.50005 7.17157 8.82848 6.5 8.00005 6.5ZM5.00005 8C5.00005 6.34315 6.3432 5 8.00005 5C9.65691 5 11.0001 6.34315 11.0001 8C11.0001 9.65685 9.65691 11 8.00005 11C6.3432 11 5.00005 9.65685 5.00005 8Z",
|
|
15
|
+
fill: "currentColor"
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
export var ShowIcon = function ShowIcon(props) {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
20
|
+
glyph: CustomGlyph
|
|
21
|
+
}, props));
|
|
22
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -3,5 +3,7 @@ export { StarIconButton } from './common/ui/star-icon-button';
|
|
|
3
3
|
export { AgentConversationStarters, ConversationStarters, getConversationStarters } from './ui/agent-conversation-starters';
|
|
4
4
|
export { ChatPill } from './common/ui/chat-pill';
|
|
5
5
|
export { ChatPillIcon } from './common/ui/chat-icon';
|
|
6
|
+
export { ShowIcon } from './common/ui/show-icon';
|
|
7
|
+
export { HiddenIcon } from './common/ui/hidden-icon';
|
|
6
8
|
export { AgentAvatar } from './ui/agent-avatar';
|
|
7
9
|
export { AgentBanner } from './ui/agent-avatar/generated-avatars';
|
|
@@ -5,6 +5,8 @@ import StarIcon from '@atlaskit/icon/glyph/star';
|
|
|
5
5
|
import { AtlassianIcon, RovoIcon } from '@atlaskit/logo';
|
|
6
6
|
import { Box, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import Skeleton from '@atlaskit/skeleton';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import { HiddenIcon } from '../../common/ui/hidden-icon';
|
|
8
10
|
import { StarIconButton } from '../../common/ui/star-icon-button';
|
|
9
11
|
import { messages } from './messages';
|
|
10
12
|
var clickableItemStyles = xcss({
|
|
@@ -110,13 +112,25 @@ export var AgentStarCount = function AgentStarCount(_ref2) {
|
|
|
110
112
|
var wrapperStyles = xcss({
|
|
111
113
|
marginBottom: 'space.100'
|
|
112
114
|
});
|
|
115
|
+
var tooltipWrapperStyles = xcss({
|
|
116
|
+
display: 'inline-flex',
|
|
117
|
+
marginInline: 'space.100',
|
|
118
|
+
position: 'relative',
|
|
119
|
+
bottom: 'space.025'
|
|
120
|
+
});
|
|
121
|
+
var headingWrapperStyles = xcss({
|
|
122
|
+
position: 'relative'
|
|
123
|
+
});
|
|
113
124
|
export var AgentProfileInfo = function AgentProfileInfo(_ref3) {
|
|
114
125
|
var agentName = _ref3.agentName,
|
|
115
126
|
agentDescription = _ref3.agentDescription,
|
|
116
127
|
creatorRender = _ref3.creatorRender,
|
|
117
128
|
starCountRender = _ref3.starCountRender,
|
|
118
129
|
isStarred = _ref3.isStarred,
|
|
130
|
+
isHidden = _ref3.isHidden,
|
|
119
131
|
onStarToggle = _ref3.onStarToggle;
|
|
132
|
+
var _useIntl3 = useIntl(),
|
|
133
|
+
formatMessage = _useIntl3.formatMessage;
|
|
120
134
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
121
135
|
space: "space.100",
|
|
122
136
|
xcss: wrapperStyles
|
|
@@ -124,9 +138,19 @@ export var AgentProfileInfo = function AgentProfileInfo(_ref3) {
|
|
|
124
138
|
xcss: nameStyles,
|
|
125
139
|
space: "space.100",
|
|
126
140
|
alignBlock: "center"
|
|
141
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
142
|
+
xcss: headingWrapperStyles
|
|
127
143
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
144
|
+
as: "span",
|
|
128
145
|
size: "xlarge"
|
|
129
|
-
}, agentName), /*#__PURE__*/React.createElement(
|
|
146
|
+
}, agentName), isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
147
|
+
xcss: tooltipWrapperStyles
|
|
148
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
149
|
+
content: formatMessage(messages.hiddenTooltip),
|
|
150
|
+
position: "top"
|
|
151
|
+
}, /*#__PURE__*/React.createElement(HiddenIcon, {
|
|
152
|
+
label: formatMessage(messages.hiddenIcon)
|
|
153
|
+
})))), /*#__PURE__*/React.createElement(StarIconButton, {
|
|
130
154
|
isStarred: isStarred,
|
|
131
155
|
handleToggle: onStarToggle
|
|
132
156
|
})), creatorRender, !!agentDescription && /*#__PURE__*/React.createElement(Box, {
|
|
@@ -9,5 +9,20 @@ export var messages = defineMessages({
|
|
|
9
9
|
id: 'ai-mate.agent-profile-info.starred-count',
|
|
10
10
|
defaultMessage: '{count} starred',
|
|
11
11
|
description: 'Message to show how many times this agent has been starred by users'
|
|
12
|
+
},
|
|
13
|
+
hiddenIcon: {
|
|
14
|
+
id: 'ai-mate.agent-profile-info.hidden-icon',
|
|
15
|
+
defaultMessage: 'Hidden',
|
|
16
|
+
description: 'Icon to show that this agent is hidden'
|
|
17
|
+
},
|
|
18
|
+
hiddenTooltip: {
|
|
19
|
+
id: 'ai-mate.agent-profile-info.hidden-tooltip',
|
|
20
|
+
defaultMessage: "Agent won't show in search results",
|
|
21
|
+
description: 'Tooltip to explain what strikethough eye icon means'
|
|
22
|
+
},
|
|
23
|
+
starAgentTooltip: {
|
|
24
|
+
id: 'ai-mate.agent-profile-info.star-agent-tooltip',
|
|
25
|
+
defaultMessage: 'Star Agent',
|
|
26
|
+
description: 'Tooltip to explain what star icon does'
|
|
12
27
|
}
|
|
13
28
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,5 +3,7 @@ export { StarIconButton } from './common/ui/star-icon-button';
|
|
|
3
3
|
export { AgentConversationStarters, ConversationStarters, type AgentConversationStartersProps, getConversationStarters, } from './ui/agent-conversation-starters';
|
|
4
4
|
export { ChatPill, type ChatPillProps } from './common/ui/chat-pill';
|
|
5
5
|
export { ChatPillIcon } from './common/ui/chat-icon';
|
|
6
|
+
export { ShowIcon } from './common/ui/show-icon';
|
|
7
|
+
export { HiddenIcon } from './common/ui/hidden-icon';
|
|
6
8
|
export { AgentAvatar } from './ui/agent-avatar';
|
|
7
9
|
export { AgentBanner } from './ui/agent-avatar/generated-avatars';
|
|
@@ -17,11 +17,12 @@ export declare const AgentStarCount: ({ starCount, isLoading, }: {
|
|
|
17
17
|
starCount: number | null | undefined;
|
|
18
18
|
isLoading: boolean;
|
|
19
19
|
}) => JSX.Element | null;
|
|
20
|
-
export declare const AgentProfileInfo: ({ agentName, agentDescription, creatorRender, starCountRender, isStarred, onStarToggle, }: {
|
|
20
|
+
export declare const AgentProfileInfo: ({ agentName, agentDescription, creatorRender, starCountRender, isStarred, isHidden, onStarToggle, }: {
|
|
21
21
|
agentName: string;
|
|
22
22
|
agentDescription?: string | null | undefined;
|
|
23
23
|
creatorRender: React.ReactNode;
|
|
24
24
|
starCountRender: React.ReactNode;
|
|
25
25
|
isStarred: boolean;
|
|
26
|
+
isHidden: boolean;
|
|
26
27
|
onStarToggle: () => void;
|
|
27
28
|
}) => JSX.Element;
|
|
@@ -9,4 +9,19 @@ export declare const messages: {
|
|
|
9
9
|
defaultMessage: string;
|
|
10
10
|
description: string;
|
|
11
11
|
};
|
|
12
|
+
hiddenIcon: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
hiddenTooltip: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
starAgentTooltip: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
12
27
|
};
|
|
@@ -3,5 +3,7 @@ export { StarIconButton } from './common/ui/star-icon-button';
|
|
|
3
3
|
export { AgentConversationStarters, ConversationStarters, type AgentConversationStartersProps, getConversationStarters, } from './ui/agent-conversation-starters';
|
|
4
4
|
export { ChatPill, type ChatPillProps } from './common/ui/chat-pill';
|
|
5
5
|
export { ChatPillIcon } from './common/ui/chat-icon';
|
|
6
|
+
export { ShowIcon } from './common/ui/show-icon';
|
|
7
|
+
export { HiddenIcon } from './common/ui/hidden-icon';
|
|
6
8
|
export { AgentAvatar } from './ui/agent-avatar';
|
|
7
9
|
export { AgentBanner } from './ui/agent-avatar/generated-avatars';
|
|
@@ -17,11 +17,12 @@ export declare const AgentStarCount: ({ starCount, isLoading, }: {
|
|
|
17
17
|
starCount: number | null | undefined;
|
|
18
18
|
isLoading: boolean;
|
|
19
19
|
}) => JSX.Element | null;
|
|
20
|
-
export declare const AgentProfileInfo: ({ agentName, agentDescription, creatorRender, starCountRender, isStarred, onStarToggle, }: {
|
|
20
|
+
export declare const AgentProfileInfo: ({ agentName, agentDescription, creatorRender, starCountRender, isStarred, isHidden, onStarToggle, }: {
|
|
21
21
|
agentName: string;
|
|
22
22
|
agentDescription?: string | null | undefined;
|
|
23
23
|
creatorRender: React.ReactNode;
|
|
24
24
|
starCountRender: React.ReactNode;
|
|
25
25
|
isStarred: boolean;
|
|
26
|
+
isHidden: boolean;
|
|
26
27
|
onStarToggle: () => void;
|
|
27
28
|
}) => JSX.Element;
|
|
@@ -9,4 +9,19 @@ export declare const messages: {
|
|
|
9
9
|
defaultMessage: string;
|
|
10
10
|
description: string;
|
|
11
11
|
};
|
|
12
|
+
hiddenIcon: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
hiddenTooltip: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
starAgentTooltip: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
12
27
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/avatar": "^21.15.0",
|
|
40
|
-
"@atlaskit/button": "^20.
|
|
40
|
+
"@atlaskit/button": "^20.1.0",
|
|
41
41
|
"@atlaskit/heading": "^2.4.3",
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
42
|
+
"@atlaskit/icon": "^22.14.0",
|
|
43
43
|
"@atlaskit/logo": "^14.2.0",
|
|
44
44
|
"@atlaskit/primitives": "^12.0.0",
|
|
45
45
|
"@atlaskit/skeleton": "^0.5.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.59.0",
|
|
47
|
+
"@atlaskit/tooltip": "^18.7.0",
|
|
47
48
|
"@babel/runtime": "^7.0.0",
|
|
48
49
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
49
50
|
},
|