@atlaskit/profilecard 24.48.3 → 24.49.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 +21 -0
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/AgentProfileCard.js +106 -7
- package/dist/cjs/components/User/ProfileCardResourced.js +1 -9
- package/dist/cjs/components/User/ProfileCardTrigger.js +0 -8
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/AgentProfileCard.js +94 -7
- package/dist/es2019/components/User/ProfileCardResourced.js +1 -9
- package/dist/es2019/components/User/ProfileCardTrigger.js +0 -8
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/AgentProfileCard.js +106 -7
- package/dist/esm/components/User/ProfileCardResourced.js +1 -9
- package/dist/esm/components/User/ProfileCardTrigger.js +0 -8
- package/dist/esm/util/analytics.js +2 -2
- package/docs/0-intro.tsx +9 -6
- package/docs/2-team-profilecard.tsx +11 -6
- package/package.json +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.49.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 24.49.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`c94eb37b8ae2e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c94eb37b8ae2e) -
|
|
14
|
+
Migrates all instances of ADS Link to use TeamsLink and adds TeamsNavigationProvider where needed
|
|
15
|
+
- [`503f9e86537ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/503f9e86537ae) -
|
|
16
|
+
[ux] Migrated all react-router-dom links to @atlaskit/teams-app-internal-navigation
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`4b2c758274578`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b2c758274578) -
|
|
21
|
+
Removed `TeamsNavigationProvider` wrapper from ProfileCard component and tests. The navigation
|
|
22
|
+
provider is now optional and no longer required for ProfileCard to render correctly.
|
|
23
|
+
|
|
3
24
|
## 24.48.3
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -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', "
|
|
14
|
+
headers.append('atl-client-version', "24.49.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', "
|
|
69
|
+
headers.append('atl-client-version', "24.49.0");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -24,6 +24,8 @@ var _GeneratedAvatar = require("@atlaskit/rovo-agent-components/ui/agent-avatar/
|
|
|
24
24
|
var _AgentAvatar = require("@atlaskit/rovo-agent-components/ui/AgentAvatar");
|
|
25
25
|
var _AgentProfileInfo = require("@atlaskit/rovo-agent-components/ui/AgentProfileInfo");
|
|
26
26
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
27
|
+
var _teamsAppInternalNavigation = require("@atlaskit/teams-app-internal-navigation");
|
|
28
|
+
var _teamsLink = require("@atlaskit/teams-app-internal-navigation/teams-link");
|
|
27
29
|
var _analytics = require("../../util/analytics");
|
|
28
30
|
var _performance = require("../../util/performance");
|
|
29
31
|
var _LoadingState = require("../common/LoadingState");
|
|
@@ -45,7 +47,7 @@ var styles = {
|
|
|
45
47
|
disclosureWrapper: "_zulp1b66 _18zrpxbi _1q51utpp _85i5utpp"
|
|
46
48
|
};
|
|
47
49
|
var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
48
|
-
var _agent$user_defined_c, _agent$
|
|
50
|
+
var _agent$user_defined_c, _agent$external_confi3, _agent$external_confi4, _agent$creatorInfo5, _agent$creatorInfo6, _agent$creatorInfo7, _agent$creatorInfo8;
|
|
49
51
|
var agent = _ref.agent,
|
|
50
52
|
isLoading = _ref.isLoading,
|
|
51
53
|
cloudId = _ref.cloudId,
|
|
@@ -185,11 +187,108 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
185
187
|
}
|
|
186
188
|
var isRovoDev = agent.creator_type === 'ROVO_DEV';
|
|
187
189
|
var shouldShowConversationStarters = !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')) && !((0, _platformFeatureFlags.fg)('jira_ai_hide_conversation_starters_profilecard') && hideConversationStarters);
|
|
190
|
+
if ((0, _platformFeatureFlags.fg)('ptc-links-migrate-atlaskit-link')) {
|
|
191
|
+
var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
192
|
+
return /*#__PURE__*/_react.default.createElement(_teamsAppInternalNavigation.TeamsNavigationProvider, {
|
|
193
|
+
value: {
|
|
194
|
+
navigate: function navigate() {}
|
|
195
|
+
}
|
|
196
|
+
}, /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
197
|
+
xcss: styles.cardContainerStyles
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement(_GeneratedAvatar.AgentBanner, {
|
|
199
|
+
agentId: agent.id,
|
|
200
|
+
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
201
|
+
height: 48,
|
|
202
|
+
agentIdentityAccountId: agent.identity_account_id,
|
|
203
|
+
isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')
|
|
204
|
+
}), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
205
|
+
xcss: styles.avatarStyles
|
|
206
|
+
}, /*#__PURE__*/_react.default.createElement(_AgentAvatar.AgentAvatar, {
|
|
207
|
+
agentId: agent.id,
|
|
208
|
+
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
209
|
+
agentIdentityAccountId: agent.identity_account_id,
|
|
210
|
+
size: "large",
|
|
211
|
+
isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card'),
|
|
212
|
+
isForgeAgent: (0, _platformFeatureFlags.fg)('rovo_agent_support_a2a_avatar') ? (0, _isForgeAgent.isForgeAgentByCreatorType)(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
213
|
+
forgeAgentIconUrl: agent.icon
|
|
214
|
+
})), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
215
|
+
space: "space.100",
|
|
216
|
+
xcss: styles.detailWrapper
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
218
|
+
xcss: styles.agentProfileInfoWrapper
|
|
219
|
+
}, /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileInfo, {
|
|
220
|
+
agentName: agent.name,
|
|
221
|
+
isStarred: isStarred,
|
|
222
|
+
onStarToggle: handleSetFavourite,
|
|
223
|
+
showStarButton: !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')),
|
|
224
|
+
isHidden: agent.visibility === 'PRIVATE',
|
|
225
|
+
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileCreator, {
|
|
226
|
+
creator: {
|
|
227
|
+
type: (_agent$creatorInfo2 = agent.creatorInfo) === null || _agent$creatorInfo2 === void 0 ? void 0 : _agent$creatorInfo2.type,
|
|
228
|
+
name: ((_agent$creatorInfo3 = agent.creatorInfo) === null || _agent$creatorInfo3 === void 0 ? void 0 : _agent$creatorInfo3.name) || '',
|
|
229
|
+
profileLink: ((_agent$creatorInfo4 = agent.creatorInfo) === null || _agent$creatorInfo4 === void 0 ? void 0 : _agent$creatorInfo4.profileLink) || ''
|
|
230
|
+
},
|
|
231
|
+
isLoading: false,
|
|
232
|
+
onCreatorLinkClick: function onCreatorLinkClick() {}
|
|
233
|
+
}),
|
|
234
|
+
starCountRender: null,
|
|
235
|
+
agentDescription: agent.description
|
|
236
|
+
})), !hideAiDisclaimer && (0, _platformFeatureFlags.fg)('rovo_display_ai_disclaimer_on_agent_profile_card') && /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
237
|
+
alignItems: "start",
|
|
238
|
+
direction: "column",
|
|
239
|
+
gap: "space.050",
|
|
240
|
+
xcss: styles.disclosureWrapper
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement(_teamsLink.TeamsLink, {
|
|
242
|
+
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
243
|
+
intent: "reference",
|
|
244
|
+
appearance: "subtle"
|
|
245
|
+
}, /*#__PURE__*/_react.default.createElement(_informationCircle.default, {
|
|
246
|
+
color: "var(--ds-icon-subtlest, #6B6E76)",
|
|
247
|
+
label: "",
|
|
248
|
+
size: "small"
|
|
249
|
+
}), " ", /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
250
|
+
size: "small",
|
|
251
|
+
color: "color.text.subtlest"
|
|
252
|
+
}, formatMessage(_messages.messages.aiDisclaimer)))), shouldShowConversationStarters && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
253
|
+
xcss: styles.conversationStartersWrapper
|
|
254
|
+
}, /*#__PURE__*/_react.default.createElement(_ConversationStarters.ConversationStarters, {
|
|
255
|
+
isAgentDefault: agent.is_default,
|
|
256
|
+
userDefinedConversationStarters: userDefinedConversationStarters,
|
|
257
|
+
onConversationStarterClick: function onConversationStarterClick(conversationStarter) {
|
|
258
|
+
onConversationStartersClick ? onConversationStartersClick(conversationStarter) : onConversationStarter({
|
|
259
|
+
agentId: agent.id,
|
|
260
|
+
prompt: conversationStarter.message
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}))), !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')) && /*#__PURE__*/_react.default.createElement(_Actions.AgentActions, {
|
|
264
|
+
agent: agent,
|
|
265
|
+
onEditAgent: function onEditAgent() {
|
|
266
|
+
return _onEditAgent(agent.id);
|
|
267
|
+
},
|
|
268
|
+
onCopyAgent: function onCopyAgent() {
|
|
269
|
+
return _onCopyAgent(agent.id);
|
|
270
|
+
},
|
|
271
|
+
onDuplicateAgent: function onDuplicateAgent() {
|
|
272
|
+
return _onDuplicateAgent(agent.id);
|
|
273
|
+
},
|
|
274
|
+
onDeleteAgent: handleOnDelete,
|
|
275
|
+
onChatClick: onChatClick ? function (event) {
|
|
276
|
+
return onChatClick(event);
|
|
277
|
+
} : function () {
|
|
278
|
+
return onOpenChatFullScreen(agent.id, agent.name);
|
|
279
|
+
},
|
|
280
|
+
resourceClient: resourceClient,
|
|
281
|
+
onViewFullProfileClick: function onViewFullProfileClick() {
|
|
282
|
+
return onViewFullProfile(agent.id);
|
|
283
|
+
},
|
|
284
|
+
hideMoreActions: hideMoreActions
|
|
285
|
+
}))));
|
|
286
|
+
}
|
|
188
287
|
return /*#__PURE__*/_react.default.createElement(_AgentProfileCardWrapper.AgentProfileCardWrapper, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
189
288
|
xcss: styles.cardContainerStyles
|
|
190
289
|
}, /*#__PURE__*/_react.default.createElement(_GeneratedAvatar.AgentBanner, {
|
|
191
290
|
agentId: agent.id,
|
|
192
|
-
agentNamedId: (_agent$
|
|
291
|
+
agentNamedId: (_agent$external_confi3 = agent.external_config_reference) !== null && _agent$external_confi3 !== void 0 ? _agent$external_confi3 : agent.named_id,
|
|
193
292
|
height: 48,
|
|
194
293
|
agentIdentityAccountId: agent.identity_account_id,
|
|
195
294
|
isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')
|
|
@@ -197,7 +296,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
197
296
|
xcss: styles.avatarStyles
|
|
198
297
|
}, /*#__PURE__*/_react.default.createElement(_AgentAvatar.AgentAvatar, {
|
|
199
298
|
agentId: agent.id,
|
|
200
|
-
agentNamedId: (_agent$
|
|
299
|
+
agentNamedId: (_agent$external_confi4 = agent.external_config_reference) !== null && _agent$external_confi4 !== void 0 ? _agent$external_confi4 : agent.named_id,
|
|
201
300
|
agentIdentityAccountId: agent.identity_account_id,
|
|
202
301
|
size: "large",
|
|
203
302
|
isRovoDev: isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card'),
|
|
@@ -214,11 +313,11 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
214
313
|
onStarToggle: handleSetFavourite,
|
|
215
314
|
showStarButton: !(isRovoDev && (0, _platformFeatureFlags.fg)('rovo_dev_themed_identity_card')),
|
|
216
315
|
isHidden: agent.visibility === 'PRIVATE',
|
|
217
|
-
creatorRender: ((_agent$
|
|
316
|
+
creatorRender: ((_agent$creatorInfo5 = agent.creatorInfo) === null || _agent$creatorInfo5 === void 0 ? void 0 : _agent$creatorInfo5.type) && /*#__PURE__*/_react.default.createElement(_AgentProfileInfo.AgentProfileCreator, {
|
|
218
317
|
creator: {
|
|
219
|
-
type: (_agent$
|
|
220
|
-
name: ((_agent$
|
|
221
|
-
profileLink: ((_agent$
|
|
318
|
+
type: (_agent$creatorInfo6 = agent.creatorInfo) === null || _agent$creatorInfo6 === void 0 ? void 0 : _agent$creatorInfo6.type,
|
|
319
|
+
name: ((_agent$creatorInfo7 = agent.creatorInfo) === null || _agent$creatorInfo7 === void 0 ? void 0 : _agent$creatorInfo7.name) || '',
|
|
320
|
+
profileLink: ((_agent$creatorInfo8 = agent.creatorInfo) === null || _agent$creatorInfo8 === void 0 ? void 0 : _agent$creatorInfo8.profileLink) || ''
|
|
222
321
|
},
|
|
223
322
|
isLoading: false,
|
|
224
323
|
onCreatorLinkClick: function onCreatorLinkClick() {}
|
|
@@ -18,7 +18,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
18
18
|
var _giveKudos = require("@atlaskit/give-kudos");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
21
|
-
var _teamsAppInternalNavigation = require("@atlaskit/teams-app-internal-navigation");
|
|
22
21
|
var _filterActions = _interopRequireDefault(require("../../internal/filterActions"));
|
|
23
22
|
var _UserTrigger = require("../../styled/UserTrigger");
|
|
24
23
|
var _Error = require("../Error");
|
|
@@ -220,14 +219,7 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
220
219
|
cloudId: this.props.cloudId,
|
|
221
220
|
addFlag: this.props.addFlag,
|
|
222
221
|
onClose: this.closeKudosDrawer
|
|
223
|
-
})),
|
|
224
|
-
value: {
|
|
225
|
-
forceExternalIntent: false,
|
|
226
|
-
navigate: function navigate() {}
|
|
227
|
-
}
|
|
228
|
-
}, /*#__PURE__*/_react.default.createElement(_ProfileCard.default, (0, _extends2.default)({}, newProps, {
|
|
229
|
-
actions: this.filterActions()
|
|
230
|
-
}))) : /*#__PURE__*/_react.default.createElement(_ProfileCard.default, (0, _extends2.default)({}, newProps, {
|
|
222
|
+
})), /*#__PURE__*/_react.default.createElement(_ProfileCard.default, (0, _extends2.default)({}, newProps, {
|
|
231
223
|
actions: this.filterActions()
|
|
232
224
|
}))));
|
|
233
225
|
}
|
|
@@ -19,7 +19,6 @@ var _giveKudos = require("@atlaskit/give-kudos");
|
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
21
21
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
22
|
-
var _teamsAppInternalNavigation = require("@atlaskit/teams-app-internal-navigation");
|
|
23
22
|
var _constants = require("@atlaskit/theme/constants");
|
|
24
23
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
24
|
var _filterActions = _interopRequireDefault(require("../../internal/filterActions"));
|
|
@@ -74,13 +73,6 @@ function ProfileCardContent(_ref) {
|
|
|
74
73
|
errorType: errorType,
|
|
75
74
|
withoutElevation: true
|
|
76
75
|
})));
|
|
77
|
-
if ((0, _platformFeatureFlags.fg)('ptc-links-migrate-atlaskit-link-button')) {
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement(_teamsAppInternalNavigation.TeamsNavigationProvider, {
|
|
79
|
-
value: {
|
|
80
|
-
navigate: function navigate() {}
|
|
81
|
-
}
|
|
82
|
-
}, profileCard);
|
|
83
|
-
}
|
|
84
76
|
return profileCard;
|
|
85
77
|
}
|
|
86
78
|
}
|
|
@@ -12,7 +12,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
12
12
|
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) { (0, _defineProperty2.default)(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; }
|
|
13
13
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
14
14
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
15
|
-
packageVersion: (_process$env$_PACKAGE2 = "
|
|
15
|
+
packageVersion: (_process$env$_PACKAGE2 = "24.49.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
16
16
|
};
|
|
17
17
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
18
18
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -31,7 +31,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
31
31
|
actionSubjectId: actionSubjectId,
|
|
32
32
|
attributes: _objectSpread(_objectSpread({
|
|
33
33
|
packageName: "@atlaskit/profilecard",
|
|
34
|
-
packageVersion: "
|
|
34
|
+
packageVersion: "24.49.0"
|
|
35
35
|
}, attributes), {}, {
|
|
36
36
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
37
37
|
})
|
|
@@ -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', "
|
|
9
|
+
headers.append('atl-client-version', "24.49.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', "
|
|
81
|
+
headers.append('atl-client-version', "24.49.0");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -12,6 +12,8 @@ import { AgentBanner } from '@atlaskit/rovo-agent-components/ui/agent-avatar/Gen
|
|
|
12
12
|
import { AgentAvatar } from '@atlaskit/rovo-agent-components/ui/AgentAvatar';
|
|
13
13
|
import { AgentProfileCreator, AgentProfileInfo } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
14
14
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
15
|
+
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
16
|
+
import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
|
|
15
17
|
import { PACKAGE_META_DATA } from '../../util/analytics';
|
|
16
18
|
import { getPageTime } from '../../util/performance';
|
|
17
19
|
import { LoadingState } from '../common/LoadingState';
|
|
@@ -44,7 +46,7 @@ const AgentProfileCard = ({
|
|
|
44
46
|
hideAiDisclaimer = false,
|
|
45
47
|
hideConversationStarters = false
|
|
46
48
|
}) => {
|
|
47
|
-
var _agent$user_defined_c, _agent$
|
|
49
|
+
var _agent$user_defined_c, _agent$external_confi3, _agent$external_confi4, _agent$creatorInfo5, _agent$creatorInfo6, _agent$creatorInfo7, _agent$creatorInfo8;
|
|
48
50
|
const {
|
|
49
51
|
onEditAgent,
|
|
50
52
|
onCopyAgent,
|
|
@@ -137,11 +139,96 @@ const AgentProfileCard = ({
|
|
|
137
139
|
}
|
|
138
140
|
const isRovoDev = agent.creator_type === 'ROVO_DEV';
|
|
139
141
|
const shouldShowConversationStarters = !(isRovoDev && fg('rovo_dev_themed_identity_card')) && !(fg('jira_ai_hide_conversation_starters_profilecard') && hideConversationStarters);
|
|
142
|
+
if (fg('ptc-links-migrate-atlaskit-link')) {
|
|
143
|
+
var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
144
|
+
return /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
145
|
+
value: {
|
|
146
|
+
navigate: () => {}
|
|
147
|
+
}
|
|
148
|
+
}, /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
149
|
+
xcss: styles.cardContainerStyles
|
|
150
|
+
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
151
|
+
agentId: agent.id,
|
|
152
|
+
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
153
|
+
height: 48,
|
|
154
|
+
agentIdentityAccountId: agent.identity_account_id,
|
|
155
|
+
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card')
|
|
156
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
157
|
+
xcss: styles.avatarStyles
|
|
158
|
+
}, /*#__PURE__*/React.createElement(AgentAvatar, {
|
|
159
|
+
agentId: agent.id,
|
|
160
|
+
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
161
|
+
agentIdentityAccountId: agent.identity_account_id,
|
|
162
|
+
size: "large",
|
|
163
|
+
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card'),
|
|
164
|
+
isForgeAgent: fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
165
|
+
forgeAgentIconUrl: agent.icon
|
|
166
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
167
|
+
space: "space.100",
|
|
168
|
+
xcss: styles.detailWrapper
|
|
169
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
170
|
+
xcss: styles.agentProfileInfoWrapper
|
|
171
|
+
}, /*#__PURE__*/React.createElement(AgentProfileInfo, {
|
|
172
|
+
agentName: agent.name,
|
|
173
|
+
isStarred: isStarred,
|
|
174
|
+
onStarToggle: handleSetFavourite,
|
|
175
|
+
showStarButton: !(isRovoDev && fg('rovo_dev_themed_identity_card')),
|
|
176
|
+
isHidden: agent.visibility === 'PRIVATE',
|
|
177
|
+
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
178
|
+
creator: {
|
|
179
|
+
type: (_agent$creatorInfo2 = agent.creatorInfo) === null || _agent$creatorInfo2 === void 0 ? void 0 : _agent$creatorInfo2.type,
|
|
180
|
+
name: ((_agent$creatorInfo3 = agent.creatorInfo) === null || _agent$creatorInfo3 === void 0 ? void 0 : _agent$creatorInfo3.name) || '',
|
|
181
|
+
profileLink: ((_agent$creatorInfo4 = agent.creatorInfo) === null || _agent$creatorInfo4 === void 0 ? void 0 : _agent$creatorInfo4.profileLink) || ''
|
|
182
|
+
},
|
|
183
|
+
isLoading: false,
|
|
184
|
+
onCreatorLinkClick: () => {}
|
|
185
|
+
}),
|
|
186
|
+
starCountRender: null,
|
|
187
|
+
agentDescription: agent.description
|
|
188
|
+
})), !hideAiDisclaimer && fg('rovo_display_ai_disclaimer_on_agent_profile_card') && /*#__PURE__*/React.createElement(Flex, {
|
|
189
|
+
alignItems: "start",
|
|
190
|
+
direction: "column",
|
|
191
|
+
gap: "space.050",
|
|
192
|
+
xcss: styles.disclosureWrapper
|
|
193
|
+
}, /*#__PURE__*/React.createElement(TeamsLink, {
|
|
194
|
+
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
195
|
+
intent: "reference",
|
|
196
|
+
appearance: "subtle"
|
|
197
|
+
}, /*#__PURE__*/React.createElement(InformationCircleIcon, {
|
|
198
|
+
color: "var(--ds-icon-subtlest, #6B6E76)",
|
|
199
|
+
label: "",
|
|
200
|
+
size: "small"
|
|
201
|
+
}), ` `, /*#__PURE__*/React.createElement(Text, {
|
|
202
|
+
size: "small",
|
|
203
|
+
color: "color.text.subtlest"
|
|
204
|
+
}, formatMessage(messages.aiDisclaimer)))), shouldShowConversationStarters && /*#__PURE__*/React.createElement(Box, {
|
|
205
|
+
xcss: styles.conversationStartersWrapper
|
|
206
|
+
}, /*#__PURE__*/React.createElement(ConversationStarters, {
|
|
207
|
+
isAgentDefault: agent.is_default,
|
|
208
|
+
userDefinedConversationStarters: userDefinedConversationStarters,
|
|
209
|
+
onConversationStarterClick: conversationStarter => {
|
|
210
|
+
onConversationStartersClick ? onConversationStartersClick(conversationStarter) : onConversationStarter({
|
|
211
|
+
agentId: agent.id,
|
|
212
|
+
prompt: conversationStarter.message
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}))), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(AgentActions, {
|
|
216
|
+
agent: agent,
|
|
217
|
+
onEditAgent: () => onEditAgent(agent.id),
|
|
218
|
+
onCopyAgent: () => onCopyAgent(agent.id),
|
|
219
|
+
onDuplicateAgent: () => onDuplicateAgent(agent.id),
|
|
220
|
+
onDeleteAgent: handleOnDelete,
|
|
221
|
+
onChatClick: onChatClick ? event => onChatClick(event) : () => onOpenChatFullScreen(agent.id, agent.name),
|
|
222
|
+
resourceClient: resourceClient,
|
|
223
|
+
onViewFullProfileClick: () => onViewFullProfile(agent.id),
|
|
224
|
+
hideMoreActions: hideMoreActions
|
|
225
|
+
}))));
|
|
226
|
+
}
|
|
140
227
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
141
228
|
xcss: styles.cardContainerStyles
|
|
142
229
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
143
230
|
agentId: agent.id,
|
|
144
|
-
agentNamedId: (_agent$
|
|
231
|
+
agentNamedId: (_agent$external_confi3 = agent.external_config_reference) !== null && _agent$external_confi3 !== void 0 ? _agent$external_confi3 : agent.named_id,
|
|
145
232
|
height: 48,
|
|
146
233
|
agentIdentityAccountId: agent.identity_account_id,
|
|
147
234
|
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card')
|
|
@@ -149,7 +236,7 @@ const AgentProfileCard = ({
|
|
|
149
236
|
xcss: styles.avatarStyles
|
|
150
237
|
}, /*#__PURE__*/React.createElement(AgentAvatar, {
|
|
151
238
|
agentId: agent.id,
|
|
152
|
-
agentNamedId: (_agent$
|
|
239
|
+
agentNamedId: (_agent$external_confi4 = agent.external_config_reference) !== null && _agent$external_confi4 !== void 0 ? _agent$external_confi4 : agent.named_id,
|
|
153
240
|
agentIdentityAccountId: agent.identity_account_id,
|
|
154
241
|
size: "large",
|
|
155
242
|
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card'),
|
|
@@ -166,11 +253,11 @@ const AgentProfileCard = ({
|
|
|
166
253
|
onStarToggle: handleSetFavourite,
|
|
167
254
|
showStarButton: !(isRovoDev && fg('rovo_dev_themed_identity_card')),
|
|
168
255
|
isHidden: agent.visibility === 'PRIVATE',
|
|
169
|
-
creatorRender: ((_agent$
|
|
256
|
+
creatorRender: ((_agent$creatorInfo5 = agent.creatorInfo) === null || _agent$creatorInfo5 === void 0 ? void 0 : _agent$creatorInfo5.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
170
257
|
creator: {
|
|
171
|
-
type: (_agent$
|
|
172
|
-
name: ((_agent$
|
|
173
|
-
profileLink: ((_agent$
|
|
258
|
+
type: (_agent$creatorInfo6 = agent.creatorInfo) === null || _agent$creatorInfo6 === void 0 ? void 0 : _agent$creatorInfo6.type,
|
|
259
|
+
name: ((_agent$creatorInfo7 = agent.creatorInfo) === null || _agent$creatorInfo7 === void 0 ? void 0 : _agent$creatorInfo7.name) || '',
|
|
260
|
+
profileLink: ((_agent$creatorInfo8 = agent.creatorInfo) === null || _agent$creatorInfo8 === void 0 ? void 0 : _agent$creatorInfo8.profileLink) || ''
|
|
174
261
|
},
|
|
175
262
|
isLoading: false,
|
|
176
263
|
onCreatorLinkClick: () => {}
|
|
@@ -4,7 +4,6 @@ import React, { Suspense } from 'react';
|
|
|
4
4
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
7
|
-
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
8
7
|
import filterActions from '../../internal/filterActions';
|
|
9
8
|
import { CardWrapper } from '../../styled/UserTrigger';
|
|
10
9
|
import { ErrorMessage } from '../Error';
|
|
@@ -175,14 +174,7 @@ class ProfileCardResourced extends React.PureComponent {
|
|
|
175
174
|
cloudId: this.props.cloudId,
|
|
176
175
|
addFlag: this.props.addFlag,
|
|
177
176
|
onClose: this.closeKudosDrawer
|
|
178
|
-
})),
|
|
179
|
-
value: {
|
|
180
|
-
forceExternalIntent: false,
|
|
181
|
-
navigate: () => {}
|
|
182
|
-
}
|
|
183
|
-
}, /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
184
|
-
actions: this.filterActions()
|
|
185
|
-
}))) : /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
177
|
+
})), /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
186
178
|
actions: this.filterActions()
|
|
187
179
|
}))));
|
|
188
180
|
}
|
|
@@ -5,7 +5,6 @@ import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import Popup from '@atlaskit/popup';
|
|
7
7
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
8
|
-
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
9
8
|
import { layers } from '@atlaskit/theme/constants';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import filterActionsInner from '../../internal/filterActions';
|
|
@@ -56,13 +55,6 @@ function ProfileCardContent({
|
|
|
56
55
|
errorType: errorType,
|
|
57
56
|
withoutElevation: true
|
|
58
57
|
})));
|
|
59
|
-
if (fg('ptc-links-migrate-atlaskit-link-button')) {
|
|
60
|
-
return /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
61
|
-
value: {
|
|
62
|
-
navigate: () => {}
|
|
63
|
-
}
|
|
64
|
-
}, profileCard);
|
|
65
|
-
}
|
|
66
58
|
return profileCard;
|
|
67
59
|
}
|
|
68
60
|
}
|
|
@@ -2,7 +2,7 @@ var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
|
2
2
|
import { getPageTime } from './performance';
|
|
3
3
|
export const PACKAGE_META_DATA = {
|
|
4
4
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
5
|
-
packageVersion: (_process$env$_PACKAGE2 = "
|
|
5
|
+
packageVersion: (_process$env$_PACKAGE2 = "24.49.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
6
6
|
};
|
|
7
7
|
const TEAM_SUBJECT = 'teamProfileCard';
|
|
8
8
|
const USER_SUBJECT = 'profilecard';
|
|
@@ -19,7 +19,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
19
19
|
actionSubjectId,
|
|
20
20
|
attributes: {
|
|
21
21
|
packageName: "@atlaskit/profilecard",
|
|
22
|
-
packageVersion: "
|
|
22
|
+
packageVersion: "24.49.0",
|
|
23
23
|
...attributes,
|
|
24
24
|
firedAt: Math.round(getPageTime())
|
|
25
25
|
}
|
|
@@ -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', "
|
|
7
|
+
headers.append('atl-client-version', "24.49.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', "
|
|
62
|
+
headers.append('atl-client-version', "24.49.0");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -18,6 +18,8 @@ import { AgentBanner } from '@atlaskit/rovo-agent-components/ui/agent-avatar/Gen
|
|
|
18
18
|
import { AgentAvatar } from '@atlaskit/rovo-agent-components/ui/AgentAvatar';
|
|
19
19
|
import { AgentProfileCreator, AgentProfileInfo } from '@atlaskit/rovo-agent-components/ui/AgentProfileInfo';
|
|
20
20
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
21
|
+
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
22
|
+
import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
|
|
21
23
|
import { PACKAGE_META_DATA } from '../../util/analytics';
|
|
22
24
|
import { getPageTime } from '../../util/performance';
|
|
23
25
|
import { LoadingState } from '../common/LoadingState';
|
|
@@ -36,7 +38,7 @@ var styles = {
|
|
|
36
38
|
disclosureWrapper: "_zulp1b66 _18zrpxbi _1q51utpp _85i5utpp"
|
|
37
39
|
};
|
|
38
40
|
var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
39
|
-
var _agent$user_defined_c, _agent$
|
|
41
|
+
var _agent$user_defined_c, _agent$external_confi3, _agent$external_confi4, _agent$creatorInfo5, _agent$creatorInfo6, _agent$creatorInfo7, _agent$creatorInfo8;
|
|
40
42
|
var agent = _ref.agent,
|
|
41
43
|
isLoading = _ref.isLoading,
|
|
42
44
|
cloudId = _ref.cloudId,
|
|
@@ -176,11 +178,108 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
176
178
|
}
|
|
177
179
|
var isRovoDev = agent.creator_type === 'ROVO_DEV';
|
|
178
180
|
var shouldShowConversationStarters = !(isRovoDev && fg('rovo_dev_themed_identity_card')) && !(fg('jira_ai_hide_conversation_starters_profilecard') && hideConversationStarters);
|
|
181
|
+
if (fg('ptc-links-migrate-atlaskit-link')) {
|
|
182
|
+
var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
|
|
183
|
+
return /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
184
|
+
value: {
|
|
185
|
+
navigate: function navigate() {}
|
|
186
|
+
}
|
|
187
|
+
}, /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
188
|
+
xcss: styles.cardContainerStyles
|
|
189
|
+
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
190
|
+
agentId: agent.id,
|
|
191
|
+
agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
|
|
192
|
+
height: 48,
|
|
193
|
+
agentIdentityAccountId: agent.identity_account_id,
|
|
194
|
+
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card')
|
|
195
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
196
|
+
xcss: styles.avatarStyles
|
|
197
|
+
}, /*#__PURE__*/React.createElement(AgentAvatar, {
|
|
198
|
+
agentId: agent.id,
|
|
199
|
+
agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
|
|
200
|
+
agentIdentityAccountId: agent.identity_account_id,
|
|
201
|
+
size: "large",
|
|
202
|
+
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card'),
|
|
203
|
+
isForgeAgent: fg('rovo_agent_support_a2a_avatar') ? isForgeAgentByCreatorType(agent.creator_type) : agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
|
|
204
|
+
forgeAgentIconUrl: agent.icon
|
|
205
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
206
|
+
space: "space.100",
|
|
207
|
+
xcss: styles.detailWrapper
|
|
208
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
209
|
+
xcss: styles.agentProfileInfoWrapper
|
|
210
|
+
}, /*#__PURE__*/React.createElement(AgentProfileInfo, {
|
|
211
|
+
agentName: agent.name,
|
|
212
|
+
isStarred: isStarred,
|
|
213
|
+
onStarToggle: handleSetFavourite,
|
|
214
|
+
showStarButton: !(isRovoDev && fg('rovo_dev_themed_identity_card')),
|
|
215
|
+
isHidden: agent.visibility === 'PRIVATE',
|
|
216
|
+
creatorRender: ((_agent$creatorInfo = agent.creatorInfo) === null || _agent$creatorInfo === void 0 ? void 0 : _agent$creatorInfo.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
217
|
+
creator: {
|
|
218
|
+
type: (_agent$creatorInfo2 = agent.creatorInfo) === null || _agent$creatorInfo2 === void 0 ? void 0 : _agent$creatorInfo2.type,
|
|
219
|
+
name: ((_agent$creatorInfo3 = agent.creatorInfo) === null || _agent$creatorInfo3 === void 0 ? void 0 : _agent$creatorInfo3.name) || '',
|
|
220
|
+
profileLink: ((_agent$creatorInfo4 = agent.creatorInfo) === null || _agent$creatorInfo4 === void 0 ? void 0 : _agent$creatorInfo4.profileLink) || ''
|
|
221
|
+
},
|
|
222
|
+
isLoading: false,
|
|
223
|
+
onCreatorLinkClick: function onCreatorLinkClick() {}
|
|
224
|
+
}),
|
|
225
|
+
starCountRender: null,
|
|
226
|
+
agentDescription: agent.description
|
|
227
|
+
})), !hideAiDisclaimer && fg('rovo_display_ai_disclaimer_on_agent_profile_card') && /*#__PURE__*/React.createElement(Flex, {
|
|
228
|
+
alignItems: "start",
|
|
229
|
+
direction: "column",
|
|
230
|
+
gap: "space.050",
|
|
231
|
+
xcss: styles.disclosureWrapper
|
|
232
|
+
}, /*#__PURE__*/React.createElement(TeamsLink, {
|
|
233
|
+
href: "https://www.atlassian.com/trust/atlassian-intelligence",
|
|
234
|
+
intent: "reference",
|
|
235
|
+
appearance: "subtle"
|
|
236
|
+
}, /*#__PURE__*/React.createElement(InformationCircleIcon, {
|
|
237
|
+
color: "var(--ds-icon-subtlest, #6B6E76)",
|
|
238
|
+
label: "",
|
|
239
|
+
size: "small"
|
|
240
|
+
}), " ", /*#__PURE__*/React.createElement(Text, {
|
|
241
|
+
size: "small",
|
|
242
|
+
color: "color.text.subtlest"
|
|
243
|
+
}, formatMessage(messages.aiDisclaimer)))), shouldShowConversationStarters && /*#__PURE__*/React.createElement(Box, {
|
|
244
|
+
xcss: styles.conversationStartersWrapper
|
|
245
|
+
}, /*#__PURE__*/React.createElement(ConversationStarters, {
|
|
246
|
+
isAgentDefault: agent.is_default,
|
|
247
|
+
userDefinedConversationStarters: userDefinedConversationStarters,
|
|
248
|
+
onConversationStarterClick: function onConversationStarterClick(conversationStarter) {
|
|
249
|
+
onConversationStartersClick ? onConversationStartersClick(conversationStarter) : onConversationStarter({
|
|
250
|
+
agentId: agent.id,
|
|
251
|
+
prompt: conversationStarter.message
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}))), !(isRovoDev && fg('rovo_dev_themed_identity_card')) && /*#__PURE__*/React.createElement(AgentActions, {
|
|
255
|
+
agent: agent,
|
|
256
|
+
onEditAgent: function onEditAgent() {
|
|
257
|
+
return _onEditAgent(agent.id);
|
|
258
|
+
},
|
|
259
|
+
onCopyAgent: function onCopyAgent() {
|
|
260
|
+
return _onCopyAgent(agent.id);
|
|
261
|
+
},
|
|
262
|
+
onDuplicateAgent: function onDuplicateAgent() {
|
|
263
|
+
return _onDuplicateAgent(agent.id);
|
|
264
|
+
},
|
|
265
|
+
onDeleteAgent: handleOnDelete,
|
|
266
|
+
onChatClick: onChatClick ? function (event) {
|
|
267
|
+
return onChatClick(event);
|
|
268
|
+
} : function () {
|
|
269
|
+
return onOpenChatFullScreen(agent.id, agent.name);
|
|
270
|
+
},
|
|
271
|
+
resourceClient: resourceClient,
|
|
272
|
+
onViewFullProfileClick: function onViewFullProfileClick() {
|
|
273
|
+
return onViewFullProfile(agent.id);
|
|
274
|
+
},
|
|
275
|
+
hideMoreActions: hideMoreActions
|
|
276
|
+
}))));
|
|
277
|
+
}
|
|
179
278
|
return /*#__PURE__*/React.createElement(AgentProfileCardWrapper, null, /*#__PURE__*/React.createElement(Box, {
|
|
180
279
|
xcss: styles.cardContainerStyles
|
|
181
280
|
}, /*#__PURE__*/React.createElement(AgentBanner, {
|
|
182
281
|
agentId: agent.id,
|
|
183
|
-
agentNamedId: (_agent$
|
|
282
|
+
agentNamedId: (_agent$external_confi3 = agent.external_config_reference) !== null && _agent$external_confi3 !== void 0 ? _agent$external_confi3 : agent.named_id,
|
|
184
283
|
height: 48,
|
|
185
284
|
agentIdentityAccountId: agent.identity_account_id,
|
|
186
285
|
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card')
|
|
@@ -188,7 +287,7 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
188
287
|
xcss: styles.avatarStyles
|
|
189
288
|
}, /*#__PURE__*/React.createElement(AgentAvatar, {
|
|
190
289
|
agentId: agent.id,
|
|
191
|
-
agentNamedId: (_agent$
|
|
290
|
+
agentNamedId: (_agent$external_confi4 = agent.external_config_reference) !== null && _agent$external_confi4 !== void 0 ? _agent$external_confi4 : agent.named_id,
|
|
192
291
|
agentIdentityAccountId: agent.identity_account_id,
|
|
193
292
|
size: "large",
|
|
194
293
|
isRovoDev: isRovoDev && fg('rovo_dev_themed_identity_card'),
|
|
@@ -205,11 +304,11 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
|
|
|
205
304
|
onStarToggle: handleSetFavourite,
|
|
206
305
|
showStarButton: !(isRovoDev && fg('rovo_dev_themed_identity_card')),
|
|
207
306
|
isHidden: agent.visibility === 'PRIVATE',
|
|
208
|
-
creatorRender: ((_agent$
|
|
307
|
+
creatorRender: ((_agent$creatorInfo5 = agent.creatorInfo) === null || _agent$creatorInfo5 === void 0 ? void 0 : _agent$creatorInfo5.type) && /*#__PURE__*/React.createElement(AgentProfileCreator, {
|
|
209
308
|
creator: {
|
|
210
|
-
type: (_agent$
|
|
211
|
-
name: ((_agent$
|
|
212
|
-
profileLink: ((_agent$
|
|
309
|
+
type: (_agent$creatorInfo6 = agent.creatorInfo) === null || _agent$creatorInfo6 === void 0 ? void 0 : _agent$creatorInfo6.type,
|
|
310
|
+
name: ((_agent$creatorInfo7 = agent.creatorInfo) === null || _agent$creatorInfo7 === void 0 ? void 0 : _agent$creatorInfo7.name) || '',
|
|
311
|
+
profileLink: ((_agent$creatorInfo8 = agent.creatorInfo) === null || _agent$creatorInfo8 === void 0 ? void 0 : _agent$creatorInfo8.profileLink) || ''
|
|
213
312
|
},
|
|
214
313
|
isLoading: false,
|
|
215
314
|
onCreatorLinkClick: function onCreatorLinkClick() {}
|
|
@@ -14,7 +14,6 @@ import React, { Suspense } from 'react';
|
|
|
14
14
|
import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
17
|
-
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
18
17
|
import filterActions from '../../internal/filterActions';
|
|
19
18
|
import { CardWrapper } from '../../styled/UserTrigger';
|
|
20
19
|
import { ErrorMessage } from '../Error';
|
|
@@ -211,14 +210,7 @@ var ProfileCardResourced = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
211
210
|
cloudId: this.props.cloudId,
|
|
212
211
|
addFlag: this.props.addFlag,
|
|
213
212
|
onClose: this.closeKudosDrawer
|
|
214
|
-
})),
|
|
215
|
-
value: {
|
|
216
|
-
forceExternalIntent: false,
|
|
217
|
-
navigate: function navigate() {}
|
|
218
|
-
}
|
|
219
|
-
}, /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
220
|
-
actions: this.filterActions()
|
|
221
|
-
}))) : /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
213
|
+
})), /*#__PURE__*/React.createElement(ProfileCard, _extends({}, newProps, {
|
|
222
214
|
actions: this.filterActions()
|
|
223
215
|
}))));
|
|
224
216
|
}
|
|
@@ -15,7 +15,6 @@ import { GiveKudosLauncherLazy, KudosType } from '@atlaskit/give-kudos';
|
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import Popup from '@atlaskit/popup';
|
|
17
17
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
18
|
-
import { TeamsNavigationProvider } from '@atlaskit/teams-app-internal-navigation';
|
|
19
18
|
import { layers } from '@atlaskit/theme/constants';
|
|
20
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
20
|
import filterActionsInner from '../../internal/filterActions';
|
|
@@ -65,13 +64,6 @@ function ProfileCardContent(_ref) {
|
|
|
65
64
|
errorType: errorType,
|
|
66
65
|
withoutElevation: true
|
|
67
66
|
})));
|
|
68
|
-
if (fg('ptc-links-migrate-atlaskit-link-button')) {
|
|
69
|
-
return /*#__PURE__*/React.createElement(TeamsNavigationProvider, {
|
|
70
|
-
value: {
|
|
71
|
-
navigate: function navigate() {}
|
|
72
|
-
}
|
|
73
|
-
}, profileCard);
|
|
74
|
-
}
|
|
75
67
|
return profileCard;
|
|
76
68
|
}
|
|
77
69
|
}
|
|
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { getPageTime } from './performance';
|
|
6
6
|
export var PACKAGE_META_DATA = {
|
|
7
7
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
8
|
-
packageVersion: (_process$env$_PACKAGE2 = "
|
|
8
|
+
packageVersion: (_process$env$_PACKAGE2 = "24.49.0") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
9
9
|
};
|
|
10
10
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
11
11
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -24,7 +24,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
24
24
|
actionSubjectId: actionSubjectId,
|
|
25
25
|
attributes: _objectSpread(_objectSpread({
|
|
26
26
|
packageName: "@atlaskit/profilecard",
|
|
27
|
-
packageVersion: "
|
|
27
|
+
packageVersion: "24.49.0"
|
|
28
28
|
}, attributes), {}, {
|
|
29
29
|
firedAt: Math.round(getPageTime())
|
|
30
30
|
})
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Link } from 'react-router-dom';
|
|
4
|
-
|
|
5
3
|
import { AtlassianInternalWarning, md } from '@atlaskit/docs';
|
|
4
|
+
import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
|
|
6
5
|
|
|
7
6
|
const _default_1: any = md`
|
|
8
7
|
${(<AtlassianInternalWarning />)}
|
|
@@ -14,15 +13,19 @@ const _default_1: any = md`
|
|
|
14
13
|
${(
|
|
15
14
|
<ul>
|
|
16
15
|
<li>
|
|
17
|
-
<
|
|
16
|
+
<TeamsLink href="profilecard/docs/profilecard-trigger" intent="reference">
|
|
17
|
+
To display User profile cards
|
|
18
|
+
</TeamsLink>
|
|
18
19
|
</li>
|
|
19
20
|
<li>
|
|
20
|
-
<
|
|
21
|
+
<TeamsLink href="profilecard/docs/team-profilecard" intent="reference">
|
|
22
|
+
To display Team profile cards
|
|
23
|
+
</TeamsLink>
|
|
21
24
|
</li>
|
|
22
25
|
<li>
|
|
23
|
-
<
|
|
26
|
+
<TeamsLink href="profilecard/docs/profile-client" intent="reference">
|
|
24
27
|
To customise the behaviour of the profile client, e.g. fetching data from a custom source.
|
|
25
|
-
</
|
|
28
|
+
</TeamsLink>
|
|
26
29
|
</li>
|
|
27
30
|
</ul>
|
|
28
31
|
)}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Link } from 'react-router-dom';
|
|
4
|
-
|
|
5
3
|
import { AtlassianInternalWarning, code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
+
import { TeamsLink } from '@atlaskit/teams-app-internal-navigation/teams-link';
|
|
6
5
|
|
|
7
6
|
const _default_1: any = md`
|
|
8
7
|
${(<AtlassianInternalWarning />)}
|
|
@@ -50,14 +49,20 @@ const profileClient = new ProfileClient({
|
|
|
50
49
|
${(
|
|
51
50
|
<ul>
|
|
52
51
|
<li>
|
|
53
|
-
<
|
|
52
|
+
<TeamsLink
|
|
53
|
+
href="/examples/people-and-teams/profilecard/trigger-link-types"
|
|
54
|
+
intent="reference"
|
|
55
|
+
>
|
|
54
56
|
Trigger link types
|
|
55
|
-
</
|
|
57
|
+
</TeamsLink>
|
|
56
58
|
</li>
|
|
57
59
|
<li>
|
|
58
|
-
<
|
|
60
|
+
<TeamsLink
|
|
61
|
+
href="/examples/people-and-teams/profilecard/team-profilecard-trigger"
|
|
62
|
+
intent="reference"
|
|
63
|
+
>
|
|
59
64
|
Team profilecard trigger
|
|
60
|
-
</
|
|
65
|
+
</TeamsLink>
|
|
61
66
|
</li>
|
|
62
67
|
</ul>
|
|
63
68
|
)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.49.1",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/afm-i18n-platform-people-and-teams-profilecard": "2.39.0",
|
|
43
43
|
"@atlaskit/atlassian-context": "^0.8.0",
|
|
44
44
|
"@atlaskit/avatar": "^25.11.0",
|
|
45
|
-
"@atlaskit/avatar-group": "^12.
|
|
45
|
+
"@atlaskit/avatar-group": "^12.6.0",
|
|
46
46
|
"@atlaskit/button": "^23.11.0",
|
|
47
47
|
"@atlaskit/css": "^0.19.0",
|
|
48
48
|
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@atlaskit/spinner": "^19.1.0",
|
|
64
64
|
"@atlaskit/teams-app-config": "^1.12.0",
|
|
65
65
|
"@atlaskit/teams-app-internal-analytics": "^1.27.0",
|
|
66
|
-
"@atlaskit/teams-app-internal-navigation": "^1.
|
|
66
|
+
"@atlaskit/teams-app-internal-navigation": "^1.8.0",
|
|
67
67
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
68
68
|
"@atlaskit/teams-public": "^0.74.0",
|
|
69
|
-
"@atlaskit/theme": "^
|
|
69
|
+
"@atlaskit/theme": "^23.0.0",
|
|
70
70
|
"@atlaskit/tmp-editor-statsig": "^55.0.0",
|
|
71
71
|
"@atlaskit/tokens": "^11.4.0",
|
|
72
72
|
"@atlaskit/tooltip": "^21.1.0",
|
|
@@ -100,7 +100,6 @@
|
|
|
100
100
|
"es6-promise": "^4.0.5",
|
|
101
101
|
"fetch-mock": "^8.0.0",
|
|
102
102
|
"loader-utils": "^1.1.0",
|
|
103
|
-
"react-router-dom": "^4.2.2",
|
|
104
103
|
"sinon": "^2.2.0",
|
|
105
104
|
"typescript": "5.9.2",
|
|
106
105
|
"uid": "^0.0.2"
|
|
@@ -121,6 +120,9 @@
|
|
|
121
120
|
}
|
|
122
121
|
},
|
|
123
122
|
"platform-feature-flags": {
|
|
123
|
+
"ptc-links-migrate-atlaskit-link": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
124
126
|
"ptc-links-migrate-atlaskit-link-button": {
|
|
125
127
|
"type": "boolean"
|
|
126
128
|
},
|