@atlaskit/rovo-agent-components 3.42.0 → 3.43.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,14 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 3.43.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`687a8de6184c3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/687a8de6184c3) -
8
+ [ux] This change adds additional optional options to the dropdown menu on agent cards for the
9
+ browse agents modal. It also removes the showCreateAgentButtonInHeader prop from the browse agents
10
+ modal.
11
+
3
12
  ## 3.42.0
4
13
 
5
14
  ### Minor Changes
@@ -77,7 +77,8 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
77
77
  agentName = _ref2.agentName,
78
78
  agentRef = _ref2.agentRef,
79
79
  userPermissionsRef = _ref2.userPermissionsRef,
80
- onVerificationSuccess = _ref2.onVerificationSuccess;
80
+ onVerificationSuccess = _ref2.onVerificationSuccess,
81
+ customDropdownOptions = _ref2.customDropdownOptions;
81
82
  var _useState = (0, _react.useState)(false),
82
83
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
83
84
  isLoading = _useState2[0],
@@ -185,7 +186,12 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
185
186
  setHasBeenCopied(false);
186
187
  }
187
188
  }
188
- }, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, null, showViewAgentOption && /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
189
+ }, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, null, (0, _platformFeatureFlags.fg)('jira_browse_agents_modal') && (customDropdownOptions === null || customDropdownOptions === void 0 ? void 0 : customDropdownOptions.map(function (option) {
190
+ return /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
191
+ key: option.id,
192
+ onClick: option.onClick
193
+ }, option.label);
194
+ })), showViewAgentOption && /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
189
195
  onClick: onViewAgentClick
190
196
  }, formatMessage(_messages.default.viewAgent)), doesAgentHaveIdentityAccountId && onViewAgentFullProfileClick && /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
191
197
  onClick: onViewAgentFullProfileClick
@@ -64,7 +64,8 @@ export const AgentDropdownMenu = ({
64
64
  agentName,
65
65
  agentRef,
66
66
  userPermissionsRef,
67
- onVerificationSuccess
67
+ onVerificationSuccess,
68
+ customDropdownOptions
68
69
  }) => {
69
70
  const [isLoading, setIsLoading] = useState(false);
70
71
  const {
@@ -145,7 +146,10 @@ export const AgentDropdownMenu = ({
145
146
  setHasBeenCopied(false);
146
147
  }
147
148
  }
148
- }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, showViewAgentOption && /*#__PURE__*/React.createElement(DropdownItem, {
149
+ }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, fg('jira_browse_agents_modal') && (customDropdownOptions === null || customDropdownOptions === void 0 ? void 0 : customDropdownOptions.map(option => /*#__PURE__*/React.createElement(DropdownItem, {
150
+ key: option.id,
151
+ onClick: option.onClick
152
+ }, option.label))), showViewAgentOption && /*#__PURE__*/React.createElement(DropdownItem, {
149
153
  onClick: onViewAgentClick
150
154
  }, formatMessage(messages.viewAgent)), doesAgentHaveIdentityAccountId && onViewAgentFullProfileClick && /*#__PURE__*/React.createElement(DropdownItem, {
151
155
  onClick: onViewAgentFullProfileClick
@@ -68,7 +68,8 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
68
68
  agentName = _ref2.agentName,
69
69
  agentRef = _ref2.agentRef,
70
70
  userPermissionsRef = _ref2.userPermissionsRef,
71
- onVerificationSuccess = _ref2.onVerificationSuccess;
71
+ onVerificationSuccess = _ref2.onVerificationSuccess,
72
+ customDropdownOptions = _ref2.customDropdownOptions;
72
73
  var _useState = useState(false),
73
74
  _useState2 = _slicedToArray(_useState, 2),
74
75
  isLoading = _useState2[0],
@@ -176,7 +177,12 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
176
177
  setHasBeenCopied(false);
177
178
  }
178
179
  }
179
- }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, showViewAgentOption && /*#__PURE__*/React.createElement(DropdownItem, {
180
+ }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, fg('jira_browse_agents_modal') && (customDropdownOptions === null || customDropdownOptions === void 0 ? void 0 : customDropdownOptions.map(function (option) {
181
+ return /*#__PURE__*/React.createElement(DropdownItem, {
182
+ key: option.id,
183
+ onClick: option.onClick
184
+ }, option.label);
185
+ })), showViewAgentOption && /*#__PURE__*/React.createElement(DropdownItem, {
180
186
  onClick: onViewAgentClick
181
187
  }, formatMessage(messages.viewAgent)), doesAgentHaveIdentityAccountId && onViewAgentFullProfileClick && /*#__PURE__*/React.createElement(DropdownItem, {
182
188
  onClick: onViewAgentFullProfileClick
@@ -10,6 +10,11 @@ import { type AgentVerificationDropdownItemProps } from '../agent-verification-d
10
10
  type ChatToAgentButtonProps = {
11
11
  onClick: ButtonProps['onClick'];
12
12
  };
13
+ type CustomDropdownOption = {
14
+ id: string;
15
+ label: string;
16
+ onClick: () => void;
17
+ };
13
18
  export declare const ChatToAgentButton: ({ onClick }: ChatToAgentButtonProps) => JSX.Element;
14
19
  type ViewAgentOptionProps = {
15
20
  showViewAgentOption: true;
@@ -46,6 +51,7 @@ type AgentDropdownMenuProps = {
46
51
  isEditEnabled: boolean;
47
52
  isDeleteEnabled: boolean;
48
53
  }>;
54
+ customDropdownOptions?: CustomDropdownOption[];
49
55
  } & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef' | 'onVerificationSuccess'>>;
50
- export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, }: AgentDropdownMenuProps) => JSX.Element;
56
+ export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, customDropdownOptions, }: AgentDropdownMenuProps) => JSX.Element;
51
57
  export {};
@@ -10,6 +10,11 @@ import { type AgentVerificationDropdownItemProps } from '../agent-verification-d
10
10
  type ChatToAgentButtonProps = {
11
11
  onClick: ButtonProps['onClick'];
12
12
  };
13
+ type CustomDropdownOption = {
14
+ id: string;
15
+ label: string;
16
+ onClick: () => void;
17
+ };
13
18
  export declare const ChatToAgentButton: ({ onClick }: ChatToAgentButtonProps) => JSX.Element;
14
19
  type ViewAgentOptionProps = {
15
20
  showViewAgentOption: true;
@@ -46,6 +51,7 @@ type AgentDropdownMenuProps = {
46
51
  isEditEnabled: boolean;
47
52
  isDeleteEnabled: boolean;
48
53
  }>;
54
+ customDropdownOptions?: CustomDropdownOption[];
49
55
  } & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef' | 'onVerificationSuccess'>>;
50
- export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, }: AgentDropdownMenuProps) => JSX.Element;
56
+ export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, customDropdownOptions, }: AgentDropdownMenuProps) => JSX.Element;
51
57
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "3.42.0",
3
+ "version": "3.43.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",
@@ -128,6 +128,9 @@
128
128
  },
129
129
  "rovo_agent_support_a2a_avatar": {
130
130
  "type": "boolean"
131
+ },
132
+ "jira_browse_agents_modal": {
133
+ "type": "boolean"
131
134
  }
132
135
  }
133
136
  }