@atlaskit/profilecard 24.30.2 → 24.32.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/afm-jira/tsconfig.json +1 -1
  3. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  4. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  5. package/dist/cjs/components/Agent/AgentProfileCard.js +7 -3
  6. package/dist/cjs/components/User/ProfileCard.js +12 -4
  7. package/dist/cjs/components/User/ProfileCardResourced.js +2 -1
  8. package/dist/cjs/messages.js +10 -0
  9. package/dist/cjs/styled/UserTrigger.js +4 -2
  10. package/dist/cjs/util/analytics.js +2 -2
  11. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  12. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  13. package/dist/es2019/components/Agent/AgentProfileCard.js +7 -3
  14. package/dist/es2019/components/User/ProfileCard.js +13 -5
  15. package/dist/es2019/components/User/ProfileCardResourced.js +2 -1
  16. package/dist/es2019/messages.js +10 -0
  17. package/dist/es2019/styled/UserTrigger.js +4 -2
  18. package/dist/es2019/util/analytics.js +2 -2
  19. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  20. package/dist/esm/client/getTeamFromAGG.js +1 -1
  21. package/dist/esm/components/Agent/AgentProfileCard.js +7 -3
  22. package/dist/esm/components/User/ProfileCard.js +13 -5
  23. package/dist/esm/components/User/ProfileCardResourced.js +2 -1
  24. package/dist/esm/messages.js +10 -0
  25. package/dist/esm/styled/UserTrigger.js +4 -2
  26. package/dist/esm/util/analytics.js +2 -2
  27. package/dist/types/components/User/ProfileCardResourced.d.ts +10 -10
  28. package/dist/types/messages.d.ts +10 -0
  29. package/dist/types/styled/UserTrigger.d.ts +2 -1
  30. package/dist/types/types.d.ts +1 -1
  31. package/dist/types-ts4.5/components/User/ProfileCardResourced.d.ts +10 -10
  32. package/dist/types-ts4.5/messages.d.ts +10 -0
  33. package/dist/types-ts4.5/styled/UserTrigger.d.ts +2 -1
  34. package/dist/types-ts4.5/types.d.ts +1 -1
  35. package/package.json +11 -4
  36. package/stories/agent-profilecard.stories.tsx +112 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 24.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`94416ff80721d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/94416ff80721d) -
8
+ Add aria-dialog-name for profile card component
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 24.31.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`04077f2897e0e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/04077f2897e0e) -
19
+ [ux] Changing the UI for the user identity profile card when the user is the Rovo Dev agent.
20
+ Change is feature gated.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 24.30.2
4
27
 
5
28
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
2
+ "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
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', "0.0.0-development");
14
+ headers.append('atl-client-version', "24.31.0");
15
15
  return headers;
16
16
  };
17
17
  function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
66
66
  headers.append('X-ExperimentalApi', 'teams-beta');
67
67
  headers.append('X-ExperimentalApi', 'team-members-beta');
68
68
  headers.append('atl-client-name', "@atlaskit/profilecard");
69
- headers.append('atl-client-version', "0.0.0-development");
69
+ headers.append('atl-client-version', "24.31.0");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -188,13 +188,15 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
188
188
  fireAnalytics: fireAnalytics
189
189
  }));
190
190
  }
191
+ var isRovoDev = agent.creator_type === 'ROVO_DEV';
191
192
  return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
192
193
  xcss: styles.cardContainerStyles
193
194
  }, /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentBanner, {
194
195
  agentId: agent.id,
195
196
  agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
196
197
  height: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? 48 : 96,
197
- agentIdentityAccountId: agent.identity_account_id
198
+ agentIdentityAccountId: agent.identity_account_id,
199
+ isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')
198
200
  }), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
199
201
  xcss: styles.avatarStyles
200
202
  }, /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentAvatar, {
@@ -202,6 +204,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
202
204
  agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
203
205
  agentIdentityAccountId: agent.identity_account_id,
204
206
  size: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? 'large' : 'xlarge',
207
+ isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card'),
205
208
  isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
206
209
  forgeAgentIconUrl: agent.icon
207
210
  })), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
@@ -213,6 +216,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
213
216
  agentName: agent.name,
214
217
  isStarred: isStarred,
215
218
  onStarToggle: handleSetFavourite,
219
+ showStarButton: !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')),
216
220
  isHidden: agent.visibility === 'PRIVATE',
217
221
  creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentProfileCreator, {
218
222
  creator: {
@@ -228,7 +232,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
228
232
  isLoading: false
229
233
  }),
230
234
  agentDescription: agent.description
231
- })), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
235
+ })), !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')) && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
232
236
  xcss: (0, _platformFeatureFlags.fg)('rovo_agent_empty_state_refresh') ? styles.conversationStartersWrapper : null
233
237
  }, /*#__PURE__*/_react.default.createElement(_ConversationStarters.ConversationStarters, {
234
238
  isAgentDefault: agent.is_default,
@@ -239,7 +243,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
239
243
  prompt: conversationStarter.message
240
244
  });
241
245
  }
242
- }))), /*#__PURE__*/_react.default.createElement(_Actions.AgentActions, {
246
+ }))), !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')) && /*#__PURE__*/_react.default.createElement(_Actions.AgentActions, {
243
247
  agent: agent,
