@atlaskit/profilecard 24.34.5 → 24.35.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 +14 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/components/Agent/Actions.js +4 -3
- package/dist/cjs/components/Agent/AgentProfileCard.js +9 -6
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -2
- package/dist/cjs/components/Agent/ConversationStarters.js +2 -2
- package/dist/cjs/components/Team/TeamProfileCard.js +2 -2
- package/dist/cjs/components/User/ReportingLinesDetails.js +7 -4
- package/dist/cjs/messages.js +5 -0
- package/dist/es2019/components/Agent/Actions.js +2 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +4 -1
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +1 -1
- package/dist/es2019/components/Agent/ConversationStarters.js +1 -1
- package/dist/es2019/components/Team/TeamProfileCard.js +2 -2
- package/dist/es2019/components/User/ReportingLinesDetails.js +7 -4
- package/dist/es2019/messages.js +5 -0
- package/dist/esm/components/Agent/Actions.js +2 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +4 -1
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +1 -1
- package/dist/esm/components/Agent/ConversationStarters.js +1 -1
- package/dist/esm/components/Team/TeamProfileCard.js +2 -2
- package/dist/esm/components/User/ReportingLinesDetails.js +7 -4
- package/dist/esm/messages.js +5 -0
- package/dist/types/client/ProfileCardClient.d.ts +1 -1
- package/dist/types/components/Agent/ConversationStarters.d.ts +1 -1
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/client/ProfileCardClient.d.ts +1 -1
- package/dist/types-ts4.5/components/Agent/ConversationStarters.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +5 -0
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.35.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d4c0aadb058de`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4c0aadb058de) -
|
|
8
|
+
Ran auto fix cross package file refs for platform packages. Part of de-barreling effort of TREX-67
|
|
9
|
+
|
|
10
|
+
## 24.34.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`78e5eb6e30716`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/78e5eb6e30716) -
|
|
15
|
+
Add aria-label to manager section wrapper
|
|
16
|
+
|
|
3
17
|
## 24.34.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -48,9 +48,6 @@
|
|
|
48
48
|
{
|
|
49
49
|
"path": "../../../design-system/empty-state/afm-products/tsconfig.json"
|
|
50
50
|
},
|
|
51
|
-
{
|
|
52
|
-
"path": "../../../measurement/feature-gate-js-client/afm-products/tsconfig.json"
|
|
53
|
-
},
|
|
54
51
|
{
|
|
55
52
|
"path": "../../../team-central/give-kudos/afm-products/tsconfig.json"
|
|
56
53
|
},
|
|
@@ -18,7 +18,8 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
18
18
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
|
-
var
|
|
21
|
+
var _ChatIcon = require("@atlaskit/rovo-agent-components/common/ui/ChatIcon");
|
|
22
|
+
var _AgentDropdownMenu = require("@atlaskit/rovo-agent-components/ui/AgentDropdownMenu");
|
|
22
23
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
23
24
|
var _analytics = require("../../util/analytics");
|
|
24
25
|
var _AgentDeleteConfirmationModal = require("./AgentDeleteConfirmationModal");
|
|
@@ -115,9 +116,9 @@ var AgentActions = exports.AgentActions = function AgentActions(_ref) {
|
|
|
115
116
|
alignBlock: "center"
|
|
116
117
|
}, !(0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
117
118
|
xcss: styles.chatPillIconWrapper
|
|
118
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement(_ChatIcon.ChatPillIcon, null)), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
119
120
|
xcss: styles.chatPillTextStyles
|
|
120
|
-
}, formatMessage(messages.actionChatToAgent)))))), !hideMoreActions && /*#__PURE__*/_react.default.createElement(
|
|
121
|
+
}, formatMessage(messages.actionChatToAgent)))))), !hideMoreActions && /*#__PURE__*/_react.default.createElement(_AgentDropdownMenu.AgentDropdownMenu, {
|
|
121
122
|
agentId: agent.id,
|
|
122
123
|
onDeleteAgent: handleDeleteAgent,
|
|
123
124
|
onEditAgent: onEditAgent,
|
|
@@ -19,7 +19,10 @@ var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/inf
|
|
|
19
19
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
20
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
|
-
var
|
|
22
|
+
var _GeneratedAvatar = require("@atlaskit/rovo-agent-components/ui/agent-avatar/GeneratedAvatar");
|
|
23
|
+
var _AgentStarCount = require("@atlaskit/rovo-agent-components/ui/agent-profile-info/AgentStarCount");
|
|
24
|
+
var _AgentAvatar = require("@atlaskit/rovo-agent-components/ui/AgentAvatar");
|
|
25
|
+
var _AgentProfileInfo = require("@atlaskit/rovo-agent-components/ui/AgentProfileInfo");
|
|
23
26
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
24
27
|
var _analytics = require("../../util/analytics");
|
|
25
28
|
var _performance = require("../../util/performance");
|
|
@@ -183,7 +186,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
183
186
|
var isRovoDev = agent.creator_type === 'ROVO_DEV';
|
|
184
187
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
185
188
|
xcss: styles.cardContainerStyles
|
|
186
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
189
|
+
}, /*#__PURE__*/_react.default.createElement(_GeneratedAvatar.AgentBanner, {
|
|
187
190
|
agentId: agent.id,
|
|
188
191
|
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
189
192
|
height: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? 48 : 96,
|
|
@@ -191,7 +194,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
191
194
|
isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')
|
|
192
195
|
}), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
193
196
|
xcss: styles.avatarStyles
|
|
194
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
197
|
+
}, /*#__PURE__*/_react.default.createElement(_AgentAvatar.AgentAvatar, {
|
|
195
198
|
agentId: agent.id,
|
|
196
199
|
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
197
200
|
agentIdentityAccountId: agent.identity_account_id,
|
|
@@ -204,13 +207,13 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
204
207
|
xcss: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? styles.detailWrapperRefresh : styles.detailWrapper
|
|
205
208
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
206
209
|
xcss: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? styles.agentProfileInfoWrapper : null
|
|
207
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
210
|
+
}, /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileInfo, {
|
|
208
211
|
agentName: agent.name,
|
|
209
212
|
isStarred: isStarred,
|
|
210
213
|
onStarToggle: handleSetFavourite,
|
|
211
214
|
showStarButton: !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')),
|
|
212
215
|
isHidden: agent.visibility === 'PRIVATE',
|
|
213
|
-
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(
|
|
216
|
+
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileCreator, {
|
|
214
217
|
creator: {
|
|
215
218
|
type: (_agent$creatorInfo2 = agent.creatorInfo) === null || _agent$creatorInfo2 === void 0 ? void 0 : _agent$creatorInfo2.type,
|
|
216
219
|
name: ((_agent$creatorInfo3 = agent.creatorInfo) === null || _agent$creatorInfo3 === void 0 ? void 0 : _agent$creatorInfo3.name) || '',
|
|
@@ -219,7 +222,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
219
222
|
isLoading: false,
|
|
220
223
|
onCreatorLinkClick: function onCreatorLinkClick() {}
|
|
221
224
|
}),
|
|
222
|
-
starCountRender: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? null : /*#__PURE__*/_react.default.createElement(
|
|
225
|
+
starCountRender: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? null : /*#__PURE__*/_react.default.createElement(_AgentStarCount.AgentStarCount, {
|
|
223
226
|
starCount: starCount,
|
|
224
227
|
isLoading: false
|
|
225
228
|
}),
|
|
@@ -12,7 +12,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
-
var
|
|
15
|
+
var _AgentProfileInfo = require("@atlaskit/rovo-agent-components/ui/AgentProfileInfo");
|
|
16
16
|
var _navigation = require("@atlaskit/teams-app-config/navigation");
|
|
17
17
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
18
18
|
var _rovoAgentUtils = require("../../util/rovoAgentUtils");
|
|
@@ -139,7 +139,7 @@ var AgentProfileCardResourced = exports.AgentProfileCardResourced = function Age
|
|
|
139
139
|
case 5:
|
|
140
140
|
userCreatorInfo = _context2.sent;
|
|
141
141
|
case 6:
|
|
142
|
-
creatorInfo = (0,
|
|
142
|
+
creatorInfo = (0, _AgentProfileInfo.getAgentCreator)({
|
|
143
143
|
creatorType: creator_type !== null && creator_type !== void 0 ? creator_type : '',
|
|
144
144
|
authoringTeam: authoringTeam ? {
|
|
145
145
|
displayName: (_authoringTeam$displa2 = authoringTeam.displayName) !== null && _authoringTeam$displa2 !== void 0 ? _authoringTeam$displa2 : '',
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ConversationStarters = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
10
|
-
var
|
|
10
|
+
var _AgentConversationStarters = require("@atlaskit/rovo-agent-components/ui/AgentConversationStarters");
|
|
11
11
|
var ConversationStarters = exports.ConversationStarters = function ConversationStarters(_ref) {
|
|
12
12
|
var isAgentDefault = _ref.isAgentDefault,
|
|
13
13
|
onConversationStarterClick = _ref.onConversationStarterClick,
|
|
@@ -18,7 +18,7 @@ var ConversationStarters = exports.ConversationStarters = function ConversationS
|
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
19
19
|
space: "space.050",
|
|
20
20
|
alignInline: "start"
|
|
21
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement(_AgentConversationStarters.AgentConversationStarters, {
|
|
22
22
|
isAgentDefault: isAgentDefault,
|
|
23
23
|
onConversationStarterClick: handleConversationStarterClick,
|
|
24
24
|
userDefinedConversationStarters: userDefinedConversationStarters
|
|
@@ -12,10 +12,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
|
+
var _atlassianContext = require("@atlaskit/atlassian-context");
|
|
15
16
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
16
17
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
17
18
|
var _new = _interopRequireWildcard(require("@atlaskit/button/new"));
|
|
18
|
-
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
19
19
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
20
20
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
21
21
|
var _menu = require("@atlaskit/menu");
|
|
@@ -308,7 +308,7 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
|
|
|
308
308
|
viewProfileLink = _ref5.viewProfileLink,
|
|
309
309
|
viewProfileOnClick = _ref5.viewProfileOnClick,
|
|
310
310
|
isTriggeredByKeyboard = _ref5.isTriggeredByKeyboard;
|
|
311
|
-
var newTeamProfileEnabled =
|
|
311
|
+
var newTeamProfileEnabled = !(0, _atlassianContext.isFedRamp)() || (0, _platformFeatureFlags.fg)('new_team_profile_fedramp');
|
|
312
312
|
var isTeamArchived = team.state === 'DISBANDED' && newTeamProfileEnabled;
|
|
313
313
|
var allActions = [{
|
|
314
314
|
label: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.teamViewProfile),
|
|
@@ -32,7 +32,7 @@ var styles = {
|
|
|
32
32
|
};
|
|
33
33
|
var avatarGroupMaxCount = 5;
|
|
34
34
|
var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
35
|
-
var _manager$pii, _manager$pii2;
|
|
35
|
+
var _manager$pii, _manager$pii2, _manager$pii3;
|
|
36
36
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
37
37
|
formatMessage = _useIntl.formatMessage;
|
|
38
38
|
var fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
|
|
@@ -108,11 +108,14 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
108
108
|
return onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl));
|
|
109
109
|
},
|
|
110
110
|
isDisabled: !onReportingLinesClick,
|
|
111
|
-
xcss: styles.reportingLinesButton
|
|
111
|
+
xcss: styles.reportingLinesButton,
|
|
112
|
+
"aria-label": formatMessage(_messages.default.viewManagerProfile, {
|
|
113
|
+
name: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.name
|
|
114
|
+
})
|
|
112
115
|
}, /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerSection, null, /*#__PURE__*/_react.default.createElement(_avatar.default, {
|
|
113
116
|
size: "xsmall",
|
|
114
|
-
src: (_manager$
|
|
115
|
-
}), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$
|
|
117
|
+
src: (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.picture
|
|
118
|
+
}), /*#__PURE__*/_react.default.createElement(_ReportingLines.ManagerName, null, (_manager$pii3 = manager.pii) === null || _manager$pii3 === void 0 ? void 0 : _manager$pii3.name))))), hasReports && /*#__PURE__*/_react.default.createElement(_ReportingLines.ReportingLinesSection, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
116
119
|
xcss: styles.reportingLinesHeadingDefaultStyles
|
|
117
120
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.default.directReportsSectionHeading)), /*#__PURE__*/_react.default.createElement(_avatarGroup.default, {
|
|
118
121
|
appearance: "stack",
|
package/dist/cjs/messages.js
CHANGED
|
@@ -231,6 +231,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
231
231
|
id: 'pt.profile-card.bot-account.label',
|
|
232
232
|
defaultMessage: 'APP',
|
|
233
233
|
description: 'Label to indicate that the user is a bot account'
|
|
234
|
+
},
|
|
235
|
+
viewManagerProfile: {
|
|
236
|
+
id: 'pt.profile-card.view-manager-profile',
|
|
237
|
+
defaultMessage: 'View {name} profile',
|
|
238
|
+
description: "Accessible label for the button to view the manager's profile"
|
|
234
239
|
}
|
|
235
240
|
});
|
|
236
241
|
var _default = exports.default = messages;
|
|
@@ -7,7 +7,8 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import {
|
|
10
|
+
import { ChatPillIcon } from '@atlaskit/rovo-agent-components/common/ui/ChatIcon';
|
|
11
|
+
import { AgentDropdownMenu } from '@atlaskit/rovo-agent-components/ui/AgentDropdownMenu';
|
|
11
12
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
12
13
|
import { fireEvent } from '../../util/analytics';
|
|
13
14
|
import { AgentDeleteConfirmationModal } from './AgentDeleteConfirmationModal';
|
|
@@ -7,7 +7,10 @@ import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
|
|
|
7
7
|
import Link from '@atlaskit/link';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Box, Flex, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import {
|
|
10
|
+
import { AgentBanner } from '@atlaskit/rovo-agent-components/ui/agent-avatar/GeneratedAvatar';
|
|
11
|
+
import { AgentStarCount } from '@atlaskit/rovo-agent-components/ui/agent-profile-info/AgentStarCount';
|
|
12
|
+
import { AgentAvatar } from '@atlaskit/rovo-agent-components/ui/AgentAvatar';
|
|
13
|
+
import { AgentProfileCreator, AgentProfileInfo } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
11
14
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
12
15
|
import { PACKAGE_META_DATA } from '../../util/analytics';
|
|
13
16
|
import { getPageTime } from '../../util/performance';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Suspense, useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { getAgentCreator } from '@atlaskit/rovo-agent-components';
|
|
3
|
+
import { getAgentCreator } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
4
4
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
5
5
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
6
6
|
import { getAAIDFromARI } from '../../util/rovoAgentUtils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
3
|
-
import { AgentConversationStarters } from '@atlaskit/rovo-agent-components';
|
|
3
|
+
import { AgentConversationStarters } from '@atlaskit/rovo-agent-components/ui/AgentConversationStarters';
|
|
4
4
|
export const ConversationStarters = ({
|
|
5
5
|
isAgentDefault,
|
|
6
6
|
onConversationStarterClick,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
|
+
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
4
5
|
import Avatar from '@atlaskit/avatar';
|
|
5
6
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
6
7
|
import Button, { IconButton, LinkButton } from '@atlaskit/button/new';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
8
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
9
9
|
import Lozenge from '@atlaskit/lozenge';
|
|
10
10
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
@@ -272,7 +272,7 @@ const TeamProfilecardContent = ({
|
|
|
272
272
|
viewProfileOnClick,
|
|
273
273
|
isTriggeredByKeyboard
|
|
274
274
|
}) => {
|
|
275
|
-
const newTeamProfileEnabled =
|
|
275
|
+
const newTeamProfileEnabled = !isFedRamp() || fg('new_team_profile_fedramp');
|
|
276
276
|
const isTeamArchived = team.state === 'DISBANDED' && newTeamProfileEnabled;
|
|
277
277
|
const allActions = [{
|
|
278
278
|
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.teamViewProfile),
|
|
@@ -22,7 +22,7 @@ const styles = {
|
|
|
22
22
|
};
|
|
23
23
|
const avatarGroupMaxCount = 5;
|
|
24
24
|
const ReportingLinesDetails = props => {
|
|
25
|
-
var _manager$pii, _manager$pii2;
|
|
25
|
+
var _manager$pii, _manager$pii2, _manager$pii3;
|
|
26
26
|
const {
|
|
27
27
|
formatMessage
|
|
28
28
|
} = useIntl();
|
|
@@ -90,11 +90,14 @@ const ReportingLinesDetails = props => {
|
|
|
90
90
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.managerSectionHeading)), /*#__PURE__*/React.createElement(OffsetWrapper, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
91
91
|
onClick: () => onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl)),
|
|
92
92
|
isDisabled: !onReportingLinesClick,
|
|
93
|
-
xcss: styles.reportingLinesButton
|
|
93
|
+
xcss: styles.reportingLinesButton,
|
|
94
|
+
"aria-label": formatMessage(messages.viewManagerProfile, {
|
|
95
|
+
name: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.name
|
|
96
|
+
})
|
|
94
97
|
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
95
98
|
size: "xsmall",
|
|
96
|
-
src: (_manager$
|
|
97
|
-
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$
|
|
99
|
+
src: (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.picture
|
|
100
|
+
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii3 = manager.pii) === null || _manager$pii3 === void 0 ? void 0 : _manager$pii3.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
98
101
|
xcss: styles.reportingLinesHeadingDefaultStyles
|
|
99
102
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.directReportsSectionHeading)), /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
100
103
|
appearance: "stack",
|
package/dist/es2019/messages.js
CHANGED
|
@@ -225,6 +225,11 @@ const messages = defineMessages({
|
|
|
225
225
|
id: 'pt.profile-card.bot-account.label',
|
|
226
226
|
defaultMessage: 'APP',
|
|
227
227
|
description: 'Label to indicate that the user is a bot account'
|
|
228
|
+
},
|
|
229
|
+
viewManagerProfile: {
|
|
230
|
+
id: 'pt.profile-card.view-manager-profile',
|
|
231
|
+
defaultMessage: 'View {name} profile',
|
|
232
|
+
description: "Accessible label for the button to view the manager's profile"
|
|
228
233
|
}
|
|
229
234
|
});
|
|
230
235
|
export default messages;
|
|
@@ -10,7 +10,8 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
10
10
|
import Button from '@atlaskit/button/new';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
13
|
-
import {
|
|
13
|
+
import { ChatPillIcon } from '@atlaskit/rovo-agent-components/common/ui/ChatIcon';
|
|
14
|
+
import { AgentDropdownMenu } from '@atlaskit/rovo-agent-components/ui/AgentDropdownMenu';
|
|
14
15
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
15
16
|
import { fireEvent } from '../../util/analytics';
|
|
16
17
|
import { AgentDeleteConfirmationModal } from './AgentDeleteConfirmationModal';
|
|
@@ -13,7 +13,10 @@ import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
|
|
|
13
13
|
import Link from '@atlaskit/link';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { Box, Flex, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
16
|
-
import {
|
|
16
|
+
import { AgentBanner } from '@atlaskit/rovo-agent-components/ui/agent-avatar/GeneratedAvatar';
|
|
17
|
+
import { AgentStarCount } from '@atlaskit/rovo-agent-components/ui/agent-profile-info/AgentStarCount';
|
|
18
|
+
import { AgentAvatar } from '@atlaskit/rovo-agent-components/ui/AgentAvatar';
|
|
19
|
+
import { AgentProfileCreator, AgentProfileInfo } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
17
20
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
18
21
|
import { PACKAGE_META_DATA } from '../../util/analytics';
|
|
19
22
|
import { getPageTime } from '../../util/performance';
|
|
@@ -6,7 +6,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { Suspense, useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { getAgentCreator } from '@atlaskit/rovo-agent-components';
|
|
9
|
+
import { getAgentCreator } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
10
10
|
import { navigateToTeamsApp } from '@atlaskit/teams-app-config/navigation';
|
|
11
11
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
12
12
|
import { getAAIDFromARI } from '../../util/rovoAgentUtils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
3
|
-
import { AgentConversationStarters } from '@atlaskit/rovo-agent-components';
|
|
3
|
+
import { AgentConversationStarters } from '@atlaskit/rovo-agent-components/ui/AgentConversationStarters';
|
|
4
4
|
export var ConversationStarters = function ConversationStarters(_ref) {
|
|
5
5
|
var isAgentDefault = _ref.isAgentDefault,
|
|
6
6
|
onConversationStarterClick = _ref.onConversationStarterClick,
|
|
@@ -6,10 +6,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
8
8
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
9
|
+
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
9
10
|
import Avatar from '@atlaskit/avatar';
|
|
10
11
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
12
|
import Button, { IconButton, LinkButton } from '@atlaskit/button/new';
|
|
12
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
13
13
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
14
14
|
import Lozenge from '@atlaskit/lozenge';
|
|
15
15
|
import { LinkItem, MenuGroup } from '@atlaskit/menu';
|
|
@@ -299,7 +299,7 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
|
|
|
299
299
|
viewProfileLink = _ref5.viewProfileLink,
|
|
300
300
|
viewProfileOnClick = _ref5.viewProfileOnClick,
|
|
301
301
|
isTriggeredByKeyboard = _ref5.isTriggeredByKeyboard;
|
|
302
|
-
var newTeamProfileEnabled =
|
|
302
|
+
var newTeamProfileEnabled = !isFedRamp() || fg('new_team_profile_fedramp');
|
|
303
303
|
var isTeamArchived = team.state === 'DISBANDED' && newTeamProfileEnabled;
|
|
304
304
|
var allActions = [{
|
|
305
305
|
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.teamViewProfile),
|
|
@@ -25,7 +25,7 @@ var styles = {
|
|
|
25
25
|
};
|
|
26
26
|
var avatarGroupMaxCount = 5;
|
|
27
27
|
var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
28
|
-
var _manager$pii, _manager$pii2;
|
|
28
|
+
var _manager$pii, _manager$pii2, _manager$pii3;
|
|
29
29
|
var _useIntl = useIntl(),
|
|
30
30
|
formatMessage = _useIntl.formatMessage;
|
|
31
31
|
var fireAnalyticsWithDuration = props.fireAnalyticsWithDuration,
|
|
@@ -101,11 +101,14 @@ var ReportingLinesDetails = function ReportingLinesDetails(props) {
|
|
|
101
101
|
return onReportingLinksClick(manager, 'manager', getProfileHref(manager.accountIdentifier, reportingLinesProfileUrl));
|
|
102
102
|
},
|
|
103
103
|
isDisabled: !onReportingLinesClick,
|
|
104
|
-
xcss: styles.reportingLinesButton
|
|
104
|
+
xcss: styles.reportingLinesButton,
|
|
105
|
+
"aria-label": formatMessage(messages.viewManagerProfile, {
|
|
106
|
+
name: (_manager$pii = manager.pii) === null || _manager$pii === void 0 ? void 0 : _manager$pii.name
|
|
107
|
+
})
|
|
105
108
|
}, /*#__PURE__*/React.createElement(ManagerSection, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
106
109
|
size: "xsmall",
|
|
107
|
-
src: (_manager$
|
|
108
|
-
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$
|
|
110
|
+
src: (_manager$pii2 = manager.pii) === null || _manager$pii2 === void 0 ? void 0 : _manager$pii2.picture
|
|
111
|
+
}), /*#__PURE__*/React.createElement(ManagerName, null, (_manager$pii3 = manager.pii) === null || _manager$pii3 === void 0 ? void 0 : _manager$pii3.name))))), hasReports && /*#__PURE__*/React.createElement(ReportingLinesSection, null, /*#__PURE__*/React.createElement(Box, {
|
|
109
112
|
xcss: styles.reportingLinesHeadingDefaultStyles
|
|
110
113
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.directReportsSectionHeading)), /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
111
114
|
appearance: "stack",
|
package/dist/esm/messages.js
CHANGED
|
@@ -225,6 +225,11 @@ var messages = defineMessages({
|
|
|
225
225
|
id: 'pt.profile-card.bot-account.label',
|
|
226
226
|
defaultMessage: 'APP',
|
|
227
227
|
description: 'Label to indicate that the user is a bot account'
|
|
228
|
+
},
|
|
229
|
+
viewManagerProfile: {
|
|
230
|
+
id: 'pt.profile-card.view-manager-profile',
|
|
231
|
+
defaultMessage: 'View {name} profile',
|
|
232
|
+
description: "Accessible label for the button to view the manager's profile"
|
|
228
233
|
}
|
|
229
234
|
});
|
|
230
235
|
export default messages;
|
|
@@ -16,7 +16,7 @@ declare class ProfileCardClient implements ProfileClient {
|
|
|
16
16
|
constructor(config: ProfileClientOptions, clients?: ClientOverrides);
|
|
17
17
|
flushCache(): void;
|
|
18
18
|
getProfile(cloudId: string, userId: string, analytics?: FireEventType): Promise<any>;
|
|
19
|
-
getTeamProfile(teamId: string, orgId?: string, analytics?: FireEventType): Promise<import("
|
|
19
|
+
getTeamProfile(teamId: string, orgId?: string, analytics?: FireEventType): Promise<import("..").Team>;
|
|
20
20
|
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
21
21
|
getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
|
|
22
22
|
shouldShowGiveKudos(): Promise<boolean>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AgentConversationStartersProps } from '@atlaskit/rovo-agent-components';
|
|
2
|
+
import { type AgentConversationStartersProps } from '@atlaskit/rovo-agent-components/ui/AgentConversationStarters';
|
|
3
3
|
export declare const ConversationStarters: ({ isAgentDefault, onConversationStarterClick, userDefinedConversationStarters, }: AgentConversationStartersProps) => React.JSX.Element;
|
package/dist/types/messages.d.ts
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type IntlShape } from 'react-intl-next';
|
|
3
3
|
import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { type ConversationStarter } from '@atlaskit/rovo-agent-components';
|
|
4
|
+
import { type ConversationStarter } from '@atlaskit/rovo-agent-components/ui/AgentConversationStarters';
|
|
5
5
|
import type { AnalyticsEventAttributes, FireEventType, useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
6
6
|
import { type TeamCentralScopes } from './client/ProfileCardClient';
|
|
7
7
|
import type RovoAgentCardClient from './client/RovoAgentCardClient';
|
|
@@ -16,7 +16,7 @@ declare class ProfileCardClient implements ProfileClient {
|
|
|
16
16
|
constructor(config: ProfileClientOptions, clients?: ClientOverrides);
|
|
17
17
|
flushCache(): void;
|
|
18
18
|
getProfile(cloudId: string, userId: string, analytics?: FireEventType): Promise<any>;
|
|
19
|
-
getTeamProfile(teamId: string, orgId?: string, analytics?: FireEventType): Promise<import("
|
|
19
|
+
getTeamProfile(teamId: string, orgId?: string, analytics?: FireEventType): Promise<import("..").Team>;
|
|
20
20
|
getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
|
|
21
21
|
getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
|
|
22
22
|
shouldShowGiveKudos(): Promise<boolean>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AgentConversationStartersProps } from '@atlaskit/rovo-agent-components';
|
|
2
|
+
import { type AgentConversationStartersProps } from '@atlaskit/rovo-agent-components/ui/AgentConversationStarters';
|
|
3
3
|
export declare const ConversationStarters: ({ isAgentDefault, onConversationStarterClick, userDefinedConversationStarters, }: AgentConversationStartersProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type IntlShape } from 'react-intl-next';
|
|
3
3
|
import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { type ConversationStarter } from '@atlaskit/rovo-agent-components';
|
|
4
|
+
import { type ConversationStarter } from '@atlaskit/rovo-agent-components/ui/AgentConversationStarters';
|
|
5
5
|
import type { AnalyticsEventAttributes, FireEventType, useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
6
6
|
import { type TeamCentralScopes } from './client/ProfileCardClient';
|
|
7
7
|
import type RovoAgentCardClient from './client/RovoAgentCardClient';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.35.0",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,9 +48,8 @@
|
|
|
48
48
|
"@atlaskit/css": "^0.19.0",
|
|
49
49
|
"@atlaskit/dropdown-menu": "^16.4.0",
|
|
50
50
|
"@atlaskit/empty-state": "^10.1.0",
|
|
51
|
-
"@atlaskit/
|
|
52
|
-
"@atlaskit/
|
|
53
|
-
"@atlaskit/heading": "^5.2.0",
|
|
51
|
+
"@atlaskit/give-kudos": "^4.9.0",
|
|
52
|
+
"@atlaskit/heading": "^5.3.0",
|
|
54
53
|
"@atlaskit/icon": "^30.0.0",
|
|
55
54
|
"@atlaskit/link": "3.3.3",
|
|
56
55
|
"@atlaskit/lozenge": "^13.4.0",
|
|
@@ -61,8 +60,8 @@
|
|
|
61
60
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
62
61
|
"@atlaskit/popup": "^4.13.0",
|
|
63
62
|
"@atlaskit/primitives": "^18.0.0",
|
|
64
|
-
"@atlaskit/rovo-agent-components": "^3.
|
|
65
|
-
"@atlaskit/rovo-triggers": "^5.
|
|
63
|
+
"@atlaskit/rovo-agent-components": "^3.31.0",
|
|
64
|
+
"@atlaskit/rovo-triggers": "^5.11.0",
|
|
66
65
|
"@atlaskit/spinner": "^19.0.0",
|
|
67
66
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
68
67
|
"@atlaskit/teams-app-internal-analytics": "^1.24.0",
|
|
@@ -87,7 +86,8 @@
|
|
|
87
86
|
},
|
|
88
87
|
"devDependencies": {
|
|
89
88
|
"@af/visual-regression": "workspace:^",
|
|
90
|
-
"@
|
|
89
|
+
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
90
|
+
"@atlassian/a11y-jest-testing": "^0.9.0",
|
|
91
91
|
"@atlassian/feature-flags-storybook-utils": "^0.3.0",
|
|
92
92
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
93
93
|
"@atlassian/platform-storybook-helpers": "^0.1.0",
|
|
@@ -180,6 +180,9 @@
|
|
|
180
180
|
},
|
|
181
181
|
"rovo_agent_show_creator_on_profile_card_fix": {
|
|
182
182
|
"type": "boolean"
|
|
183
|
+
},
|
|
184
|
+
"new_team_profile_fedramp": {
|
|
185
|
+
"type": "boolean"
|
|
183
186
|
}
|
|
184
187
|
},
|
|
185
188
|
"sideEffects": [
|