@atlaskit/rovo-agent-components 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/ui/agent-avatar/index.js +6 -3
- package/dist/es2019/ui/agent-avatar/index.js +6 -3
- package/dist/esm/ui/agent-avatar/index.js +6 -3
- package/dist/types/ui/agent-avatar/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/agent-avatar/index.d.ts +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#144185](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144185)
|
|
8
|
+
[`ee1cf2e1eb652`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee1cf2e1eb652) -
|
|
9
|
+
Support custom forge avatar
|
|
10
|
+
|
|
3
11
|
## 1.4.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -48,7 +48,10 @@ var AgentAvatar = exports.AgentAvatar = function AgentAvatar(_ref) {
|
|
|
48
48
|
agentIdentityAccountId = _ref.agentIdentityAccountId,
|
|
49
49
|
agentNamedId = _ref.agentNamedId,
|
|
50
50
|
_ref$showBorder = _ref.showBorder,
|
|
51
|
-
showBorder = _ref$showBorder === void 0 ? true : _ref$showBorder
|
|
51
|
+
showBorder = _ref$showBorder === void 0 ? true : _ref$showBorder,
|
|
52
|
+
isForgeAgent = _ref.isForgeAgent,
|
|
53
|
+
forgeAgentIconUrl = _ref.forgeAgentIconUrl;
|
|
54
|
+
var imgUrl = isForgeAgent && forgeAgentIconUrl ? forgeAgentIconUrl : imageUrl;
|
|
52
55
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
53
56
|
"aria-label": label,
|
|
54
57
|
xcss: agentAvatarStyles,
|
|
@@ -64,10 +67,10 @@ var AgentAvatar = exports.AgentAvatar = function AgentAvatar(_ref) {
|
|
|
64
67
|
xcss: innerShapeStyles
|
|
65
68
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
66
69
|
xcss: avatarContentContainer
|
|
67
|
-
},
|
|
70
|
+
}, imgUrl ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
68
71
|
as: "img",
|
|
69
72
|
xcss: imageStyles,
|
|
70
|
-
src:
|
|
73
|
+
src: imgUrl,
|
|
71
74
|
alt: name
|
|
72
75
|
}) : /*#__PURE__*/_react.default.createElement(_generatedAvatars.GeneratedAvatar, {
|
|
73
76
|
agentId: agentId,
|
|
@@ -37,8 +37,11 @@ export const AgentAvatar = ({
|
|
|
37
37
|
agentId,
|
|
38
38
|
agentIdentityAccountId,
|
|
39
39
|
agentNamedId,
|
|
40
|
-
showBorder = true
|
|
40
|
+
showBorder = true,
|
|
41
|
+
isForgeAgent,
|
|
42
|
+
forgeAgentIconUrl
|
|
41
43
|
}) => {
|
|
44
|
+
const imgUrl = isForgeAgent && forgeAgentIconUrl ? forgeAgentIconUrl : imageUrl;
|
|
42
45
|
return /*#__PURE__*/React.createElement(Box, {
|
|
43
46
|
"aria-label": label,
|
|
44
47
|
xcss: agentAvatarStyles,
|
|
@@ -56,10 +59,10 @@ export const AgentAvatar = ({
|
|
|
56
59
|
xcss: innerShapeStyles
|
|
57
60
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
58
61
|
xcss: avatarContentContainer
|
|
59
|
-
},
|
|
62
|
+
}, imgUrl ? /*#__PURE__*/React.createElement(Box, {
|
|
60
63
|
as: "img",
|
|
61
64
|
xcss: imageStyles,
|
|
62
|
-
src:
|
|
65
|
+
src: imgUrl,
|
|
63
66
|
alt: name
|
|
64
67
|
}) : /*#__PURE__*/React.createElement(GeneratedAvatar, {
|
|
65
68
|
agentId: agentId,
|
|
@@ -42,7 +42,10 @@ export var AgentAvatar = function AgentAvatar(_ref) {
|
|
|
42
42
|
agentIdentityAccountId = _ref.agentIdentityAccountId,
|
|
43
43
|
agentNamedId = _ref.agentNamedId,
|
|
44
44
|
_ref$showBorder = _ref.showBorder,
|
|
45
|
-
showBorder = _ref$showBorder === void 0 ? true : _ref$showBorder
|
|
45
|
+
showBorder = _ref$showBorder === void 0 ? true : _ref$showBorder,
|
|
46
|
+
isForgeAgent = _ref.isForgeAgent,
|
|
47
|
+
forgeAgentIconUrl = _ref.forgeAgentIconUrl;
|
|
48
|
+
var imgUrl = isForgeAgent && forgeAgentIconUrl ? forgeAgentIconUrl : imageUrl;
|
|
46
49
|
return /*#__PURE__*/React.createElement(Box, {
|
|
47
50
|
"aria-label": label,
|
|
48
51
|
xcss: agentAvatarStyles,
|
|
@@ -58,10 +61,10 @@ export var AgentAvatar = function AgentAvatar(_ref) {
|
|
|
58
61
|
xcss: innerShapeStyles
|
|
59
62
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
60
63
|
xcss: avatarContentContainer
|
|
61
|
-
},
|
|
64
|
+
}, imgUrl ? /*#__PURE__*/React.createElement(Box, {
|
|
62
65
|
as: "img",
|
|
63
66
|
xcss: imageStyles,
|
|
64
|
-
src:
|
|
67
|
+
src: imgUrl,
|
|
65
68
|
alt: name
|
|
66
69
|
}) : /*#__PURE__*/React.createElement(GeneratedAvatar, {
|
|
67
70
|
agentId: agentId,
|
|
@@ -9,6 +9,8 @@ type AgentAvatarProps = {
|
|
|
9
9
|
agentIdentityAccountId?: string | null | undefined;
|
|
10
10
|
agentNamedId?: string;
|
|
11
11
|
agentId?: string;
|
|
12
|
+
isForgeAgent?: boolean;
|
|
13
|
+
forgeAgentIconUrl?: string | null;
|
|
12
14
|
};
|
|
13
|
-
export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, }: AgentAvatarProps) => JSX.Element;
|
|
15
|
+
export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, isForgeAgent, forgeAgentIconUrl, }: AgentAvatarProps) => JSX.Element;
|
|
14
16
|
export {};
|
|
@@ -9,6 +9,8 @@ type AgentAvatarProps = {
|
|
|
9
9
|
agentIdentityAccountId?: string | null | undefined;
|
|
10
10
|
agentNamedId?: string;
|
|
11
11
|
agentId?: string;
|
|
12
|
+
isForgeAgent?: boolean;
|
|
13
|
+
forgeAgentIconUrl?: string | null;
|
|
12
14
|
};
|
|
13
|
-
export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, }: AgentAvatarProps) => JSX.Element;
|
|
15
|
+
export declare const AgentAvatar: ({ imageUrl, size, label, name, agentId, agentIdentityAccountId, agentNamedId, showBorder, isForgeAgent, forgeAgentIconUrl, }: AgentAvatarProps) => JSX.Element;
|
|
14
16
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
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",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@atlaskit/button": "^20.1.0",
|
|
40
40
|
"@atlaskit/heading": "^2.4.3",
|
|
41
41
|
"@atlaskit/icon": "^22.18.0",
|
|
42
|
-
"@atlaskit/logo": "^14.
|
|
43
|
-
"@atlaskit/primitives": "^12.
|
|
42
|
+
"@atlaskit/logo": "^14.3.0",
|
|
43
|
+
"@atlaskit/primitives": "^12.2.0",
|
|
44
44
|
"@atlaskit/skeleton": "^0.5.0",
|
|
45
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
+
"@atlaskit/tokens": "^1.61.0",
|
|
46
46
|
"@atlaskit/tooltip": "^18.7.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"react-intl-next": "npm:react-intl@^5.18.1"
|