244
248
  onEditAgent: function onEditAgent() {
245
249
  return _onEditAgent(agent.id);
@@ -64,13 +64,15 @@ var Wrapper = function Wrapper(props) {
64
64
  return /*#__PURE__*/_react.default.createElement(_UserTrigger.CardWrapper, {
65
65
  testId: "profilecard",
66
66
  role: "dialog",
67
- labelledBy: "profilecard-name-label"
67
+ labelledBy: props.labelledBy,
68
+ ariaLabel: props.ariaLabel
68
69
  }, props.children);
69
70
  };
70
71
  var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInternal(props) {
71
72
  var _useState = (0, _react.useState)((0, _performance.getPageTime)()),
72
73
  _useState2 = (0, _slicedToArray2.default)(_useState, 1),
73
74
  openTime = _useState2[0];
75
+ var intl = (0, _reactIntlNext.useIntl)();
74
76
  var createAnalyticsEvent = props.createAnalyticsEvent;
75
77
  var _useAnalyticsEvents = (0, _teamsAppInternalAnalytics.useAnalyticsEvents)(),
76
78
  fireEventNext = _useAnalyticsEvents.fireEvent;
@@ -128,7 +130,9 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
128
130
  }
129
131
  }, [canRender, fireAnalyticsWithDuration, fireAnalyticsWithDurationNext, realActions]);
