@atlaskit/profilecard 27.9.0 → 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 +8 -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 +8 -16
- 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 +8 -16
- 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 +8 -16
- 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/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 27.9.0
|
|
4
12
|
|
|
5
13
|
### Minor 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;
|
|
@@ -216,13 +212,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
216
212
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
217
213
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
218
214
|
var isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
219
|
-
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !
|
|
215
|
+
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideConversationStarters;
|
|
220
216
|
var shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
221
|
-
|
|
222
|
-
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
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'));
|
|
224
217
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
225
|
-
xcss:
|
|
218
|
+
xcss: styles.cardContainerStyles
|
|
226
219
|
}, /*#__PURE__*/_react.default.createElement(_GeneratedAvatar.AgentBanner, {
|
|
227
220
|
agentId: agent.id,
|
|
228
221
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
@@ -241,8 +234,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
241
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',
|
|
242
235
|
forgeAgentIconUrl: agent.icon
|
|
243
236
|
})), /*#__PURE__*/_react.default.createElement(_stack.Stack, {
|
|
244
|
-
space:
|
|
245
|
-
xcss: (0, _css.cx)(styles.detailWrapper,
|
|
237
|
+
space: "space.150",
|
|
238
|
+
xcss: (0, _css.cx)(styles.detailWrapper, hideAgentActions && styles.detailWrapperPreviewBottomPadding)
|
|
246
239
|
}, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
247
240
|
xcss: styles.agentProfileInfoWrapper
|
|
248
241
|
}, /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileInfo, {
|
|
@@ -261,9 +254,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
261
254
|
onCreatorLinkClick: function onCreatorLinkClick() {},
|
|
262
255
|
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
263
256
|
}),
|
|
264
|
-
starCountRender: null
|
|
265
|
-
|
|
266
|
-
})), !!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, {
|
|
267
259
|
xcss: styles.descriptionWrapper
|
|
268
260
|
}, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
269
261
|
xcss: styles.description,
|
|
@@ -272,7 +264,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
272
264
|
alignItems: "start",
|
|
273
265
|
direction: "column",
|
|
274
266
|
gap: "space.050",
|
|
275
|
-
xcss:
|
|
267
|
+
xcss: styles.disclosureWrapper
|
|
276
268
|
}, isReadOnly ? /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
277
269
|
size: "small",
|
|
278
270
|
color: "color.text.subtlest"
|
|
@@ -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,
|
|
@@ -163,13 +159,10 @@ const AgentProfileCard = ({
|
|
|
163
159
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
164
160
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
165
161
|
const isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
166
|
-
const shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !
|
|
162
|
+
const shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideConversationStarters;
|
|
167
163
|
const shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
168
|
-
|
|
169
|
-
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
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'));
|
|
171
164
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
172
|
-
xcss:
|
|
165
|
+
xcss: styles.cardContainerStyles
|
|
173
166
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
174
167
|
agentId: agent.id,
|
|
175
168
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
@@ -188,8 +181,8 @@ const AgentProfileCard = ({
|
|
|
188
181
|
isForgeAgent: fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
189
182
|
forgeAgentIconUrl: agent.icon
|
|
190
183
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
191
|
-
space:
|
|
192
|
-
xcss: cx(styles.detailWrapper,
|
|
184
|
+
space: "space.150",
|
|
185
|
+
xcss: cx(styles.detailWrapper, hideAgentActions && styles.detailWrapperPreviewBottomPadding)
|
|
193
186
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
194
187
|
xcss: styles.agentProfileInfoWrapper
|
|
195
188
|
}, /*#__PURE__*/React.createElement(AgentProfileInfo, {
|
|
@@ -208,9 +201,8 @@ const AgentProfileCard = ({
|
|
|
208
201
|
onCreatorLinkClick: () => {},
|
|
209
202
|
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
210
203
|
}),
|
|
211
|
-
starCountRender: null
|
|
212
|
-
|
|
213
|
-
})), !!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, {
|
|
214
206
|
xcss: styles.descriptionWrapper
|
|
215
207
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
216
208
|
xcss: styles.description,
|
|
@@ -219,7 +211,7 @@ const AgentProfileCard = ({
|
|
|
219
211
|
alignItems: "start",
|
|
220
212
|
direction: "column",
|
|
221
213
|
gap: "space.050",
|
|
222
|
-
xcss:
|
|
214
|
+
xcss: styles.disclosureWrapper
|
|
223
215
|
}, isReadOnly ? /*#__PURE__*/React.createElement(Text, {
|
|
224
216
|
size: "small",
|
|
225
217
|
color: "color.text.subtlest"
|
|
@@ -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;
|
|
@@ -207,13 +203,10 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
207
203
|
// Both Jira Coding Agent and Rovo Dev do not support conversations and chat.
|
|
208
204
|
// They share the same creator_type ('ROVO_DEV') but have different display names.
|
|
209
205
|
var isRovoDevOrJiraCodingAgent = isRovoDev || agent.creator_type === 'ROVO_DEV' && agent.name.toLowerCase() === 'jira coding agent';
|
|
210
|
-
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !
|
|
206
|
+
var shouldShowConversationStarters = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideConversationStarters;
|
|
211
207
|
var shouldShowAgentActions = !isReadOnly && !isRovoDevOrJiraCodingAgent && !hideAgentActions;
|
|
212
|
-
|
|
213
|
-
// Only for M1 hideAgentActions preview cards so other consumers stay unchanged.
|
|
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'));
|
|
215
208
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
216
|
-
xcss:
|
|
209
|
+
xcss: styles.cardContainerStyles
|
|
217
210
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
218
211
|
agentId: agent.id,
|
|
219
212
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
@@ -232,8 +225,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
232
225
|
isForgeAgent: fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
233
226
|
forgeAgentIconUrl: agent.icon
|
|
234
227
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
235
|
-
space:
|
|
236
|
-
xcss: cx(styles.detailWrapper,
|
|
228
|
+
space: "space.150",
|
|
229
|
+
xcss: cx(styles.detailWrapper, hideAgentActions && styles.detailWrapperPreviewBottomPadding)
|
|
237
230
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
238
231
|
xcss: styles.agentProfileInfoWrapper
|
|
239
232
|
}, /*#__PURE__*/React.createElement(AgentProfileInfo, {
|
|
@@ -252,9 +245,8 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
252
245
|
onCreatorLinkClick: function onCreatorLinkClick() {},
|
|
253
246
|
showCreatorNameWithoutLink: isReadOnly || showCreatorNameWithoutLink
|
|
254
247
|
}),
|
|
255
|
-
starCountRender: null
|
|
256
|
-
|
|
257
|
-
})), !!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, {
|
|
258
250
|
xcss: styles.descriptionWrapper
|
|
259
251
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
260
252
|
xcss: styles.description,
|
|
@@ -263,7 +255,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
263
255
|
alignItems: "start",
|
|
264
256
|
direction: "column",
|
|
265
257
|
gap: "space.050",
|
|
266
|
-
xcss:
|
|
258
|
+
xcss: styles.disclosureWrapper
|
|
267
259
|
}, isReadOnly ? /*#__PURE__*/React.createElement(Text, {
|
|
268
260
|
size: "small",
|
|
269
261
|
color: "color.text.subtlest"
|
|
@@ -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
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "27.9.
|
|
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
|
},
|