@atlaskit/profilecard 27.8.2 → 27.9.1
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/client/addHeaders.js +1 -1
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.compiled.css +0 -3
- package/dist/cjs/components/Agent/AgentProfileCard.js +17 -20
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +3 -1
- package/dist/cjs/components/Agent/AgentProfileCardWrapper.js +2 -10
- 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.compiled.css +0 -3
- package/dist/es2019/components/Agent/AgentProfileCard.js +16 -20
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +3 -1
- package/dist/es2019/components/Agent/AgentProfileCardWrapper.js +2 -10
- 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.compiled.css +0 -3
- package/dist/esm/components/Agent/AgentProfileCard.js +17 -20
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +3 -1
- package/dist/esm/components/Agent/AgentProfileCardWrapper.js +2 -10
- 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 +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 27.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`080910a39cbbe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/080910a39cbbe) -
|
|
8
|
+
Clean up feature gate `platform_editor_agent_card_fixes`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 27.9.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`d6da98be8e020`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d6da98be8e020) -
|
|
16
|
+
Add an optional read-only agent profile card preview without built-in actions or links, for
|
|
17
|
+
assignee pickers that retain keyboard focus.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 27.8.2
|
|
4
24
|
|
|
5
25
|
### 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.
|
|
14
|
+
headers.append('atl-client-version', "27.9.0");
|
|
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.
|
|
14
|
+
headers.append('atl-client-version', "27.9.0");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
4
4
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
5
5
|
._1mouze3t{margin-block:var(--ds-space-0,0)}._154i1ejb{top:var(--ds-space-300,24px)}
|
|
6
|
-
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
7
6
|
._18m915vq{overflow-y:hidden}
|
|
8
7
|
._1i4qfg65{overflow-wrap:anywhere}
|
|
9
8
|
._1ltvpxbi{left:var(--ds-space-200,1pc)}
|
|
10
9
|
._1nmz1hna{word-break:break-word}
|
|
11
10
|
._1q511ejb{padding-block-start:var(--ds-space-300,24px)}
|
|
12
|
-
._1q51utpp{padding-block-start:var(--ds-space-150,9pt)}
|
|
13
11
|
._1reo15vq{overflow-x:hidden}
|
|
14
12
|
._85i51ejb{padding-block-end:var(--ds-space-300,24px)}
|
|
15
|
-
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
16
13
|
._kqswh2mm{position:relative}
|
|
17
14
|
._kqswstnw{position:absolute}
|
|
@@ -16,7 +16,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _reactIntl = require("react-intl");
|
|
18
18
|
var _css = require("@atlaskit/css");
|
|
19
|
-
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
20
19
|
var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/information-circle"));
|
|
21
20
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
21
|
var _box = require("@atlaskit/primitives/compiled/box");
|
|
@@ -29,7 +28,6 @@ var _AgentAvatar = require("@atlaskit/rovo-agent-components/ui/AgentAvatar");
|
|
|
29
28
|
var _AgentProfileInfo = require("@atlaskit/rovo-agent-components/ui/AgentProfileInfo");
|
|
30
29
|
var _useAnalyticsEvents = require("@atlaskit/teams-app-internal-analytics/use-analytics-events");
|
|
31
30
|
var _teamsLink = require("@atlaskit/teams-app-internal-navigation/teams-link");
|
|
32
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
33
31
|
var _analytics = require("../../util/analytics");
|
|
34
32
|
var _performance = require("../../util/performance");
|
|
35
33
|
var _LoadingState = require("../common/LoadingState");
|
|
@@ -47,13 +45,11 @@ var styles = {
|
|
|
47
45
|
detailWrapperPreviewBottomPadding: "_85i51ejb",
|
|
48
46
|
avatarStyles: "_kqswstnw _154i1ejb _1ltvpxbi",
|
|
49
47
|
cardContainerStyles: "_2rko1mok _1reo15vq _18m915vq _kqswh2mm",
|
|
50
|
-
cardContainerStylesLegacy: "_2rko1mok _1reo15vq _18m915vq _16qs130s _kqswh2mm",
|
|
51
48
|
agentProfileInfoWrapper: "_18zrpxbi",
|
|
52
49
|
descriptionWrapper: "_18zrpxbi",
|
|
53
50
|
description: "_1mouze3t _1i4qfg65 _1nmz1hna",
|
|
54
51
|
conversationStartersWrapper: "_18zrutpp",
|
|
55
|
-
disclosureWrapper: "_zulp1b66 _18zrpxbi"
|
|
56
|
-
disclosureWrapperLegacy: "_zulp1b66 _18zrpxbi _1q51utpp _85i5utpp"
|
|
52
|
+
disclosureWrapper: "_zulp1b66 _18zrpxbi"
|
|
57
53
|
};
|
|
58
54
|
var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
59
55
|
var _agent$user_defined_c, _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
@@ -77,6 +73,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
77
73
|
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions,
|
|
78
74
|
_ref$hideStarButton = _ref.hideStarButton,
|
|
79
75
|
hideStarButton = _ref$hideStarButton === void 0 ? false : _ref$hideStarButton,
|
|
76
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
77
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
80
78
|
_ref$showCreatorNameW = _ref.showCreatorNameWithoutLink,
|
|
81
79
|
showCreatorNameWithoutLink = _ref$showCreatorNameW === void 0 ? false : _ref$showCreatorNameW,
|
|
82
80
|
footerComponent = _ref.footerComponent;
|
|
@@ -214,13 +212,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
214
212
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
215
213
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
216
214
|
var isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
217
|
-
var shouldShowConversationStarters = !
|
|
218
|
-
var shouldShowAgentActions = !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
219
|
-
|
|
220
|
-
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
221
|
-
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'));
|
|
215
|
+
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideConversationStarters;
|
|
216
|
+
var shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
222
217
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
223
|
-
xcss:
|
|
218
|
+
xcss: styles.cardContainerStyles
|
|
224
219
|
}, /*#__PURE__*/_react.default.createElement(_GeneratedAvatar.AgentBanner, {
|
|
225
220
|
agentId: agent.id,
|
|
226
221
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
@@ -239,15 +234,15 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
239
234
|
isForgeAgent: (0, _fg.fg)('rovo_agent_support_a2a_avatar') ? (0, _isForgeAgent.isForgeAgentByCreatorType)(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
240
235
|
forgeAgentIconUrl: agent.icon
|
|
241
236
|
})), /*#__PURE__*/_react.default.createElement(_stack.Stack, {
|
|
242
|
-
space:
|
|
243
|
-
xcss: (0, _css.cx)(styles.detailWrapper,
|
|
237
|
+
space: "space.150",
|
|
238
|
+
xcss: (0, _css.cx)(styles.detailWrapper, hideAgentActions && styles.detailWrapperPreviewBottomPadding)
|
|
244
239
|
}, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
245
240
|
xcss: styles.agentProfileInfoWrapper
|
|
246
241
|
}, /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileInfo, {
|
|
247
242
|
agentName: agent.name,
|
|
248
243
|
isStarred: isStarred,
|
|
249
244
|
onStarToggle: handleSetFavourite,
|
|
250
|
-
showStarButton: !isRovoDev && !hideStarButton,
|
|
245
|
+
showStarButton: !isReadOnly && !isRovoDev && !hideStarButton,
|
|
251
246
|
isHidden: agent.visibility === 'PRIVATE',
|
|
252
247
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileCreator, {
|
|
253
248
|
creator: {
|
|
@@ -257,11 +252,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
257
252
|
},
|
|
258
253
|
isLoading: false,
|
|
259
254
|
onCreatorLinkClick: function onCreatorLinkClick() {},
|
|
260
|
-
showCreatorNameWithoutLink: showCreatorNameWithoutLink
|
|
255
|
+
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
261
256
|
}),
|
|
262
|
-
starCountRender: null
|
|
263
|
-
|
|
264
|
-
})), !!agent.description && ((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')) && /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
257
|
+
starCountRender: null
|
|
258
|
+
})), !!agent.description && /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
265
259
|
xcss: styles.descriptionWrapper
|
|
266
260
|
}, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
267
261
|
xcss: styles.description,
|
|
@@ -270,8 +264,11 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
270
264
|
alignItems: "start",
|
|
271
265
|
direction: "column",
|
|
272
266
|
gap: "space.050",
|
|
273
|
-
xcss:
|
|
274
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
267
|
+
xcss: styles.disclosureWrapper
|
|
268
|
+
}, isReadOnly ? /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
269
|
+
size: "small",
|
|
270
|
+
color: "color.text.subtlest"
|
|
271
|
+
}, formatMessage(_messages.messages.aiDisclaimer)) : /*#__PURE__*/_react.default.createElement(_teamsLink.TeamsLink, {
|
|
275
272
|
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
276
273
|
intent: "reference",
|
|
277
274
|
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
|
};
|
|
@@ -9,21 +9,13 @@ exports.AgentProfileCardWrapper = void 0;
|
|
|
9
9
|
require("./AgentProfileCardWrapper.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
12
|
var _box = require("@atlaskit/primitives/compiled/box");
|
|
14
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
13
|
var styles = {
|
|
16
|
-
wrapper: "_2rko1mok _1bsb1gwv _bfhk1bhr _16qs130s"
|
|
17
|
-
wrapperLegacy: "_2rko1mok _1bsb1gwv _bfhk1bhr"
|
|
14
|
+
wrapper: "_2rko1mok _1bsb1gwv _bfhk1bhr _16qs130s"
|
|
18
15
|
};
|
|
19
16
|
var AgentProfileCardWrapper = exports.AgentProfileCardWrapper = function AgentProfileCardWrapper(_ref) {
|
|
20
17
|
var children = _ref.children;
|
|
21
|
-
if ((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')) {
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
23
|
-
xcss: styles.wrapper
|
|
24
|
-
}, children);
|
|
25
|
-
}
|
|
26
18
|
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
27
|
-
xcss: styles.
|
|
19
|
+
xcss: styles.wrapper
|
|
28
20
|
}, children);
|
|
29
21
|
};
|
|
@@ -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.
|
|
10
|
+
packageVersion: (_process$env$_PACKAGE2 = "27.9.0") !== 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.
|
|
25
|
+
packageVersion: "27.9.0"
|
|
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
|
+
headers.append('atl-client-version', "27.9.0");
|
|
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.
|
|
9
|
+
headers.append('atl-client-version', "27.9.0");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
4
4
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
5
5
|
._1mouze3t{margin-block:var(--ds-space-0,0)}._154i1ejb{top:var(--ds-space-300,24px)}
|
|
6
|
-
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
7
6
|
._18m915vq{overflow-y:hidden}
|
|
8
7
|
._1i4qfg65{overflow-wrap:anywhere}
|
|
9
8
|
._1ltvpxbi{left:var(--ds-space-200,1pc)}
|
|
10
9
|
._1nmz1hna{word-break:break-word}
|
|
11
10
|
._1q511ejb{padding-block-start:var(--ds-space-300,24px)}
|
|
12
|
-
._1q51utpp{padding-block-start:var(--ds-space-150,9pt)}
|
|
13
11
|
._1reo15vq{overflow-x:hidden}
|
|
14
12
|
._85i51ejb{padding-block-end:var(--ds-space-300,24px)}
|
|
15
|
-
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
16
13
|
._kqswh2mm{position:relative}
|
|
17
14
|
._kqswstnw{position:absolute}
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
8
7
|
import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
@@ -17,7 +16,6 @@ import { AgentAvatar } from '@atlaskit/rovo-agent-components/ui/AgentAvatar';
|
|
|
17
16
|
import { AgentProfileCreator, AgentProfileInfo } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
18
17
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics/use-analytics-events';
|
|
19
18
|
import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
|
|
20
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
19
|
import { PACKAGE_META_DATA } from '../../util/analytics';
|
|
22
20
|
import { getPageTime } from '../../util/performance';
|
|
23
21
|
import { LoadingState } from '../common/LoadingState';
|
|
@@ -32,13 +30,11 @@ const styles = {
|
|
|
32
30
|
detailWrapperPreviewBottomPadding: "_85i51ejb",
|
|
33
31
|
avatarStyles: "_kqswstnw _154i1ejb _1ltvpxbi",
|
|
34
32
|
cardContainerStyles: "_2rko1mok _1reo15vq _18m915vq _kqswh2mm",
|
|
35
|
-
cardContainerStylesLegacy: "_2rko1mok _1reo15vq _18m915vq _16qs130s _kqswh2mm",
|
|
36
33
|
agentProfileInfoWrapper: "_18zrpxbi",
|
|
37
34
|
descriptionWrapper: "_18zrpxbi",
|
|
38
35
|
description: "_1mouze3t _1i4qfg65 _1nmz1hna",
|
|
39
36
|
conversationStartersWrapper: "_18zrutpp",
|
|
40
|
-
disclosureWrapper: "_zulp1b66 _18zrpxbi"
|
|
41
|
-
disclosureWrapperLegacy: "_zulp1b66 _18zrpxbi _1q51utpp _85i5utpp"
|
|
37
|
+
disclosureWrapper: "_zulp1b66 _18zrpxbi"
|
|
42
38
|
};
|
|
43
39
|
const AgentProfileCard = ({
|
|
44
40
|
agent,
|
|
@@ -57,6 +53,7 @@ const AgentProfileCard = ({
|
|
|
57
53
|
hideConversationStarters = false,
|
|
58
54
|
hideAgentActions = false,
|
|
59
55
|
hideStarButton = false,
|
|
56
|
+
isReadOnly = false,
|
|
60
57
|
showCreatorNameWithoutLink = false,
|
|
61
58
|
footerComponent
|
|
62
59
|
}) => {
|
|
@@ -162,13 +159,10 @@ const AgentProfileCard = ({
|
|
|
162
159
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
163
160
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
164
161
|
const isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
165
|
-
const shouldShowConversationStarters = !
|
|
166
|
-
const shouldShowAgentActions = !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
167
|
-
|
|
168
|
-
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
169
|
-
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'));
|
|
162
|
+
const shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideConversationStarters;
|
|
163
|
+
const shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
170
164
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
171
|
-
xcss:
|
|
165
|
+
xcss: styles.cardContainerStyles
|
|
172
166
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
173
167
|
agentId: agent.id,
|
|
174
168
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
@@ -187,15 +181,15 @@ const AgentProfileCard = ({
|
|
|
187
181
|
isForgeAgent: fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
188
182
|
forgeAgentIconUrl: agent.icon
|
|
189
183
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
190
|
-
space:
|
|
191
|
-
xcss: cx(styles.detailWrapper,
|
|
184
|
+
space: "space.150",
|
|
185
|
+
xcss: cx(styles.detailWrapper, hideAgentActions && styles.detailWrapperPreviewBottomPadding)
|
|
192
186
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
193
187
|
xcss: styles.agentProfileInfoWrapper
|
|
194
188
|
}, /*#__PURE__*/React.createElement(AgentProfileInfo, {
|
|
195
189
|
agentName: agent.name,
|
|
196
190
|
isStarred: isStarred,
|
|
197
191
|
onStarToggle: handleSetFavourite,
|
|
198
|
-
showStarButton: !isRovoDev && !hideStarButton,
|
|
192
|
+
showStarButton: !isReadOnly && !isRovoDev && !hideStarButton,
|
|
199
193
|
isHidden: agent.visibility === 'PRIVATE',
|
|
200
194
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
201
195
|
creator: {
|
|
@@ -205,11 +199,10 @@ const AgentProfileCard = ({
|
|
|
205
199
|
},
|
|
206
200
|
isLoading: false,
|
|
207
201
|
onCreatorLinkClick: () => {},
|
|
208
|
-
showCreatorNameWithoutLink: showCreatorNameWithoutLink
|
|
202
|
+
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
209
203
|
}),
|
|
210
|
-
starCountRender: null
|
|
211
|
-
|
|
212
|
-
})), !!agent.description && (expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) && /*#__PURE__*/React.createElement(Box, {
|
|
204
|
+
starCountRender: null
|
|
205
|
+
})), !!agent.description && /*#__PURE__*/React.createElement(Box, {
|
|
213
206
|
xcss: styles.descriptionWrapper
|
|
214
207
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
215
208
|
xcss: styles.description,
|
|
@@ -218,8 +211,11 @@ const AgentProfileCard = ({
|
|
|
218
211
|
alignItems: "start",
|
|
219
212
|
direction: "column",
|
|
220
213
|
gap: "space.050",
|
|
221
|
-
xcss:
|
|
222
|
-
}, /*#__PURE__*/React.createElement(
|
|
214
|
+
xcss: styles.disclosureWrapper
|
|
215
|
+
}, isReadOnly ? /*#__PURE__*/React.createElement(Text, {
|
|
216
|
+
size: "small",
|
|
217
|
+
color: "color.text.subtlest"
|
|
218
|
+
}, formatMessage(messages.aiDisclaimer)) : /*#__PURE__*/React.createElement(TeamsLink, {
|
|
223
219
|
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
224
220
|
intent: "reference",
|
|
225
221
|
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
|
};
|
|
@@ -2,22 +2,14 @@
|
|
|
2
2
|
import "./AgentProfileCardWrapper.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
5
|
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
6
|
const styles = {
|
|
9
|
-
wrapper: "_2rko1mok _1bsb1gwv _bfhk1bhr _16qs130s"
|
|
10
|
-
wrapperLegacy: "_2rko1mok _1bsb1gwv _bfhk1bhr"
|
|
7
|
+
wrapper: "_2rko1mok _1bsb1gwv _bfhk1bhr _16qs130s"
|
|
11
8
|
};
|
|
12
9
|
export const AgentProfileCardWrapper = ({
|
|
13
10
|
children
|
|
14
11
|
}) => {
|
|
15
|
-
if (expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) {
|
|
16
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
17
|
-
xcss: styles.wrapper
|
|
18
|
-
}, children);
|
|
19
|
-
}
|
|
20
12
|
return /*#__PURE__*/React.createElement(Box, {
|
|
21
|
-
xcss: styles.
|
|
13
|
+
xcss: styles.wrapper
|
|
22
14
|
}, children);
|
|
23
15
|
};
|
|
@@ -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.
|
|
4
|
+
packageVersion: (_process$env$_PACKAGE2 = "27.9.0") !== 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.
|
|
14
|
+
packageVersion: "27.9.0",
|
|
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
|
+
headers.append('atl-client-version', "27.9.0");
|
|
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.
|
|
7
|
+
headers.append('atl-client-version', "27.9.0");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
4
4
|
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
5
5
|
._1mouze3t{margin-block:var(--ds-space-0,0)}._154i1ejb{top:var(--ds-space-300,24px)}
|
|
6
|
-
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
7
6
|
._18m915vq{overflow-y:hidden}
|
|
8
7
|
._1i4qfg65{overflow-wrap:anywhere}
|
|
9
8
|
._1ltvpxbi{left:var(--ds-space-200,1pc)}
|
|
10
9
|
._1nmz1hna{word-break:break-word}
|
|
11
10
|
._1q511ejb{padding-block-start:var(--ds-space-300,24px)}
|
|
12
|
-
._1q51utpp{padding-block-start:var(--ds-space-150,9pt)}
|
|
13
11
|
._1reo15vq{overflow-x:hidden}
|
|
14
12
|
._85i51ejb{padding-block-end:var(--ds-space-300,24px)}
|
|
15
|
-
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
16
13
|
._kqswh2mm{position:relative}
|
|
17
14
|
._kqswstnw{position:absolute}
|
|
@@ -10,7 +10,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
10
10
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
12
|
import { cx } from '@atlaskit/css';
|
|
13
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
14
13
|
import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
|
|
15
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
15
|
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
@@ -23,7 +22,6 @@ import { AgentAvatar } from '@atlaskit/rovo-agent-components/ui/AgentAvatar';
|
|
|
23
22
|
import { AgentProfileCreator, AgentProfileInfo } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
24
23
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics/use-analytics-events';
|
|
25
24
|
import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
|
|
26
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
25
|
import { PACKAGE_META_DATA } from '../../util/analytics';
|
|
28
26
|
import { getPageTime } from '../../util/performance';
|
|
29
27
|
import { LoadingState } from '../common/LoadingState';
|
|
@@ -38,13 +36,11 @@ var styles = {
|
|
|
38
36
|
detailWrapperPreviewBottomPadding: "_85i51ejb",
|
|
39
37
|
avatarStyles: "_kqswstnw _154i1ejb _1ltvpxbi",
|
|
40
38
|
cardContainerStyles: "_2rko1mok _1reo15vq _18m915vq _kqswh2mm",
|
|
41
|
-
cardContainerStylesLegacy: "_2rko1mok _1reo15vq _18m915vq _16qs130s _kqswh2mm",
|
|
42
39
|
agentProfileInfoWrapper: "_18zrpxbi",
|
|
43
40
|
descriptionWrapper: "_18zrpxbi",
|
|
44
41
|
description: "_1mouze3t _1i4qfg65 _1nmz1hna",
|
|
45
42
|
conversationStartersWrapper: "_18zrutpp",
|
|
46
|
-
disclosureWrapper: "_zulp1b66 _18zrpxbi"
|
|
47
|
-
disclosureWrapperLegacy: "_zulp1b66 _18zrpxbi _1q51utpp _85i5utpp"
|
|
43
|
+
disclosureWrapper: "_zulp1b66 _18zrpxbi"
|
|
48
44
|
};
|
|
49
45
|
var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
50
46
|
var _agent$user_defined_c, _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
@@ -68,6 +64,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
68
64
|
hideAgentActions = _ref$hideAgentActions === void 0 ? false : _ref$hideAgentActions,
|
|
69
65
|
_ref$hideStarButton = _ref.hideStarButton,
|
|
70
66
|
hideStarButton = _ref$hideStarButton === void 0 ? false : _ref$hideStarButton,
|
|
67
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
68
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
71
69
|
_ref$showCreatorNameW = _ref.showCreatorNameWithoutLink,
|
|
72
70
|
showCreatorNameWithoutLink = _ref$showCreatorNameW === void 0 ? false : _ref$showCreatorNameW,
|
|
73
71
|
footerComponent = _ref.footerComponent;
|
|
@@ -205,13 +203,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
205
203
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
206
204
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
207
205
|
var isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
208
|
-
var shouldShowConversationStarters = !
|
|
209
|
-
var shouldShowAgentActions = !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
210
|
-
|
|
211
|
-
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
212
|
-
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'));
|
|
206
|
+
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideConversationStarters;
|
|
207
|
+
var shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
213
208
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
214
|
-
xcss:
|
|
209
|
+
xcss: styles.cardContainerStyles
|
|
215
210
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
216
211
|
agentId: agent.id,
|
|
217
212
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
@@ -230,15 +225,15 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
230
225
|
isForgeAgent: fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
231
226
|
forgeAgentIconUrl: agent.icon
|
|
232
227
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
233
|
-
space:
|
|
234
|
-
xcss: cx(styles.detailWrapper,
|
|
228
|
+
space: "space.150",
|
|
229
|
+
xcss: cx(styles.detailWrapper, hideAgentActions && styles.detailWrapperPreviewBottomPadding)
|
|
235
230
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
236
231
|
xcss: styles.agentProfileInfoWrapper
|
|
237
232
|
}, /*#__PURE__*/React.createElement(AgentProfileInfo, {
|
|
238
233
|
agentName: agent.name,
|
|
239
234
|
isStarred: isStarred,
|
|
240
235
|
onStarToggle: handleSetFavourite,
|
|
241
|
-
showStarButton: !isRovoDev && !hideStarButton,
|
|
236
|
+
showStarButton: !isReadOnly && !isRovoDev && !hideStarButton,
|
|
242
237
|
isHidden: agent.visibility === 'PRIVATE',
|
|
243
238
|
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
244
239
|
creator: {
|
|
@@ -248,11 +243,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
248
243
|
},
|
|
249
244
|
isLoading: false,
|
|
250
245
|
onCreatorLinkClick: function onCreatorLinkClick() {},
|
|
251
|
-
showCreatorNameWithoutLink: showCreatorNameWithoutLink
|
|
246
|
+
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
252
247
|
}),
|
|
253
|
-
starCountRender: null
|
|
254
|
-
|
|
255
|
-
})), !!agent.description && (expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) && /*#__PURE__*/React.createElement(Box, {
|
|
248
|
+
starCountRender: null
|
|
249
|
+
})), !!agent.description && /*#__PURE__*/React.createElement(Box, {
|
|
256
250
|
xcss: styles.descriptionWrapper
|
|
257
251
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
258
252
|
xcss: styles.description,
|
|
@@ -261,8 +255,11 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
261
255
|
alignItems: "start",
|
|
262
256
|
direction: "column",
|
|
263
257
|
gap: "space.050",
|
|
264
|
-
xcss:
|
|
265
|
-
}, /*#__PURE__*/React.createElement(
|
|
258
|
+
xcss: styles.disclosureWrapper
|
|
259
|
+
}, isReadOnly ? /*#__PURE__*/React.createElement(Text, {
|
|
260
|
+
size: "small",
|
|
261
|
+
color: "color.text.subtlest"
|
|
262
|
+
}, formatMessage(messages.aiDisclaimer)) : /*#__PURE__*/React.createElement(TeamsLink, {
|
|
266
263
|
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
267
264
|
intent: "reference",
|
|
268
265
|
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
|
};
|
|
@@ -2,21 +2,13 @@
|
|
|
2
2
|
import "./AgentProfileCardWrapper.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
5
|
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
6
|
var styles = {
|
|
9
|
-
wrapper: "_2rko1mok _1bsb1gwv _bfhk1bhr _16qs130s"
|
|
10
|
-
wrapperLegacy: "_2rko1mok _1bsb1gwv _bfhk1bhr"
|
|
7
|
+
wrapper: "_2rko1mok _1bsb1gwv _bfhk1bhr _16qs130s"
|
|
11
8
|
};
|
|
12
9
|
export var AgentProfileCardWrapper = function AgentProfileCardWrapper(_ref) {
|
|
13
10
|
var children = _ref.children;
|
|
14
|
-
if (expValEquals('platform_editor_agent_mentions', 'isEnabled', true) && fg('platform_editor_agent_mentions_drop_one_fixes') || fg('platform_editor_agent_card_fixes')) {
|
|
15
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
16
|
-
xcss: styles.wrapper
|
|
17
|
-
}, children);
|
|
18
|
-
}
|
|
19
11
|
return /*#__PURE__*/React.createElement(Box, {
|
|
20
|
-
xcss: styles.
|
|
12
|
+
xcss: styles.wrapper
|
|
21
13
|
}, children);
|
|
22
14
|
};
|
|
@@ -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.
|
|
4
|
+
packageVersion: (_process$env$_PACKAGE2 = "27.9.0") !== 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.
|
|
19
|
+
packageVersion: "27.9.0"
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.9.1",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@af/visual-regression": "workspace:^",
|
|
93
93
|
"@atlaskit/flag": "^19.0.0",
|
|
94
94
|
"@atlaskit/inline-edit": "^16.5.0",
|
|
95
|
-
"@atlaskit/section-message": "^10.
|
|
95
|
+
"@atlaskit/section-message": "^10.3.0",
|
|
96
96
|
"@atlaskit/select": "^23.2.0",
|
|
97
97
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
98
98
|
"@atlassian/feature-flags-storybook-utils": "^0.5.0",
|
|
@@ -147,9 +147,6 @@
|
|
|
147
147
|
"platform_editor_agent_mentions_drop_one_fixes": {
|
|
148
148
|
"type": "boolean"
|
|
149
149
|
},
|
|
150
|
-
"platform_editor_agent_card_fixes": {
|
|
151
|
-
"type": "boolean"
|
|
152
|
-
},
|
|
153
150
|
"ptc_a11y_profile_card_text_spacing": {
|
|
154
151
|
"type": "boolean"
|
|
155
152
|
},
|