130
132
  if (hasError) {
131
- return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_Error.ErrorMessage, {
133
+ return /*#__PURE__*/_react.default.createElement(Wrapper, {
134
+ ariaLabel: intl.formatMessage(_messages.default.errorDialogLabel)
135
+ }, /*#__PURE__*/_react.default.createElement(_Error.ErrorMessage, {
132
136
  reload: props.clientFetchProfile,
133
137
  errorType: props.errorType || null,
134
138
  fireAnalytics: fireAnalytics,
@@ -136,7 +140,9 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
136
140
  }));
137
141
  }
138
142
  if (isLoading) {
139
- return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(LoadingView, {
143
+ return /*#__PURE__*/_react.default.createElement(Wrapper, {
144
+ ariaLabel: intl.formatMessage(_messages.default.loadingDialogLabel)
145
+ }, /*#__PURE__*/_react.default.createElement(LoadingView, {
140
146
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
141
147
  fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext
142
148
  }));
@@ -145,7 +151,9 @@ var ProfilecardInternal = exports.ProfilecardInternal = function ProfilecardInte
145
151
  return null;
146
152
  }
147
153
  var isDisabledUser = status === 'inactive' || status === 'closed';
148
- return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_Card.CardContainer, {
154
+ return /*#__PURE__*/_react.default.createElement(Wrapper, {
155
+ labelledBy: "profilecard-name-label"
156
+ }, /*#__PURE__*/_react.default.createElement(_Card.CardContainer, {
149
157
  isDisabledUser: isDisabledUser,
150
158
  withoutElevation: props.withoutElevation
151
159
  }, /*#__PURE__*/_react.default.createElement(_Card.ProfileImage, null, /*#__PURE__*/_react.default.createElement(_avatar.default, {
@@ -243,4 +243,5 @@ var ProfileCardResourcedWithAnalytics = function ProfileCardResourcedWithAnalyti
243
243
  fireEvent: fireEvent
244
244
  }, props));
245
245
  };
246
- var _default = exports.default = (0, _platformFeatureFlagsReact.componentWithFG)('ptc-enable-profile-card-analytics-refactor', ProfileCardResourcedWithAnalytics, (0, _analyticsNext.withAnalyticsEvents)()(ProfileCardResourced));
246
+ var _default_1 = (0, _platformFeatureFlagsReact.componentWithFG)('ptc-enable-profile-card-analytics-refactor', ProfileCardResourcedWithAnalytics, (0, _analyticsNext.withAnalyticsEvents)()(ProfileCardResourced));
247
+ var _default = exports.default = _default_1;
@@ -212,6 +212,16 @@ var messages = (0, _reactIntlNext.defineMessages)({
212
212
  defaultMessage: 'Try again',
213
213
  description: 'Label for the button to retry loading the profile card after an error'
214
214
  },
215
+ errorDialogLabel: {
216
+ id: 'pt.profile-card.error.dialog-label',
217
+ defaultMessage: 'Profile card error',
218
+ description: 'Accessible label for the profile card dialog when in error state'
219
+ },
220
+ loadingDialogLabel: {
221
+ id: 'pt.profile-card.loading.dialog-label',
222
+ defaultMessage: 'Loading profile card',
223
+ description: 'Accessible label for the profile card dialog when loading'
224
+ },
215
225
  serviceAccountLabel: {
216
226
  id: 'pt.profile-card.service-account.label',
217
227
  defaultMessage: 'SERVICE ACCOUNT',
@@ -22,13 +22,15 @@ var CardWrapper = exports.CardWrapper = function CardWrapper(_ref) {
22
22
  var children = _ref.children,
23
23
  role = _ref.role,
24
24
  testId = _ref.testId,
25
- labelledBy = _ref.labelledBy;
25
+ labelledBy = _ref.labelledBy,
26
+ ariaLabel = _ref.ariaLabel;
26
27
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
27
28
  xcss: (0, _css.cx)(styles.cardWrapper),
28
29
  backgroundColor: 'elevation.surface.overlay',
29
30
  role: role,
30
31
  testId: testId,
31
- "aria-labelledby": labelledBy
32
+ "aria-labelledby": labelledBy,
33
+ "aria-label": ariaLabel
32
34
  }, children);
33
35
  };
34
36
  var SpinnerContainer = exports.SpinnerContainer = function SpinnerContainer(_ref2) {
@@ -13,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
13
13
  var ANALYTICS_CHANNEL = 'peopleTeams';
14
14
  var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
15
15
  packageName: "@atlaskit/profilecard",
16
- packageVersion: "0.0.0-development"
16
+ packageVersion: "24.31.0"
17
17
  };
18
18
  var runItLater = function runItLater(cb) {
19
19
  var requestIdleCallback = window.requestIdleCallback;
@@ -58,7 +58,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
58
58
  actionSubjectId: actionSubjectId,
59
59
  attributes: _objectSpread(_objectSpread({
60
60
  packageName: "@atlaskit/profilecard",
61
- packageVersion: "0.0.0-development"
61
+ packageVersion: "24.31.0"
62
62
  }, attributes), {}, {
63
63
  firedAt: Math.round((0, _performance.getPageTime)())
64
64
  })
@@ -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', "0.0.0-development");
9
+ headers.append('atl-client-version', "24.31.0");
10
10
  return headers;
11
11
  };
12
12
  export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
78
78
  headers.append('X-ExperimentalApi', 'teams-beta');
79
79
  headers.append('X-ExperimentalApi', 'team-members-beta');
80
80
  headers.append('atl-client-name', "@atlaskit/profilecard");
81
- headers.append('atl-client-version', "0.0.0-development");
81
+ headers.append('atl-client-version', "24.31.0");
82
82
  return headers;
83
83
  };
84
84
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -143,13 +143,15 @@ const AgentProfileCard = ({
143
143
  fireAnalytics: fireAnalytics
144
144
  }));
145
145
  }
146
+ const isRovoDev = agent.creator_type === 'ROVO_DEV';
146
147
  return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
147
148
  xcss: styles.cardContainerStyles
148
149
  }, /*#__PURE__*/React.createElement(AgentBanner, {
149
150
  agentId: agent.id,
150
151
  agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
151
152
  height: fg('rovo_agent_empty_state_refresh') ? 48 : 96,
152
- agentIdentityAccountId: agent.identity_account_id
153
+ agentIdentityAccountId: agent.identity_account_id,
154
+ isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card')
153
155
  }), /*#__PURE__*/React.createElement(Box, {
154
156
  xcss: styles.avatarStyles
155
157
  }, /*#__PURE__*/React.createElement(AgentAvatar, {
@@ -157,6 +159,7 @@ const AgentProfileCard = ({
157
159
  agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
158
160
  agentIdentityAccountId: agent.identity_account_id,
159
161
  size: fg('rovo_agent_empty_state_refresh') ? 'large' : 'xlarge',
162
+ isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card'),
160
163
  isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
161
164
  forgeAgentIconUrl: agent.icon
162
165
  })), /*#__PURE__*/React.createElement(Stack, {
@@ -168,6 +171,7 @@ const AgentProfileCard = ({
168
171
  agentName: agent.name,
169
172
  isStarred: isStarred,
170
173
  onStarToggle: handleSetFavourite,
174
+ showStarButton: !(isRovoDev && fg('rovo_dev_themed_identity_card')),
171
175
  isHidden: agent.visibility === 'PRIVATE',
172
176
  creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
173
177
  creator: {
@@ -183,7 +187,7 @@ const AgentProfileCard = ({
183
187
  isLoading: false
184
188
  }),
185
189
  agentDescription: agent.description
186
- })), /*#__PURE__*/React.createElement(Box, {
190
+ })), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(Box, {
187
191
  xcss: fg('rovo_agent_empty_state_refresh') ? styles.conversationStartersWrapper : null
188
192
  }, /*#__PURE__*/React.createElement(ConversationStarters, {
189
193
  isAgentDefault: agent.is_default,
@@ -194,7 +198,7 @@ const AgentProfileCard = ({
194
198
  prompt: conversationStarter.message
195
199
  });
196
200
  }
197
- }))), /*#__PURE__*/React.createElement(AgentActions, {
201
+ }))), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(AgentActions, {
198
202
  agent: agent,
199
203
  onEditAgent: () => onEditAgent(agent.id),
200
204
  onCopyAgent: () => onCopyAgent(agent.id),
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
- import { FormattedMessage } from 'react-intl-next';
3
+ import { FormattedMessage, useIntl } from 'react-intl-next';
4
4
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
5
5
  import Avatar from '@atlaskit/avatar';
6
6
  import { LinkButton } from '@atlaskit/button/new';
@@ -49,10 +49,12 @@ const useKudos = (cloudId, userId, teamCentralBaseUrl, openKudosDrawer) => {
49
49
  const Wrapper = props => /*#__PURE__*/React.createElement(CardWrapper, {
50
50
  testId: "profilecard",
51
51
  role: "dialog",
52
- labelledBy: "profilecard-name-label"
52
+ labelledBy: props.labelledBy,
53
+ ariaLabel: props.ariaLabel
53
54
  }, props.children);
54
55
  export const ProfilecardInternal = props => {
55
56
  const [openTime] = useState(getPageTime());
57
+ const intl = useIntl();
56
58
  const {
57
59
  createAnalyticsEvent
58
60
  } = props;
@@ -113,7 +115,9 @@ export const ProfilecardInternal = props => {
113
115
  }
114
116
  }, [canRender, fireAnalyticsWithDuration, fireAnalyticsWithDurationNext, realActions]);
115
117
  if (hasError) {
116
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorMessage, {
118
+ return /*#__PURE__*/React.createElement(Wrapper, {
119
+ ariaLabel: intl.formatMessage(messages.errorDialogLabel)
120
+ }, /*#__PURE__*/React.createElement(ErrorMessage, {
117
121
  reload: props.clientFetchProfile,
118
122
  errorType: props.errorType || null,
119
123
  fireAnalytics: fireAnalytics,
@@ -121,7 +125,9 @@ export const ProfilecardInternal = props => {
121
125
  }));
122
126
  }
123
127
  if (isLoading) {
124
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(LoadingView, {
128
+ return /*#__PURE__*/React.createElement(Wrapper, {
129
+ ariaLabel: intl.formatMessage(messages.loadingDialogLabel)
130
+ }, /*#__PURE__*/React.createElement(LoadingView, {
125
131
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
126
132
  fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext
127
133
  }));
@@ -130,7 +136,9 @@ export const ProfilecardInternal = props => {
130
136
  return null;
131
137
  }
132
138
  const isDisabledUser = status === 'inactive' || status === 'closed';
133
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(CardContainer, {
139
+ return /*#__PURE__*/React.createElement(Wrapper, {
140
+ labelledBy: "profilecard-name-label"
141
+ }, /*#__PURE__*/React.createElement(CardContainer, {
134
142
  isDisabledUser: isDisabledUser,
135
143
  withoutElevation: props.withoutElevation
136
144
  }, /*#__PURE__*/React.createElement(ProfileImage, null, /*#__PURE__*/React.createElement(Avatar, {
@@ -198,4 +198,5 @@ const ProfileCardResourcedWithAnalytics = props => {
198
198
  fireEvent: fireEvent
199
199
  }, props));
200
200
  };
201
- export default componentWithFG('ptc-enable-profile-card-analytics-refactor', ProfileCardResourcedWithAnalytics, withAnalyticsEvents()(ProfileCardResourced));
201
+ const _default_1 = componentWithFG('ptc-enable-profile-card-analytics-refactor', ProfileCardResourcedWithAnalytics, withAnalyticsEvents()(ProfileCardResourced));
202
+ export default _default_1;
@@ -206,6 +206,16 @@ const messages = defineMessages({
206
206
  defaultMessage: 'Try again',
207
207
  description: 'Label for the button to retry loading the profile card after an error'
208
208
  },
209
+ errorDialogLabel: {
210
+ id: 'pt.profile-card.error.dialog-label',
211
+ defaultMessage: 'Profile card error',
212
+ description: 'Accessible label for the profile card dialog when in error state'
213
+ },
214
+ loadingDialogLabel: {
215
+ id: 'pt.profile-card.loading.dialog-label',
216
+ defaultMessage: 'Loading profile card',
217
+ description: 'Accessible label for the profile card dialog when loading'
218
+ },
209
219
  serviceAccountLabel: {
210
220
  id: 'pt.profile-card.service-account.label',
211
221
  defaultMessage: 'SERVICE ACCOUNT',
@@ -15,13 +15,15 @@ export const CardWrapper = ({
15
15
  children,
16
16
  role,
17
17
  testId,
18
- labelledBy
18
+ labelledBy,
19
+ ariaLabel
19
20
  }) => /*#__PURE__*/React.createElement(Box, {
20
21
  xcss: cx(styles.cardWrapper),
21
22
  backgroundColor: 'elevation.surface.overlay',
22
23
  role: role,
23
24
  testId: testId,
24
- "aria-labelledby": labelledBy
25
+ "aria-labelledby": labelledBy,
26
+ "aria-label": ariaLabel
25
27
  }, children);
26
28
  export const SpinnerContainer = ({
27
29
  children,
@@ -4,7 +4,7 @@ import { getPageTime } from './performance';
4
4
  const ANALYTICS_CHANNEL = 'peopleTeams';
5
5
  export const PACKAGE_META_DATA = {
6
6
  packageName: "@atlaskit/profilecard",
7
- packageVersion: "0.0.0-development"
7
+ packageVersion: "24.31.0"
8
8
  };
9
9
  const runItLater = cb => {
10
10
  const requestIdleCallback = window.requestIdleCallback;
@@ -45,7 +45,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
45
45
  actionSubjectId,
46
46
  attributes: {
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "0.0.0-development",
48
+ packageVersion: "24.31.0",
49
49
  ...attributes,
50
50
  firedAt: Math.round(getPageTime())
51
51
  }
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
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', "0.0.0-development");
7
+ headers.append('atl-client-version', "24.31.0");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
59
59
  headers.append('X-ExperimentalApi', 'teams-beta');
60
60
  headers.append('X-ExperimentalApi', 'team-members-beta');
61
61
  headers.append('atl-client-name', "@atlaskit/profilecard");
62
- headers.append('atl-client-version', "0.0.0-development");
62
+ headers.append('atl-client-version', "24.31.0");
63
63
  return headers;
64
64
  };
65
65
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -179,13 +179,15 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
179
179
  fireAnalytics: fireAnalytics
180
180
  }));
181
181
  }
182
+ var isRovoDev = agent.creator_type === 'ROVO_DEV';
182
183
  return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
183
184
  xcss: styles.cardContainerStyles
184
185
  }, /*#__PURE__*/React.createElement(AgentBanner, {
185
186
  agentId: agent.id,
186
187
  agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
187
188
  height: fg('rovo_agent_empty_state_refresh') ? 48 : 96,
188
- agentIdentityAccountId: agent.identity_account_id
189
+ agentIdentityAccountId: agent.identity_account_id,
190
+ isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card')
189
191
  }), /*#__PURE__*/React.createElement(Box, {
190
192
  xcss: styles.avatarStyles
191
193
  }, /*#__PURE__*/React.createElement(AgentAvatar, {
@@ -193,6 +195,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
193
195
  agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
194
196
  agentIdentityAccountId: agent.identity_account_id,
195
197
  size: fg('rovo_agent_empty_state_refresh') ? 'large' : 'xlarge',
198
+ isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card'),
196
199
  isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
197
200
  forgeAgentIconUrl: agent.icon
198
201
  })), /*#__PURE__*/React.createElement(Stack, {
@@ -204,6 +207,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
204
207
  agentName: agent.name,
205
208
  isStarred: isStarred,
206
209
  onStarToggle: handleSetFavourite,
210
+ showStarButton: !(isRovoDev && fg('rovo_dev_themed_identity_card')),
207
211
  isHidden: agent.visibility === 'PRIVATE',
208
212
  creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
209
213
  creator: {
@@ -219,7 +223,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
219
223
  isLoading: false
220
224
  }),
221
225
  agentDescription: agent.description
222
- })), /*#__PURE__*/React.createElement(Box, {
226
+ })), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(Box, {
223
227
  xcss: fg('rovo_agent_empty_state_refresh') ? styles.conversationStartersWrapper : null
224
228
  }, /*#__PURE__*/React.createElement(ConversationStarters, {
225
229
  isAgentDefault: agent.is_default,
@@ -230,7 +234,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
230
234
  prompt: conversationStarter.message
231
235
  });
232
236
  }
233
- }))), /*#__PURE__*/React.createElement(AgentActions, {
237
+ }))), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(AgentActions, {
234
238
  agent: agent,
235
239
  onEditAgent: function onEditAgent() {
236
240
  return _onEditAgent(agent.id);
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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, useMemo, useState } from 'react';
8
- import { FormattedMessage } from 'react-intl-next';
8
+ import { FormattedMessage, useIntl } from 'react-intl-next';
9
9
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
10
10
  import Avatar from '@atlaskit/avatar';
11
11
  import { LinkButton } from '@atlaskit/button/new';
@@ -55,13 +55,15 @@ var Wrapper = function Wrapper(props) {
55
55
  return /*#__PURE__*/React.createElement(CardWrapper, {
56
56
  testId: "profilecard",
57
57
  role: "dialog",
58
- labelledBy: "profilecard-name-label"
58
+ labelledBy: props.labelledBy,
59
+ ariaLabel: props.ariaLabel
59
60
  }, props.children);
60
61
  };
61
62
  export var ProfilecardInternal = function ProfilecardInternal(props) {
62
63
  var _useState = useState(getPageTime()),
63
64
  _useState2 = _slicedToArray(_useState, 1),
64
65
  openTime = _useState2[0];
66
+ var intl = useIntl();
65
67
  var createAnalyticsEvent = props.createAnalyticsEvent;
66
68
  var _useAnalyticsEvents = useAnalyticsEvents(),
67
69
  fireEventNext = _useAnalyticsEvents.fireEvent;
@@ -119,7 +121,9 @@ export var ProfilecardInternal = function ProfilecardInternal(props) {
119
121
  }
120
122
  }, [canRender, fireAnalyticsWithDuration, fireAnalyticsWithDurationNext, realActions]);
121
123
  if (hasError) {
122
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorMessage, {
124
+ return /*#__PURE__*/React.createElement(Wrapper, {
125
+ ariaLabel: intl.formatMessage(messages.errorDialogLabel)
126
+ }, /*#__PURE__*/React.createElement(ErrorMessage, {
123
127
  reload: props.clientFetchProfile,
124
128
  errorType: props.errorType || null,
125
129
  fireAnalytics: fireAnalytics,
@@ -127,7 +131,9 @@ export var ProfilecardInternal = function ProfilecardInternal(props) {
127
131
  }));
128
132
  }
129
133
  if (isLoading) {
130
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(LoadingView, {
134
+ return /*#__PURE__*/React.createElement(Wrapper, {
135
+ ariaLabel: intl.formatMessage(messages.loadingDialogLabel)
136
+ }, /*#__PURE__*/React.createElement(LoadingView, {
131
137
  fireAnalyticsWithDuration: fireAnalyticsWithDuration,
132
138
  fireAnalyticsWithDurationNext: fireAnalyticsWithDurationNext
133
139
  }));
@@ -136,7 +142,9 @@ export var ProfilecardInternal = function ProfilecardInternal(props) {
136
142
  return null;
137
143
  }
138
144
  var isDisabledUser = status === 'inactive' || status === 'closed';
139
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(CardContainer, {
145
+ return /*#__PURE__*/React.createElement(Wrapper, {
146
+ labelledBy: "profilecard-name-label"
147
+ }, /*#__PURE__*/React.createElement(CardContainer, {
140
148
  isDisabledUser: isDisabledUser,
141
149
  withoutElevation: props.withoutElevation
142
150
  }, /*#__PURE__*/React.createElement(ProfileImage, null, /*#__PURE__*/React.createElement(Avatar, {
@@ -234,4 +234,5 @@ var ProfileCardResourcedWithAnalytics = function ProfileCardResourcedWithAnalyti
234
234
  fireEvent: fireEvent
235
235
  }, props));
236
236
  };
237
- export default componentWithFG('ptc-enable-profile-card-analytics-refactor', ProfileCardResourcedWithAnalytics, withAnalyticsEvents()(ProfileCardResourced));
237
+ var _default_1 = componentWithFG('ptc-enable-profile-card-analytics-refactor', ProfileCardResourcedWithAnalytics, withAnalyticsEvents()(ProfileCardResourced));
238
+ export default _default_1;
@@ -206,6 +206,16 @@ var messages = defineMessages({
206
206
  defaultMessage: 'Try again',
207
207
  description: 'Label for the button to retry loading the profile card after an error'
208
208
  },
209
+ errorDialogLabel: {
210
+ id: 'pt.profile-card.error.dialog-label',
211
+ defaultMessage: 'Profile card error',
212
+ description: 'Accessible label for the profile card dialog when in error state'
213
+ },
214
+ loadingDialogLabel: {
215
+ id: 'pt.profile-card.loading.dialog-label',
216
+ defaultMessage: 'Loading profile card',
217
+ description: 'Accessible label for the profile card dialog when loading'
218
+ },
209
219
  serviceAccountLabel: {
210
220
  id: 'pt.profile-card.service-account.label',
211
221
  defaultMessage: 'SERVICE ACCOUNT',
@@ -15,13 +15,15 @@ export var CardWrapper = function CardWrapper(_ref) {
15
15
  var children = _ref.children,
16
16
  role = _ref.role,
17
17
  testId = _ref.testId,
18
- labelledBy = _ref.labelledBy;
18
+ labelledBy = _ref.labelledBy,
19
+ ariaLabel = _ref.ariaLabel;
19
20
  return /*#__PURE__*/React.createElement(Box, {
20
21
  xcss: cx(styles.cardWrapper),
21
22
  backgroundColor: 'elevation.surface.overlay',
22
23
  role: role,
23
24
  testId: testId,
24
- "aria-labelledby": labelledBy
25
+ "aria-labelledby": labelledBy,
26
+ "aria-label": ariaLabel
25
27
  }, children);
26
28
  };
27
29
  export var SpinnerContainer = function SpinnerContainer(_ref2) {
@@ -7,7 +7,7 @@ import { getPageTime } from './performance';
7
7
  var ANALYTICS_CHANNEL = 'peopleTeams';
8
8
  export var PACKAGE_META_DATA = {
9
9
  packageName: "@atlaskit/profilecard",
10
- packageVersion: "0.0.0-development"
10
+ packageVersion: "24.31.0"
11
11
  };
12
12
  var runItLater = function runItLater(cb) {
13
13
  var requestIdleCallback = window.requestIdleCallback;
@@ -52,7 +52,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
52
52
  actionSubjectId: actionSubjectId,
53
53
  attributes: _objectSpread(_objectSpread({
54
54
  packageName: "@atlaskit/profilecard",
55
- packageVersion: "0.0.0-development"
55
+ packageVersion: "24.31.0"
56
56
  }, attributes), {}, {
57
57
  firedAt: Math.round(getPageTime())
58
58
  })
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import { type AnalyticsEventPayload, type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
3
  import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
4
- import { type AnalyticsProps, type ProfileCardAction, type ProfileCardClientData, type ProfileCardResourcedProps, type ProfileCardResourcedState, type TeamCentralReportingLinesData } from '../../types';
4
+ import { type AnalyticsProps, type ProfileCardAction, type ProfileCardClientData, type ProfileCardResourcedProps, type ProfileCardResourcedState, type ProfilecardTriggerPosition, type ProfileClient, type ReportingLinesUser, type TeamCentralReportingLinesData, type TriggerType } from '../../types';
5
5
  declare class ProfileCardResourced extends React.PureComponent<ProfileCardResourcedProps & AnalyticsProps, ProfileCardResourcedState> {
6
6
  static defaultProps: Partial<ProfileCardResourcedProps>;
7
7
  _isMounted: boolean;
@@ -20,16 +20,16 @@ declare class ProfileCardResourced extends React.PureComponent<ProfileCardResour
20
20
  render(): React.ReactNode;
21
21
  }
22
22
  export declare const ProfileCardResourcedInternal: typeof ProfileCardResourced;
23
- declare const _default: React.FC<ProfileCardResourcedProps & Omit<Pick<Omit<ProfileCardResourcedProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
23
+ declare const _default_1: React.FC<ProfileCardResourcedProps & Omit<Pick<Omit<ProfileCardResourcedProps, keyof WithAnalyticsEventsProps>, never> & {
24
+ userId?: string | undefined;
24
25
  cloudId?: string | undefined;
25
- resourceClient?: import("../../types").ProfileClient | undefined;
26
+ resourceClient?: ProfileClient | undefined;
26
27
  actions?: ProfileCardAction[] | undefined;
27
- position?: import("../../types").ProfilecardTriggerPosition | undefined;
28
- trigger?: import("../../types").TriggerType | undefined;
28
+ reportingLinesProfileUrl?: string | undefined;
29
+ onReportingLinesClick?: ((user: ReportingLinesUser) => void) | undefined;
30
+ position?: ProfilecardTriggerPosition | undefined;
31
+ trigger?: TriggerType | undefined;
29
32
  children?: React.ReactNode;
30
33
  addFlag?: ((flag: any) => void) | undefined;
31
- userId?: string | undefined;
32
- reportingLinesProfileUrl?: string | undefined;
33
- onReportingLinesClick?: ((user: import("../../types").ReportingLinesUser) => void) | undefined;
34
34
  } & {} & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
35
- export default _default;
35
+ export default _default_1;
@@ -204,6 +204,16 @@ declare const messages: {
204
204
  defaultMessage: string;
205
205
  description: string;
206
206
  };
207
+ errorDialogLabel: {
208
+ id: string;
209
+ defaultMessage: string;
210
+ description: string;
211
+ };
212
+ loadingDialogLabel: {
213
+ id: string;
214
+ defaultMessage: string;
215
+ description: string;
216
+ };
207
217
  serviceAccountLabel: {
208
218
  id: string;
209
219
  defaultMessage: string;
@@ -1,9 +1,10 @@
1
1
  import React, { type ReactNode } from 'react';
2
- export declare const CardWrapper: ({ children, role, testId, labelledBy, }: {
2
+ export declare const CardWrapper: ({ children, role, testId, labelledBy, ariaLabel, }: {
3
3
  children: ReactNode;
4
4
  role?: string;
5
5
  testId?: string;
6
6
  labelledBy?: string;
7
+ ariaLabel?: string;
7
8
  }) => React.JSX.Element;
8
9
  export declare const SpinnerContainer: ({ children, testId, }: {
9
10
  children: ReactNode;
@@ -67,7 +67,7 @@ export interface RovoAgent {
67
67
  name: string;
68
68
  description: string | null;
69
69
  system_prompt_template?: string | null;
70
- creator_type: 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE';
70
+ creator_type: 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'ROVO_DEV';
71
71
  creator?: string | null;
72
72
  visibility?: 'PUBLIC' | 'PRIVATE' | null;
73
73
  is_default: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
+ import { type AnalyticsEventPayload, type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
3
  import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
4
- import { type AnalyticsProps, type ProfileCardAction, type ProfileCardClientData, type ProfileCardResourcedProps, type ProfileCardResourcedState, type TeamCentralReportingLinesData } from '../../types';
4
+ import { type AnalyticsProps, type ProfileCardAction, type ProfileCardClientData, type ProfileCardResourcedProps, type ProfileCardResourcedState, type ProfilecardTriggerPosition, type ProfileClient, type ReportingLinesUser, type TeamCentralReportingLinesData, type TriggerType } from '../../types';
5
5
  declare class ProfileCardResourced extends React.PureComponent<ProfileCardResourcedProps & AnalyticsProps, ProfileCardResourcedState> {
6
6
  static defaultProps: Partial<ProfileCardResourcedProps>;
7
7
  _isMounted: boolean;
@@ -20,16 +20,16 @@ declare class ProfileCardResourced extends React.PureComponent<ProfileCardResour
20
20
  render(): React.ReactNode;
21
21
  }
22
22
  export declare const ProfileCardResourcedInternal: typeof ProfileCardResourced;
23
- declare const _default: React.FC<ProfileCardResourcedProps & Omit<Pick<Omit<ProfileCardResourcedProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
23
+ declare const _default_1: React.FC<ProfileCardResourcedProps & Omit<Pick<Omit<ProfileCardResourcedProps, keyof WithAnalyticsEventsProps>, never> & {
24
+ userId?: string | undefined;
24
25
  cloudId?: string | undefined;
25
- resourceClient?: import("../../types").ProfileClient | undefined;
26
+ resourceClient?: ProfileClient | undefined;
26
27
  actions?: ProfileCardAction[] | undefined;
27
- position?: import("../../types").ProfilecardTriggerPosition | undefined;
28
- trigger?: import("../../types").TriggerType | undefined;
28
+ reportingLinesProfileUrl?: string | undefined;
29
+ onReportingLinesClick?: ((user: ReportingLinesUser) => void) | undefined;
30
+ position?: ProfilecardTriggerPosition | undefined;
31
+ trigger?: TriggerType | undefined;
29
32
  children?: React.ReactNode;
30
33
  addFlag?: ((flag: any) => void) | undefined;
31
- userId?: string | undefined;
32
- reportingLinesProfileUrl?: string | undefined;
33
- onReportingLinesClick?: ((user: import("../../types").ReportingLinesUser) => void) | undefined;
34
34
  } & {} & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
35
- export default _default;
35
+ export default _default_1;
@@ -204,6 +204,16 @@ declare const messages: {
204
204
  defaultMessage: string;
205
205
  description: string;
206
206
  };
207
+ errorDialogLabel: {
208
+ id: string;
209
+ defaultMessage: string;
210
+ description: string;
211
+ };
212
+ loadingDialogLabel: {
213
+ id: string;
214
+ defaultMessage: string;
215
+ description: string;
216
+ };
207
217
  serviceAccountLabel: {
208
218
  id: string;
209
219
  defaultMessage: string;
@@ -1,9 +1,10 @@
1
1
  import React, { type ReactNode } from 'react';
2
- export declare const CardWrapper: ({ children, role, testId, labelledBy, }: {
2
+ export declare const CardWrapper: ({ children, role, testId, labelledBy, ariaLabel, }: {
3
3
  children: ReactNode;
4
4
  role?: string;
5
5
  testId?: string;
6
6
  labelledBy?: string;
7
+ ariaLabel?: string;
7
8
  }) => React.JSX.Element;
8
9
  export declare const SpinnerContainer: ({ children, testId, }: {
9
10
  children: ReactNode;
@@ -67,7 +67,7 @@ export interface RovoAgent {
67
67
  name: string;
68
68
  description: string | null;
69
69
  system_prompt_template?: string | null;
70
- creator_type: 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE';
70
+ creator_type: 'SYSTEM' | 'CUSTOMER' | 'THIRD_PARTY' | 'FORGE' | 'ROVO_DEV';
71
71
  creator?: string | null;
72
72
  visibility?: 'PUBLIC' | 'PRIVATE' | null;
73
73
  is_default: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.30.2",
3
+ "version": "24.32.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -60,15 +60,15 @@
60
60
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
61
61
  "@atlaskit/popup": "^4.13.0",
62
62
  "@atlaskit/primitives": "^17.1.0",
63
- "@atlaskit/rovo-agent-components": "^3.20.0",
63
+ "@atlaskit/rovo-agent-components": "^3.23.0",
64
64
  "@atlaskit/rovo-triggers": "^5.6.0",
65
65
  "@atlaskit/spinner": "^19.0.0",
66
66
  "@atlaskit/teams-app-config": "^1.12.0",
67
67
  "@atlaskit/teams-app-internal-analytics": "^1.23.0",
68
68
  "@atlaskit/teams-avatar": "^2.4.0",
69
- "@atlaskit/teams-public": "^0.65.0",
69
+ "@atlaskit/teams-public": "^0.66.0",
70
70
  "@atlaskit/theme": "^21.0.0",
71
- "@atlaskit/tokens": "^10.0.0",
71
+ "@atlaskit/tokens": "^10.1.0",
72
72
  "@atlaskit/tooltip": "^20.14.0",
73
73
  "@babel/runtime": "^7.0.0",
74
74
  "@compiled/react": "^0.18.6",
@@ -86,8 +86,12 @@
86
86
  },
87
87
  "devDependencies": {
88
88
  "@af/visual-regression": "workspace:^",
89
+ "@atlassian/feature-flags-storybook-utils": "^0.3.0",
89
90
  "@atlassian/feature-flags-test-utils": "^1.0.0",
91
+ "@atlassian/platform-storybook-helpers": "^0.1.0",
90
92
  "@atlassian/ptc-test-utils": "^0.11.0",
93
+ "@storybook/addon-actions": "^8.6.14",
94
+ "@storybook/test": "^8.6.14",
91
95
  "@testing-library/react": "^16.3.0",
92
96
  "@testing-library/user-event": "^14.4.3",
93
97
  "enzyme": "^3.10.0",
@@ -157,6 +161,9 @@
157
161
  "rovo_agent_empty_state_refresh": {
158
162
  "type": "boolean"
159
163
  },
164
+ "rovo_dev_themed_identity_card": {
165
+ "type": "boolean"
166
+ },
160
167
  "enable_profilecard_text_truncation_tooltip": {
161
168
  "type": "boolean"
162
169
  },
@@ -0,0 +1,112 @@
1
+ import React from 'react';
2
+
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
+ import { IntlProvider } from 'react-intl-next';
5
+
6
+ import { withPlatformFeatureGates } from '@atlassian/feature-flags-storybook-utils';
7
+ import {
8
+ withAnalyticsLogger,
9
+ withMaxWidth,
10
+ withStorybookLinkHarness,
11
+ } from '@atlassian/platform-storybook-helpers';
12
+
13
+ import { AgentProfileCard } from '../src';
14
+ import { simpleProfileClient } from '../src/mocks';
15
+ import type { AgentProfileCardProps, RovoAgentProfileCardInfo } from '../src/types';
16
+
17
+ type StoryArgs = AgentProfileCardProps;
18
+
19
+ const agent: RovoAgentProfileCardInfo = {
20
+ id: '965df475-d134-43ac-8ec4-f4aafd0025c6',
21
+ name: 'Rovo Dev',
22
+ description:
23
+ 'Get help writing a user manual page that you can use to share your preferred ways of working with your team.',
24
+ system_prompt_template: '',
25
+ visibility: 'PUBLIC',
26
+ user_defined_conversation_starters: [
27
+ 'Help me make my first User Manual.',
28
+ 'Help with my goals',
29
+ 'This is a very long conversation starter to test the overflow',
30
+ ],
31
+ named_id: '965df475-d134-43ac-8ec4-f4aafd0025c6',
32
+ creator: 'ari:cloud:identity::user/62321fb55b6d710070a1ce85',
33
+ creator_type: 'CUSTOMER',
34
+ // Toggle this to 'ROVO_DEV' in Storybook controls to simulate Rovo Dev UI.
35
+ favourite: true,
36
+ is_default: false,
37
+ deactivated: false,
38
+ identity_account_id: 'ari:cloud:identity::user/712020:b719aaa1-2485-4dad-93d3-abc3c93862c6',
39
+ creatorInfo: {
40
+ type: 'CUSTOMER',
41
+ name: 'John Doe',
42
+ profileLink: 'https://example.com/profile',
43
+ },
44
+ actor_type: 'AGENT',
45
+ favourite_count: 1234,
46
+ };
47
+
48
+ const meta: Meta<StoryArgs> = {
49
+ component: AgentProfileCard,
50
+ args: {
51
+ resourceClient: simpleProfileClient,
52
+ agent,
53
+ // Avoid network calls for permissions in Storybook.
54
+ hideMoreActions: true,
55
+ },
56
+ argTypes: {
57
+ hideMoreActions: { control: { type: 'boolean' } },
58
+ agent: {
59
+ control: { type: 'object' },
60
+ },
61
+ },
62
+
63
+ decorators: [
64
+ withAnalyticsLogger,
65
+ withMaxWidth('420px'),
66
+ withStorybookLinkHarness({ centered: false }),
67
+ (Story) => (
68
+ <IntlProvider locale="en">
69
+ <Story />
70
+ </IntlProvider>
71
+ ),
72
+ ],
73
+ };
74
+
75
+ export default meta;
76
+
77
+ type Story = StoryObj<StoryArgs>;
78
+
79
+ const baseFeatureGates = {
80
+ rovo_agent_empty_state_refresh: false,
81
+ jira_ai_force_rovo_dev_avatar: false,
82
+ };
83
+
84
+ export const Standard: Story = {
85
+ name: 'Standard (non-Rovo Dev)',
86
+ decorators: [withPlatformFeatureGates({ ...baseFeatureGates, rovo_dev_themed_identity_card: false })],
87
+ render: (props) => <AgentProfileCard {...props} />,
88
+ };
89
+
90
+ export const RovoDevGateOff: Story = {
91
+ name: 'Rovo Dev (gate OFF)',
92
+ args: {
93
+ agent: {
94
+ ...agent,
95
+ creator_type: 'ROVO_DEV',
96
+ },
97
+ },
98
+ decorators: [withPlatformFeatureGates({ ...baseFeatureGates, rovo_dev_themed_identity_card: false })],
99
+ render: (props) => <AgentProfileCard {...props} />,
100
+ };
101
+
102
+ export const RovoDevGateOn: Story = {
103
+ name: 'Rovo Dev (gate ON)',
104
+ args: {
105
+ agent: {
106
+ ...agent,
107
+ creator_type: 'ROVO_DEV',
108
+ },
109
+ },
110
+ decorators: [withPlatformFeatureGates({ ...baseFeatureGates, rovo_dev_themed_identity_card: true })],
111
+ render: (props) => <AgentProfileCard {...props} />,
112
+ };