@atlaskit/profilecard 27.8.2 → 27.9.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 +12 -0
- package/dist/cjs/client/addHeaders.js +1 -1
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +10 -5
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +3 -1
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/util/createEvent.js +1 -1
- package/dist/es2019/client/addHeaders.js +1 -1
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +9 -5
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +3 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/util/createEvent.js +1 -1
- package/dist/esm/client/addHeaders.js +1 -1
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +10 -5
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +3 -1
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/util/createEvent.js +1 -1
- package/dist/types/components/Agent/AgentProfileCard.d.ts +1 -1
- package/dist/types/components/Agent/AgentProfileCardResourced.d.ts +2 -0
- package/dist/types/types.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 27.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d6da98be8e020`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d6da98be8e020) -
|
|
8
|
+
Add an optional read-only agent profile card preview without built-in actions or links, for
|
|
9
|
+
assignee pickers that retain keyboard focus.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 27.8.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,6 +11,6 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
11
11
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
12
12
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
13
13
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
14
|
-
headers.append('atl-client-version', "27.8.
|
|
14
|
+
headers.append('atl-client-version', "27.8.2");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
@@ -11,7 +11,7 @@ var _AGGQuery = require("./AGGQuery");
|
|
|
11
11
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
12
12
|
var addHeaders = function addHeaders(headers) {
|
|
13
13
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
14
|
-
headers.append('atl-client-version', "27.8.
|
|
14
|
+
headers.append('atl-client-version', "27.8.2");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -77,6 +77,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
77
77
|
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions,
|
|
78
78
|
_ref$hideStarButton = _ref.hideStarButton,
|
|
79
79
|
hideStarButton = _ref$hideStarButton === void 0 ? false : _ref$hideStarButton,
|
|
80
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
81
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
80
82
|
_ref$showCreatorNameW = _ref.showCreatorNameWithoutLink,
|
|
81
83
|
showCreatorNameWithoutLink = _ref$showCreatorNameW === void 0 ? false : _ref$showCreatorNameW,
|
|
82
84
|
footerComponent = _ref.footerComponent;
|
|
@@ -214,8 +216,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
214
216
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
215
217
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
216
218
|
var isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
217
|
-
var shouldShowConversationStarters = !isRovoDevOrJiraCodingAgent && !(((0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || (0, _fg.fg)('platform_editor_agent_card_fixes')) && hideConversationStarters);
|
|
218
|
-
var shouldShowAgentActions = !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
219
|
+
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !(((0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || (0, _fg.fg)('platform_editor_agent_card_fixes')) && hideConversationStarters);
|
|
220
|
+
var shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
219
221
|
|
|
220
222
|
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
221
223
|
var needsBottomPaddingFallback = hideAgentActions && (_featureGates.default.getExperimentValue('jira_agent_recommendations_m1', 'isEnabled', false) || (0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || (0, _fg.fg)('platform_editor_agent_card_fixes'));
|
|
@@ -247,7 +249,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
247
249
|
agentName: agent.name,
|
|
248
250
|
isStarred: isStarred,
|
|
249
251
|
onStarToggle: handleSetFavourite,
|
|
250
|
-
showStarButton: !isRovoDev && !hideStarButton,
|
|
252
|
+
showStarButton: !isReadOnly && !isRovoDev && !hideStarButton,
|
|
251
253
|
isHidden: agent.visibility === 'PRIVATE',
|
|
252
254
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileCreator, {
|
|
253
255
|
creator: {
|
|
@@ -257,7 +259,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
257
259
|
},
|
|
258
260
|
isLoading: false,
|
|
259
261
|
onCreatorLinkClick: function onCreatorLinkClick() {},
|
|
260
|
-
showCreatorNameWithoutLink: showCreatorNameWithoutLink
|
|
262
|
+
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
261
263
|
}),
|
|
262
264
|
starCountRender: null,
|
|
263
265
|
agentDescription: (0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || (0, _fg.fg)('platform_editor_agent_card_fixes') ? undefined : agent.description
|
|
@@ -271,7 +273,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
271
273
|
direction: "column",
|
|
272
274
|
gap: "space.050",
|
|
273
275
|
xcss: (0, _expValEquals.expValEquals)('platform_editor_agent_mentions', 'isEnabled', true) && (0, _fg.fg)('platform_editor_agent_mentions_drop_one_fixes') || (0, _fg.fg)('platform_editor_agent_card_fixes') ? styles.disclosureWrapper : styles.disclosureWrapperLegacy
|
|
274
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
276
|
+
}, isReadOnly ? /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
277
|
+
size: "small",
|
|
278
|
+
color: "color.text.subtlest"
|
|
279
|
+
}, formatMessage(_messages.messages.aiDisclaimer)) : /*#__PURE__*/_react.default.createElement(_teamsLink.TeamsLink, {
|
|
275
280
|
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
276
281
|
intent: "reference",
|
|
277
282
|
appearance: "subtle"
|
|
@@ -207,12 +207,13 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
207
207
|
hideAiDisclaimer: true,
|
|
208
208
|
hideStarButton: props.hideStarButton,
|
|
209
209
|
showCreatorNameWithoutLink: props.showCreatorNameWithoutLink,
|
|
210
|
+
isReadOnly: props.isReadOnly,
|
|
210
211
|
footerComponent: props.footerComponent
|
|
211
212
|
})));
|
|
212
213
|
}
|
|
213
214
|
if (error || !isLoading && !agentData) {
|
|
214
215
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_ErrorMessage.default, {
|
|
215
|
-
reload: function
|
|
216
|
+
reload: props.isReadOnly ? undefined : function () {
|
|
216
217
|
fetchData();
|
|
217
218
|
},
|
|
218
219
|
errorType: error || null,
|
|
@@ -237,6 +238,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
237
238
|
hideAgentActions: props.hideAgentActions,
|
|
238
239
|
hideStarButton: props.hideStarButton,
|
|
239
240
|
showCreatorNameWithoutLink: props.showCreatorNameWithoutLink,
|
|
241
|
+
isReadOnly: props.isReadOnly,
|
|
240
242
|
footerComponent: props.footerComponent
|
|
241
243
|
}));
|
|
242
244
|
};
|
|
@@ -7,7 +7,7 @@ exports.USER_SUBJECT = exports.TEAM_SUBJECT = exports.PACKAGE_META_DATA = export
|
|
|
7
7
|
var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
8
8
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
9
9
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
10
|
-
packageVersion: (_process$env$_PACKAGE2 = "27.8.
|
|
10
|
+
packageVersion: (_process$env$_PACKAGE2 = "27.8.2") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
11
11
|
};
|
|
12
12
|
var TEAM_SUBJECT = exports.TEAM_SUBJECT = 'teamProfileCard';
|
|
13
13
|
var USER_SUBJECT = exports.USER_SUBJECT = 'profilecard';
|
|
@@ -22,7 +22,7 @@ var createEvent = exports.createEvent = function createEvent(eventType, action,
|
|
|
22
22
|
actionSubjectId: actionSubjectId,
|
|
23
23
|
attributes: _objectSpread(_objectSpread({
|
|
24
24
|
packageName: "@atlaskit/profilecard",
|
|
25
|
-
packageVersion: "27.8.
|
|
25
|
+
packageVersion: "27.8.2"
|
|
26
26
|
}, attributes), {}, {
|
|
27
27
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
28
28
|
})
|
|
@@ -5,6 +5,6 @@ export const addHeaders = headers => {
|
|
|
5
5
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
6
6
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
7
7
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
8
|
-
headers.append('atl-client-version', "27.8.
|
|
8
|
+
headers.append('atl-client-version', "27.8.2");
|
|
9
9
|
return headers;
|
|
10
10
|
};
|
|
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
|
|
|
6
6
|
}`;
|
|
7
7
|
const addHeaders = headers => {
|
|
8
8
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
9
|
-
headers.append('atl-client-version', "27.8.
|
|
9
|
+
headers.append('atl-client-version', "27.8.2");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -57,6 +57,7 @@ const AgentProfileCard = ({
|
|
|
57
57
|
hideConversationStarters = false,
|
|
58
58
|
hideAgentActions = false,
|
|
59
59
|
hideStarButton = false,
|
|
60
|
+
isReadOnly = false,
|
|
60
61
|
showCreatorNameWithoutLink = false,
|
|
61
62
|
footerComponent
|
|
62
63
|
}) => {
|
|
@@ -162,8 +163,8 @@ const AgentProfileCard = ({
|
|
|
162
163
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
163
164
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
164
165
|
const isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
165
|
-
const shouldShowConversationStarters = !isRovoDevOrJiraCodingAgent && !((expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) && hideConversationStarters);
|
|
166
|
-
const shouldShowAgentActions = !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
166
|
+
const shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !((expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) && hideConversationStarters);
|
|
167
|
+
const shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
167
168
|
|
|
168
169
|
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
169
170
|
const needsBottomPaddingFallback = hideAgentActions && (FeatureGates.getExperimentValue('jira_agent_recommendations_m1', 'isEnabled', false) || expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes'));
|
|
@@ -195,7 +196,7 @@ const AgentProfileCard = ({
|
|
|
195
196
|
agentName: agent.name,
|
|
196
197
|
isStarred: isStarred,
|
|
197
198
|
onStarToggle: handleSetFavourite,
|
|
198
|
-
showStarButton: !isRovoDev && !hideStarButton,
|
|
199
|
+
showStarButton: !isReadOnly && !isRovoDev && !hideStarButton,
|
|
199
200
|
isHidden: agent.visibility === 'PRIVATE',
|
|
200
201
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
201
202
|
creator: {
|
|
@@ -205,7 +206,7 @@ const AgentProfileCard = ({
|
|
|
205
206
|
},
|
|
206
207
|
isLoading: false,
|
|
207
208
|
onCreatorLinkClick: () => {},
|
|
208
|
-
showCreatorNameWithoutLink: showCreatorNameWithoutLink
|
|
209
|
+
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
209
210
|
}),
|
|
210
211
|
starCountRender: null,
|
|
211
212
|
agentDescription: expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes') ? undefined : agent.description
|
|
@@ -219,7 +220,10 @@ const AgentProfileCard = ({
|
|
|
219
220
|
direction: "column",
|
|
220
221
|
gap: "space.050",
|
|
221
222
|
xcss: expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes') ? styles.disclosureWrapper : styles.disclosureWrapperLegacy
|
|
222
|
-
}, /*#__PURE__*/React.createElement(
|
|
223
|
+
}, isReadOnly ? /*#__PURE__*/React.createElement(Text, {
|
|
224
|
+
size: "small",
|
|
225
|
+
color: "color.text.subtlest"
|
|
226
|
+
}, formatMessage(messages.aiDisclaimer)) : /*#__PURE__*/React.createElement(TeamsLink, {
|
|
223
227
|
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
224
228
|
intent: "reference",
|
|
225
229
|
appearance: "subtle"
|
|
@@ -145,12 +145,13 @@ export const AgentProfileCardResourced = props => {
|
|
|
145
145
|
hideAiDisclaimer: true,
|
|
146
146
|
hideStarButton: props.hideStarButton,
|
|
147
147
|
showCreatorNameWithoutLink: props.showCreatorNameWithoutLink,
|
|
148
|
+
isReadOnly: props.isReadOnly,
|
|
148
149
|
footerComponent: props.footerComponent
|
|
149
150
|
})));
|
|
150
151
|
}
|
|
151
152
|
if (error || !isLoading && !agentData) {
|
|
152
153
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
153
|
-
reload: () => {
|
|
154
|
+
reload: props.isReadOnly ? undefined : () => {
|
|
154
155
|
fetchData();
|
|
155
156
|
},
|
|
156
157
|
errorType: error || null,
|
|
@@ -175,6 +176,7 @@ export const AgentProfileCardResourced = props => {
|
|
|
175
176
|
hideAgentActions: props.hideAgentActions,
|
|
176
177
|
hideStarButton: props.hideStarButton,
|
|
177
178
|
showCreatorNameWithoutLink: props.showCreatorNameWithoutLink,
|
|
179
|
+
isReadOnly: props.isReadOnly,
|
|
178
180
|
footerComponent: props.footerComponent
|
|
179
181
|
}));
|
|
180
182
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
2
2
|
export const PACKAGE_META_DATA = {
|
|
3
3
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
4
|
-
packageVersion: (_process$env$_PACKAGE2 = "27.8.
|
|
4
|
+
packageVersion: (_process$env$_PACKAGE2 = "27.8.2") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
5
5
|
};
|
|
6
6
|
export const TEAM_SUBJECT = 'teamProfileCard';
|
|
7
7
|
export const USER_SUBJECT = 'profilecard';
|
|
@@ -11,7 +11,7 @@ export const createEvent = (eventType, action, actionSubject, actionSubjectId, a
|
|
|
11
11
|
actionSubjectId,
|
|
12
12
|
attributes: {
|
|
13
13
|
packageName: "@atlaskit/profilecard",
|
|
14
|
-
packageVersion: "27.8.
|
|
14
|
+
packageVersion: "27.8.2",
|
|
15
15
|
...attributes,
|
|
16
16
|
firedAt: Math.round(getPageTime())
|
|
17
17
|
}
|
|
@@ -5,6 +5,6 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
5
5
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
6
6
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
7
7
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
8
|
-
headers.append('atl-client-version', "27.8.
|
|
8
|
+
headers.append('atl-client-version', "27.8.2");
|
|
9
9
|
return headers;
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ import { AGGQuery } from './AGGQuery';
|
|
|
4
4
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
5
5
|
var addHeaders = function addHeaders(headers) {
|
|
6
6
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
7
|
-
headers.append('atl-client-version', "27.8.
|
|
7
|
+
headers.append('atl-client-version', "27.8.2");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -68,6 +68,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
68
68
|
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions,
|
|
69
69
|
_ref$hideStarButton = _ref.hideStarButton,
|
|
70
70
|
hideStarButton = _ref$hideStarButton === void 0 ? false : _ref$hideStarButton,
|
|
71
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
72
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
71
73
|
_ref$showCreatorNameW = _ref.showCreatorNameWithoutLink,
|
|
72
74
|
showCreatorNameWithoutLink = _ref$showCreatorNameW === void 0 ? false : _ref$showCreatorNameW,
|
|
73
75
|
footerComponent = _ref.footerComponent;
|
|
@@ -205,8 +207,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
205
207
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
206
208
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
207
209
|
var isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
208
|
-
var shouldShowConversationStarters = !isRovoDevOrJiraCodingAgent && !((expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) && hideConversationStarters);
|
|
209
|
-
var shouldShowAgentActions = !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
210
|
+
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !((expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) && hideConversationStarters);
|
|
211
|
+
var shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
210
212
|
|
|
211
213
|
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
212
214
|
var needsBottomPaddingFallback = hideAgentActions && (FeatureGates.getExperimentValue('jira_agent_recommendations_m1', 'isEnabled', false) || expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes'));
|
|
@@ -238,7 +240,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
238
240
|
agentName: agent.name,
|
|
239
241
|
isStarred: isStarred,
|
|
240
242
|
onStarToggle: handleSetFavourite,
|
|
241
|
-
showStarButton: !isRovoDev && !hideStarButton,
|
|
243
|
+
showStarButton: !isReadOnly && !isRovoDev && !hideStarButton,
|
|
242
244
|
isHidden: agent.visibility === 'PRIVATE',
|
|
243
245
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
244
246
|
creator: {
|
|
@@ -248,7 +250,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
248
250
|
},
|
|
249
251
|
isLoading: false,
|
|
250
252
|
onCreatorLinkClick: function onCreatorLinkClick() {},
|
|
251
|
-
showCreatorNameWithoutLink: showCreatorNameWithoutLink
|
|
253
|
+
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
252
254
|
}),
|
|
253
255
|
starCountRender: null,
|
|
254
256
|
agentDescription: expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes') ? undefined : agent.description
|
|
@@ -262,7 +264,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
262
264
|
direction: "column",
|
|
263
265
|
gap: "space.050",
|
|
264
266
|
xcss: expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes') ? styles.disclosureWrapper : styles.disclosureWrapperLegacy
|
|
265
|
-
}, /*#__PURE__*/React.createElement(
|
|
267
|
+
}, isReadOnly ? /*#__PURE__*/React.createElement(Text, {
|
|
268
|
+
size: "small",
|
|
269
|
+
color: "color.text.subtlest"
|
|
270
|
+
}, formatMessage(messages.aiDisclaimer)) : /*#__PURE__*/React.createElement(TeamsLink, {
|
|
266
271
|
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
267
272
|
intent: "reference",
|
|
268
273
|
appearance: "subtle"
|
|
@@ -198,12 +198,13 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
198
198
|
hideAiDisclaimer: true,
|
|
199
199
|
hideStarButton: props.hideStarButton,
|
|
200
200
|
showCreatorNameWithoutLink: props.showCreatorNameWithoutLink,
|
|
201
|
+
isReadOnly: props.isReadOnly,
|
|
201
202
|
footerComponent: props.footerComponent
|
|
202
203
|
})));
|
|
203
204
|
}
|
|
204
205
|
if (error || !isLoading && !agentData) {
|
|
205
206
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
206
|
-
reload: function
|
|
207
|
+
reload: props.isReadOnly ? undefined : function () {
|
|
207
208
|
fetchData();
|
|
208
209
|
},
|
|
209
210
|
errorType: error || null,
|
|
@@ -228,6 +229,7 @@ export var AgentProfileCardResourced = function AgentProfileCardResourced(props)
|
|
|
228
229
|
hideAgentActions: props.hideAgentActions,
|
|
229
230
|
hideStarButton: props.hideStarButton,
|
|
230
231
|
showCreatorNameWithoutLink: props.showCreatorNameWithoutLink,
|
|
232
|
+
isReadOnly: props.isReadOnly,
|
|
231
233
|
footerComponent: props.footerComponent
|
|
232
234
|
}));
|
|
233
235
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
2
2
|
export var PACKAGE_META_DATA = {
|
|
3
3
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
4
|
-
packageVersion: (_process$env$_PACKAGE2 = "27.8.
|
|
4
|
+
packageVersion: (_process$env$_PACKAGE2 = "27.8.2") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
5
5
|
};
|
|
6
6
|
export var TEAM_SUBJECT = 'teamProfileCard';
|
|
7
7
|
export var USER_SUBJECT = 'profilecard';
|
|
@@ -16,7 +16,7 @@ export var createEvent = function createEvent(eventType, action, actionSubject,
|
|
|
16
16
|
actionSubjectId: actionSubjectId,
|
|
17
17
|
attributes: _objectSpread(_objectSpread({
|
|
18
18
|
packageName: "@atlaskit/profilecard",
|
|
19
|
-
packageVersion: "27.8.
|
|
19
|
+
packageVersion: "27.8.2"
|
|
20
20
|
}, attributes), {}, {
|
|
21
21
|
firedAt: Math.round(getPageTime())
|
|
22
22
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AgentProfileCardProps } from '../../types';
|
|
3
|
-
declare const AgentProfileCard: ({ agent, isLoading, cloudId, email, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, hideAgentActions, hideStarButton, showCreatorNameWithoutLink, footerComponent, }: AgentProfileCardProps) => React.JSX.Element;
|
|
3
|
+
declare const AgentProfileCard: ({ agent, isLoading, cloudId, email, onChatClick, hasError, errorType, onConversationStartersClick, resourceClient, addFlag, onDeleteAgent, hideMoreActions, hideAiDisclaimer, hideConversationStarters, hideAgentActions, hideStarButton, isReadOnly, showCreatorNameWithoutLink, footerComponent, }: AgentProfileCardProps) => React.JSX.Element;
|
|
4
4
|
export default AgentProfileCard;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { type AgentActionsType, type Flag, type ProfileClient, type TriggerType } from '../../types';
|
|
3
3
|
export type AgentProfileCardResourcedProps = {
|
|
4
4
|
accountId: string;
|
|
5
|
+
/** Render an informational preview without built-in controls or links. Custom footer content must also be non-interactive. */
|
|
6
|
+
isReadOnly?: boolean;
|
|
5
7
|
cloudId: string;
|
|
6
8
|
resourceClient: ProfileClient;
|
|
7
9
|
trigger?: TriggerType;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -323,6 +323,8 @@ export interface AgentProfileCardTriggerProps extends AgentActionsType {
|
|
|
323
323
|
}
|
|
324
324
|
export type AgentProfileCardProps = {
|
|
325
325
|
resourceClient: ProfileClient;
|
|
326
|
+
/** Render an informational preview without built-in controls or links. Custom footer content must also be non-interactive. */
|
|
327
|
+
isReadOnly?: boolean;
|
|
326
328
|
agent?: RovoAgentProfileCardInfo;
|
|
327
329
|
isLoading?: boolean;
|
|
328
330
|
hasError?: boolean;
|