@atlaskit/rovo-agent-components 2.9.1 → 2.11.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 +20 -0
- package/dist/cjs/ui/agent-conversation-starters/index.compiled.css +5 -0
- package/dist/cjs/ui/agent-conversation-starters/index.js +26 -10
- package/dist/cjs/ui/agent-profile-info/index.js +17 -4
- package/dist/es2019/ui/agent-conversation-starters/index.compiled.css +5 -0
- package/dist/es2019/ui/agent-conversation-starters/index.js +23 -7
- package/dist/es2019/ui/agent-profile-info/index.js +15 -4
- package/dist/esm/ui/agent-conversation-starters/index.compiled.css +5 -0
- package/dist/esm/ui/agent-conversation-starters/index.js +23 -7
- package/dist/esm/ui/agent-profile-info/index.js +17 -4
- package/dist/types/common/ui/chat-icon/index.d.ts +2 -2
- package/dist/types/common/ui/hidden-icon/index.d.ts +2 -2
- package/dist/types/common/ui/show-icon/index.d.ts +2 -2
- package/dist/types/ui/agent-conversation-starters/index.d.ts +7 -3
- package/dist/types-ts4.5/common/ui/chat-icon/index.d.ts +2 -2
- package/dist/types-ts4.5/common/ui/hidden-icon/index.d.ts +2 -2
- package/dist/types-ts4.5/common/ui/show-icon/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/agent-conversation-starters/index.d.ts +7 -3
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/rovo-agent-components
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#154751](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/154751)
|
|
8
|
+
[`f5a3bbc2a8649`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5a3bbc2a8649) -
|
|
9
|
+
Fix A11Y-16540, A11Y-16500, A11Y-16543, A11Y-16545, A11Y-16592, A11Y-17302, A11Y-17303, A11Y-16603
|
|
10
|
+
|
|
11
|
+
## 2.10.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#149822](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149822)
|
|
16
|
+
[`f9ab0e846ae21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f9ab0e846ae21) -
|
|
17
|
+
Updated to support `size` prop for new icons from `@atlaskit/icon`.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 2.9.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,19 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.getConversationStarters = exports.ConversationStarters = exports.AgentConversationStarters = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
17
|
var _reactIntlNext = require("react-intl-next");
|
|
14
18
|
var _new = require("@atlaskit/button/new");
|
|
15
19
|
var _retry = _interopRequireDefault(require("@atlaskit/icon/core/retry"));
|
|
16
|
-
var
|
|
20
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
21
|
var _chatPill = require("../../common/ui/chat-pill");
|
|
18
22
|
var _messages = require("./messages");
|
|
19
23
|
var _excluded = ["userDefinedConversationStarters", "isAgentDefault"];
|
|
20
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
+
var styles = {
|
|
27
|
+
conversationStartersList: "_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf"
|
|
28
|
+
};
|
|
22
29
|
var getConversationStarters = exports.getConversationStarters = function getConversationStarters(_ref) {
|
|
23
30
|
var userDefinedConversationStartersParam = _ref.userDefinedConversationStarters,
|
|
24
31
|
isAgentDefault = _ref.isAgentDefault;
|
|
@@ -83,7 +90,7 @@ var AgentConversationStarters = exports.AgentConversationStarters = function Age
|
|
|
83
90
|
};
|
|
84
91
|
});
|
|
85
92
|
}, [combinedConversationStarters, formatMessage]);
|
|
86
|
-
return /*#__PURE__*/
|
|
93
|
+
return /*#__PURE__*/React.createElement(ConversationStarters, (0, _extends2.default)({
|
|
87
94
|
starters: starters
|
|
88
95
|
}, props));
|
|
89
96
|
};
|
|
@@ -95,27 +102,36 @@ var ConversationStarters = exports.ConversationStarters = function ConversationS
|
|
|
95
102
|
_ref3$onReloadButtonC = _ref3.onReloadButtonClick,
|
|
96
103
|
onReloadButtonClick = _ref3$onReloadButtonC === void 0 ? function () {} : _ref3$onReloadButtonC,
|
|
97
104
|
onBrowseAgentsClick = _ref3.onBrowseAgentsClick;
|
|
98
|
-
return /*#__PURE__*/
|
|
105
|
+
return /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
106
|
+
as: "ul",
|
|
107
|
+
space: "space.050",
|
|
108
|
+
xcss: styles.conversationStartersList
|
|
109
|
+
}, starters.map(function (starter, index) {
|
|
99
110
|
var isLastStarter = index === starters.length - 1;
|
|
100
|
-
var chatPill = /*#__PURE__*/
|
|
111
|
+
var chatPill = /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
112
|
+
as: "li",
|
|
113
|
+
key: starter.message
|
|
114
|
+
}, /*#__PURE__*/React.createElement(_chatPill.ChatPill, {
|
|
101
115
|
testId: "conversation-starter",
|
|
102
116
|
key: starter.message,
|
|
103
117
|
onClick: function onClick() {
|
|
104
118
|
return onConversationStarterClick(starter);
|
|
105
119
|
}
|
|
106
|
-
}, starter.message);
|
|
107
|
-
return isLastStarter && showReloadButton ? /*#__PURE__*/
|
|
120
|
+
}, starter.message));
|
|
121
|
+
return isLastStarter && showReloadButton ? /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
108
122
|
space: "space.050",
|
|
109
123
|
grow: "fill",
|
|
110
124
|
alignInline: "end",
|
|
111
125
|
key: starter.message
|
|
112
|
-
}, chatPill, /*#__PURE__*/
|
|
126
|
+
}, chatPill, /*#__PURE__*/React.createElement(_new.IconButton, {
|
|
113
127
|
icon: _retry.default,
|
|
114
128
|
onClick: onReloadButtonClick,
|
|
115
129
|
appearance: "subtle",
|
|
116
130
|
label: ""
|
|
117
131
|
})) : chatPill;
|
|
118
|
-
}), !!onBrowseAgentsClick && /*#__PURE__*/
|
|
132
|
+
}), !!onBrowseAgentsClick && /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
133
|
+
as: "li"
|
|
134
|
+
}, /*#__PURE__*/React.createElement(_chatPill.BrowseAgentsPill, {
|
|
119
135
|
onClick: onBrowseAgentsClick
|
|
120
|
-
}));
|
|
136
|
+
})));
|
|
121
137
|
};
|
|
@@ -11,7 +11,9 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
14
|
+
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
14
15
|
var _logo = require("@atlaskit/logo");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
18
|
var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton"));
|
|
17
19
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -60,7 +62,17 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
|
|
|
60
62
|
}
|
|
61
63
|
if (creator.type === 'CUSTOMER') {
|
|
62
64
|
return formatMessage(_messages.messages.agentCreatedBy, {
|
|
63
|
-
creatorNameWithLink: /*#__PURE__*/_react.default.createElement(
|
|
65
|
+
creatorNameWithLink: (0, _platformFeatureFlags.fg)('dst-a11y__replace-anchor-with-link__ai-mate') ? /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
66
|
+
"aria-label": creator.name || formatMessage(_messages.messages.creatorLabel),
|
|
67
|
+
href: creator.profileLink,
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
return onCreatorLinkClick();
|
|
70
|
+
},
|
|
71
|
+
target: "_blank"
|
|
72
|
+
}, creator.name, ' ', creator.status === 'inactive' && formatMessage(_messages.messages.agentDeactivated)) :
|
|
73
|
+
/*#__PURE__*/
|
|
74
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
75
|
+
_react.default.createElement("a", {
|
|
64
76
|
"aria-label": creator.name || formatMessage(_messages.messages.creatorLabel),
|
|
65
77
|
href: creator.profileLink,
|
|
66
78
|
onClick: function onClick() {
|
|
@@ -102,10 +114,11 @@ var AgentProfileInfo = exports.AgentProfileInfo = function AgentProfileInfo(_ref
|
|
|
102
114
|
xcss: styles.name,
|
|
103
115
|
space: "space.100",
|
|
104
116
|
alignBlock: "center"
|
|
105
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.
|
|
106
|
-
xcss: styles.headingWrapper
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
118
|
+
xcss: styles.headingWrapper,
|
|
119
|
+
alignBlock: "end"
|
|
107
120
|
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
108
|
-
as: "
|
|
121
|
+
as: "h2",
|
|
109
122
|
size: "xlarge"
|
|
110
123
|
}, agentName), isHidden && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
111
124
|
xcss: styles.tooltipWrapper
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useMemo } from 'react';
|
|
3
7
|
import { useIntl } from 'react-intl-next';
|
|
4
8
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
9
|
import RetryIcon from '@atlaskit/icon/core/retry';
|
|
6
|
-
import { Inline } from '@atlaskit/primitives';
|
|
10
|
+
import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
7
11
|
import { BrowseAgentsPill, ChatPill } from '../../common/ui/chat-pill';
|
|
8
12
|
import { messages } from './messages';
|
|
13
|
+
const styles = {
|
|
14
|
+
conversationStartersList: "_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf"
|
|
15
|
+
};
|
|
9
16
|
export const getConversationStarters = ({
|
|
10
17
|
userDefinedConversationStarters: userDefinedConversationStartersParam,
|
|
11
18
|
isAgentDefault
|
|
@@ -79,13 +86,20 @@ export const ConversationStarters = ({
|
|
|
79
86
|
onReloadButtonClick = () => {},
|
|
80
87
|
onBrowseAgentsClick
|
|
81
88
|
}) => {
|
|
82
|
-
return /*#__PURE__*/React.createElement(
|
|
89
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
90
|
+
as: "ul",
|
|
91
|
+
space: "space.050",
|
|
92
|
+
xcss: styles.conversationStartersList
|
|
93
|
+
}, starters.map((starter, index) => {
|
|
83
94
|
const isLastStarter = index === starters.length - 1;
|
|
84
|
-
const chatPill = /*#__PURE__*/React.createElement(
|
|
95
|
+
const chatPill = /*#__PURE__*/React.createElement(Box, {
|
|
96
|
+
as: "li",
|
|
97
|
+
key: starter.message
|
|
98
|
+
}, /*#__PURE__*/React.createElement(ChatPill, {
|
|
85
99
|
testId: "conversation-starter",
|
|
86
100
|
key: starter.message,
|
|
87
101
|
onClick: () => onConversationStarterClick(starter)
|
|
88
|
-
}, starter.message);
|
|
102
|
+
}, starter.message));
|
|
89
103
|
return isLastStarter && showReloadButton ? /*#__PURE__*/React.createElement(Inline, {
|
|
90
104
|
space: "space.050",
|
|
91
105
|
grow: "fill",
|
|
@@ -97,7 +111,9 @@ export const ConversationStarters = ({
|
|
|
97
111
|
appearance: "subtle",
|
|
98
112
|
label: ""
|
|
99
113
|
})) : chatPill;
|
|
100
|
-
}), !!onBrowseAgentsClick && /*#__PURE__*/React.createElement(
|
|
114
|
+
}), !!onBrowseAgentsClick && /*#__PURE__*/React.createElement(Box, {
|
|
115
|
+
as: "li"
|
|
116
|
+
}, /*#__PURE__*/React.createElement(BrowseAgentsPill, {
|
|
101
117
|
onClick: onBrowseAgentsClick
|
|
102
|
-
}));
|
|
118
|
+
})));
|
|
103
119
|
};
|
|
@@ -4,7 +4,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import Heading from '@atlaskit/heading';
|
|
7
|
+
import Link from '@atlaskit/link';
|
|
7
8
|
import { AtlassianIcon, RovoIcon } from '@atlaskit/logo';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
9
11
|
import Skeleton from '@atlaskit/skeleton';
|
|
10
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -55,7 +57,15 @@ export const AgentProfileCreator = ({
|
|
|
55
57
|
}
|
|
56
58
|
if (creator.type === 'CUSTOMER') {
|
|
57
59
|
return formatMessage(messages.agentCreatedBy, {
|
|
58
|
-
creatorNameWithLink: /*#__PURE__*/React.createElement(
|
|
60
|
+
creatorNameWithLink: fg('dst-a11y__replace-anchor-with-link__ai-mate') ? /*#__PURE__*/React.createElement(Link, {
|
|
61
|
+
"aria-label": creator.name || formatMessage(messages.creatorLabel),
|
|
62
|
+
href: creator.profileLink,
|
|
63
|
+
onClick: () => onCreatorLinkClick(),
|
|
64
|
+
target: "_blank"
|
|
65
|
+
}, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated)) :
|
|
66
|
+
/*#__PURE__*/
|
|
67
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
68
|
+
React.createElement("a", {
|
|
59
69
|
"aria-label": creator.name || formatMessage(messages.creatorLabel),
|
|
60
70
|
href: creator.profileLink,
|
|
61
71
|
onClick: () => onCreatorLinkClick(),
|
|
@@ -97,10 +107,11 @@ export const AgentProfileInfo = ({
|
|
|
97
107
|
xcss: styles.name,
|
|
98
108
|
space: "space.100",
|
|
99
109
|
alignBlock: "center"
|
|
100
|
-
}, /*#__PURE__*/React.createElement(
|
|
101
|
-
xcss: styles.headingWrapper
|
|
110
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
111
|
+
xcss: styles.headingWrapper,
|
|
112
|
+
alignBlock: "end"
|
|
102
113
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
103
|
-
as: "
|
|
114
|
+
as: "h2",
|
|
104
115
|
size: "xlarge"
|
|
105
116
|
}, agentName), isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
106
117
|
xcss: styles.tooltipWrapper
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
5
|
var _excluded = ["userDefinedConversationStarters", "isAgentDefault"];
|
|
5
|
-
import
|
|
6
|
+
import "./index.compiled.css";
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
9
|
+
import { useMemo } from 'react';
|
|
6
10
|
import { useIntl } from 'react-intl-next';
|
|
7
11
|
import { IconButton } from '@atlaskit/button/new';
|
|
8
12
|
import RetryIcon from '@atlaskit/icon/core/retry';
|
|
9
|
-
import { Inline } from '@atlaskit/primitives';
|
|
13
|
+
import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
10
14
|
import { BrowseAgentsPill, ChatPill } from '../../common/ui/chat-pill';
|
|
11
15
|
import { messages } from './messages';
|
|
16
|
+
var styles = {
|
|
17
|
+
conversationStartersList: "_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf"
|
|
18
|
+
};
|
|
12
19
|
export var getConversationStarters = function getConversationStarters(_ref) {
|
|
13
20
|
var userDefinedConversationStartersParam = _ref.userDefinedConversationStarters,
|
|
14
21
|
isAgentDefault = _ref.isAgentDefault;
|
|
@@ -85,15 +92,22 @@ export var ConversationStarters = function ConversationStarters(_ref3) {
|
|
|
85
92
|
_ref3$onReloadButtonC = _ref3.onReloadButtonClick,
|
|
86
93
|
onReloadButtonClick = _ref3$onReloadButtonC === void 0 ? function () {} : _ref3$onReloadButtonC,
|
|
87
94
|
onBrowseAgentsClick = _ref3.onBrowseAgentsClick;
|
|
88
|
-
return /*#__PURE__*/React.createElement(
|
|
95
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
96
|
+
as: "ul",
|
|
97
|
+
space: "space.050",
|
|
98
|
+
xcss: styles.conversationStartersList
|
|
99
|
+
}, starters.map(function (starter, index) {
|
|
89
100
|
var isLastStarter = index === starters.length - 1;
|
|
90
|
-
var chatPill = /*#__PURE__*/React.createElement(
|
|
101
|
+
var chatPill = /*#__PURE__*/React.createElement(Box, {
|
|
102
|
+
as: "li",
|
|
103
|
+
key: starter.message
|
|
104
|
+
}, /*#__PURE__*/React.createElement(ChatPill, {
|
|
91
105
|
testId: "conversation-starter",
|
|
92
106
|
key: starter.message,
|
|
93
107
|
onClick: function onClick() {
|
|
94
108
|
return onConversationStarterClick(starter);
|
|
95
109
|
}
|
|
96
|
-
}, starter.message);
|
|
110
|
+
}, starter.message));
|
|
97
111
|
return isLastStarter && showReloadButton ? /*#__PURE__*/React.createElement(Inline, {
|
|
98
112
|
space: "space.050",
|
|
99
113
|
grow: "fill",
|
|
@@ -105,7 +119,9 @@ export var ConversationStarters = function ConversationStarters(_ref3) {
|
|
|
105
119
|
appearance: "subtle",
|
|
106
120
|
label: ""
|
|
107
121
|
})) : chatPill;
|
|
108
|
-
}), !!onBrowseAgentsClick && /*#__PURE__*/React.createElement(
|
|
122
|
+
}), !!onBrowseAgentsClick && /*#__PURE__*/React.createElement(Box, {
|
|
123
|
+
as: "li"
|
|
124
|
+
}, /*#__PURE__*/React.createElement(BrowseAgentsPill, {
|
|
109
125
|
onClick: onBrowseAgentsClick
|
|
110
|
-
}));
|
|
126
|
+
})));
|
|
111
127
|
};
|
|
@@ -4,7 +4,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import Heading from '@atlaskit/heading';
|
|
7
|
+
import Link from '@atlaskit/link';
|
|
7
8
|
import { AtlassianIcon, RovoIcon } from '@atlaskit/logo';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
|
|
9
11
|
import Skeleton from '@atlaskit/skeleton';
|
|
10
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -53,7 +55,17 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref) {
|
|
|
53
55
|
}
|
|
54
56
|
if (creator.type === 'CUSTOMER') {
|
|
55
57
|
return formatMessage(messages.agentCreatedBy, {
|
|
56
|
-
creatorNameWithLink: /*#__PURE__*/React.createElement(
|
|
58
|
+
creatorNameWithLink: fg('dst-a11y__replace-anchor-with-link__ai-mate') ? /*#__PURE__*/React.createElement(Link, {
|
|
59
|
+
"aria-label": creator.name || formatMessage(messages.creatorLabel),
|
|
60
|
+
href: creator.profileLink,
|
|
61
|
+
onClick: function onClick() {
|
|
62
|
+
return onCreatorLinkClick();
|
|
63
|
+
},
|
|
64
|
+
target: "_blank"
|
|
65
|
+
}, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated)) :
|
|
66
|
+
/*#__PURE__*/
|
|
67
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
68
|
+
React.createElement("a", {
|
|
57
69
|
"aria-label": creator.name || formatMessage(messages.creatorLabel),
|
|
58
70
|
href: creator.profileLink,
|
|
59
71
|
onClick: function onClick() {
|
|
@@ -95,10 +107,11 @@ export var AgentProfileInfo = function AgentProfileInfo(_ref2) {
|
|
|
95
107
|
xcss: styles.name,
|
|
96
108
|
space: "space.100",
|
|
97
109
|
alignBlock: "center"
|
|
98
|
-
}, /*#__PURE__*/React.createElement(
|
|
99
|
-
xcss: styles.headingWrapper
|
|
110
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
111
|
+
xcss: styles.headingWrapper,
|
|
112
|
+
alignBlock: "end"
|
|
100
113
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
101
|
-
as: "
|
|
114
|
+
as: "h2",
|
|
102
115
|
size: "xlarge"
|
|
103
116
|
}, agentName), isHidden && /*#__PURE__*/React.createElement(Box, {
|
|
104
117
|
xcss: styles.tooltipWrapper
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const ChatPillIcon: (props: Omit<
|
|
2
|
+
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
3
|
+
export declare const ChatPillIcon: (props: Omit<NewCoreIconProps, 'label' | 'glyph'>) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const HiddenIcon: (props: Omit<
|
|
2
|
+
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
3
|
+
export declare const HiddenIcon: (props: Omit<NewCoreIconProps, 'glyph'>) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const ShowIcon: (props:
|
|
2
|
+
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
3
|
+
export declare const ShowIcon: (props: NewCoreIconProps) => React.JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="react" />
|
|
2
6
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
7
|
export type ConversationStarter = {
|
|
4
8
|
message: string;
|
|
@@ -24,7 +28,7 @@ export type AgentConversationStartersProps = {
|
|
|
24
28
|
userDefinedConversationStarters?: GetConversationStartersParams['userDefinedConversationStarters'];
|
|
25
29
|
isAgentDefault: GetConversationStartersParams['isAgentDefault'];
|
|
26
30
|
} & Omit<ConversationStartersProps, 'starters'>;
|
|
27
|
-
export declare const AgentConversationStarters: ({ userDefinedConversationStarters, isAgentDefault, ...props }: AgentConversationStartersProps) =>
|
|
31
|
+
export declare const AgentConversationStarters: ({ userDefinedConversationStarters, isAgentDefault, ...props }: AgentConversationStartersProps) => JSX.Element;
|
|
28
32
|
export type ConversationStartersProps = {
|
|
29
33
|
starters: ConversationStarter[];
|
|
30
34
|
onConversationStarterClick: (conversationStarter: ConversationStarter) => void;
|
|
@@ -32,5 +36,5 @@ export type ConversationStartersProps = {
|
|
|
32
36
|
onReloadButtonClick?: () => void;
|
|
33
37
|
onBrowseAgentsClick?: () => void;
|
|
34
38
|
};
|
|
35
|
-
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, }: ConversationStartersProps) =>
|
|
39
|
+
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, }: ConversationStartersProps) => JSX.Element;
|
|
36
40
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const ChatPillIcon: (props: Omit<
|
|
2
|
+
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
3
|
+
export declare const ChatPillIcon: (props: Omit<NewCoreIconProps, 'label' | 'glyph'>) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const HiddenIcon: (props: Omit<
|
|
2
|
+
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
3
|
+
export declare const HiddenIcon: (props: Omit<NewCoreIconProps, 'glyph'>) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export declare const ShowIcon: (props:
|
|
2
|
+
import { type NewCoreIconProps } from '@atlaskit/icon';
|
|
3
|
+
export declare const ShowIcon: (props: NewCoreIconProps) => React.JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
2
6
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
3
7
|
export type ConversationStarter = {
|
|
4
8
|
message: string;
|
|
@@ -24,7 +28,7 @@ export type AgentConversationStartersProps = {
|
|
|
24
28
|
userDefinedConversationStarters?: GetConversationStartersParams['userDefinedConversationStarters'];
|
|
25
29
|
isAgentDefault: GetConversationStartersParams['isAgentDefault'];
|
|
26
30
|
} & Omit<ConversationStartersProps, 'starters'>;
|
|
27
|
-
export declare const AgentConversationStarters: ({ userDefinedConversationStarters, isAgentDefault, ...props }: AgentConversationStartersProps) =>
|
|
31
|
+
export declare const AgentConversationStarters: ({ userDefinedConversationStarters, isAgentDefault, ...props }: AgentConversationStartersProps) => JSX.Element;
|
|
28
32
|
export type ConversationStartersProps = {
|
|
29
33
|
starters: ConversationStarter[];
|
|
30
34
|
onConversationStarterClick: (conversationStarter: ConversationStarter) => void;
|
|
@@ -32,5 +36,5 @@ export type ConversationStartersProps = {
|
|
|
32
36
|
onReloadButtonClick?: () => void;
|
|
33
37
|
onBrowseAgentsClick?: () => void;
|
|
34
38
|
};
|
|
35
|
-
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, }: ConversationStartersProps) =>
|
|
39
|
+
export declare const ConversationStarters: ({ starters, onConversationStarterClick, showReloadButton, onReloadButtonClick, onBrowseAgentsClick, }: ConversationStartersProps) => JSX.Element;
|
|
36
40
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.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",
|
|
@@ -38,17 +38,18 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
40
|
"@atlaskit/avatar": "^25.1.0",
|
|
41
|
-
"@atlaskit/button": "^23.
|
|
41
|
+
"@atlaskit/button": "^23.1.0",
|
|
42
42
|
"@atlaskit/css": "^0.10.0",
|
|
43
|
-
"@atlaskit/dropdown-menu": "^15.
|
|
43
|
+
"@atlaskit/dropdown-menu": "^15.1.0",
|
|
44
44
|
"@atlaskit/heading": "^5.2.0",
|
|
45
|
-
"@atlaskit/icon": "^26.
|
|
45
|
+
"@atlaskit/icon": "^26.1.0",
|
|
46
46
|
"@atlaskit/legacy-custom-icons": "^0.22.0",
|
|
47
|
+
"@atlaskit/link": "^3.1.0",
|
|
47
48
|
"@atlaskit/logo": "^18.0.0",
|
|
48
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
50
|
"@atlaskit/primitives": "^14.7.0",
|
|
50
51
|
"@atlaskit/skeleton": "^2.0.0",
|
|
51
|
-
"@atlaskit/tokens": "^4.
|
|
52
|
+
"@atlaskit/tokens": "^4.9.0",
|
|
52
53
|
"@atlaskit/tooltip": "^20.0.0",
|
|
53
54
|
"@babel/runtime": "^7.0.0",
|
|
54
55
|
"@compiled/react": "^0.18.3",
|
|
@@ -112,6 +113,9 @@
|
|
|
112
113
|
"platform-feature-flags": {
|
|
113
114
|
"rovo_chat_bugfix_agent_avatar_squish": {
|
|
114
115
|
"type": "boolean"
|
|
116
|
+
},
|
|
117
|
+
"dst-a11y__replace-anchor-with-link__ai-mate": {
|
|
118
|
+
"type": "boolean"
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
}
|