@atlaskit/rovo-agent-components 8.4.0 → 8.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 8.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`6997a74055219`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6997a74055219) -
8
+ Add profile card on hover in the mentions typeahead for agent mentions
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 8.4.0
4
15
 
5
16
  ### Minor Changes
@@ -78,7 +78,9 @@ var getAgentCreator = exports.getAgentCreator = function getAgentCreator(_ref) {
78
78
  var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCreator(_ref2) {
79
79
  var creator = _ref2.creator,
80
80
  onCreatorLinkClick = _ref2.onCreatorLinkClick,
81
- isLoading = _ref2.isLoading;
81
+ isLoading = _ref2.isLoading,
82
+ _ref2$showCreatorName = _ref2.showCreatorNameWithoutLink,
83
+ showCreatorNameWithoutLink = _ref2$showCreatorName === void 0 ? false : _ref2$showCreatorName;
82
84
  var _useIntl = (0, _reactIntl.useIntl)(),
83
85
  formatMessage = _useIntl.formatMessage;
84
86
  var getCreatorRender = function getCreatorRender() {
@@ -108,14 +110,15 @@ var AgentProfileCreator = exports.AgentProfileCreator = function AgentProfileCre
108
110
  });
109
111
  }
110
112
  if (creator.type === 'CUSTOMER') {
113
+ var creatorName = "".concat(creator.name, " ").concat(creator.status === 'inactive' ? formatMessage(_messages.messages.agentDeactivated) : '');
111
114
  return formatMessage(_messages.messages.agentCreatedBy, {
112
- creatorNameWithLink: /*#__PURE__*/_react.default.createElement(_link.default, {
115
+ creatorNameWithLink: showCreatorNameWithoutLink ? creatorName : /*#__PURE__*/_react.default.createElement(_link.default, {
113
116
  href: creator.profileLink,
114
117
  onClick: function onClick() {
115
118
  return onCreatorLinkClick();
116
119
  },
117
120
  target: "_blank"
118
- }, creator.name, ' ', creator.status === 'inactive' && formatMessage(_messages.messages.agentDeactivated))
121
+ }, creatorName)
119
122
  });
120
123
  }
121
124
  if (creator.type === 'REMOTE_A2A') {
@@ -72,7 +72,8 @@ export const getAgentCreator = ({
72
72
  export const AgentProfileCreator = ({
73
73
  creator,
74
74
  onCreatorLinkClick,
75
- isLoading
75
+ isLoading,
76
+ showCreatorNameWithoutLink = false
76
77
  }) => {
77
78
  const {
78
79
  formatMessage
@@ -104,12 +105,13 @@ export const AgentProfileCreator = ({
104
105
  });
105
106
  }
106
107
  if (creator.type === 'CUSTOMER') {
108
+ const creatorName = `${creator.name} ${creator.status === 'inactive' ? formatMessage(messages.agentDeactivated) : ''}`;
107
109
  return formatMessage(messages.agentCreatedBy, {
108
- creatorNameWithLink: /*#__PURE__*/React.createElement(Link, {
110
+ creatorNameWithLink: showCreatorNameWithoutLink ? creatorName : /*#__PURE__*/React.createElement(Link, {
109
111
  href: creator.profileLink,
110
112
  onClick: () => onCreatorLinkClick(),
111
113
  target: "_blank"
112
- }, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated))
114
+ }, creatorName)
113
115
  });
114
116
  }
115
117
  if (creator.type === 'REMOTE_A2A') {
@@ -71,7 +71,9 @@ export var getAgentCreator = function getAgentCreator(_ref) {
71
71
  export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
72
72
  var creator = _ref2.creator,
73
73
  onCreatorLinkClick = _ref2.onCreatorLinkClick,
74
- isLoading = _ref2.isLoading;
74
+ isLoading = _ref2.isLoading,
75
+ _ref2$showCreatorName = _ref2.showCreatorNameWithoutLink,
76
+ showCreatorNameWithoutLink = _ref2$showCreatorName === void 0 ? false : _ref2$showCreatorName;
75
77
  var _useIntl = useIntl(),
76
78
  formatMessage = _useIntl.formatMessage;
77
79
  var getCreatorRender = function getCreatorRender() {
@@ -101,14 +103,15 @@ export var AgentProfileCreator = function AgentProfileCreator(_ref2) {
101
103
  });
102
104
  }
103
105
  if (creator.type === 'CUSTOMER') {
106
+ var creatorName = "".concat(creator.name, " ").concat(creator.status === 'inactive' ? formatMessage(messages.agentDeactivated) : '');
104
107
  return formatMessage(messages.agentCreatedBy, {
105
- creatorNameWithLink: /*#__PURE__*/React.createElement(Link, {
108
+ creatorNameWithLink: showCreatorNameWithoutLink ? creatorName : /*#__PURE__*/React.createElement(Link, {
106
109
  href: creator.profileLink,
107
110
  onClick: function onClick() {
108
111
  return onCreatorLinkClick();
109
112
  },
110
113
  target: "_blank"
111
- }, creator.name, ' ', creator.status === 'inactive' && formatMessage(messages.agentDeactivated))
114
+ }, creatorName)
112
115
  });
113
116
  }
114
117
  if (creator.type === 'REMOTE_A2A') {
@@ -29,13 +29,17 @@ export declare const getAgentCreator: ({ creatorType, authoringTeam, userCreator
29
29
  };
30
30
  forgeCreator?: string;
31
31
  }) => AgentCreator | undefined;
32
- export declare const AgentProfileCreator: ({ creator, onCreatorLinkClick, isLoading, }: {
32
+ export declare const AgentProfileCreator: ({ creator, onCreatorLinkClick, isLoading, showCreatorNameWithoutLink, }: {
33
33
  /**
34
34
  * Get this value from `getAgentCreator`
35
35
  */
36
36
  creator?: AgentCreator;
37
37
  isLoading: boolean;
38
38
  onCreatorLinkClick: () => void;
39
+ /**
40
+ * Render the creator as plain text instead of a link.
41
+ */
42
+ showCreatorNameWithoutLink?: boolean;
39
43
  }) => JSX.Element | null;
40
44
  export declare const AgentProfileInfo: ({ agentName, agentDescription, creatorRender, starCountRender, headingRender, isStarred, isHidden, onStarToggle, showStarButton, renderAdditionalContent, }: {
41
45
  agentName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "8.4.0",
3
+ "version": "8.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
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
6
6
  "atlassian": {