@atlaskit/profilecard 20.2.0 → 20.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 20.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#147255](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147255)
8
+ [`c757a53e7cbf1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c757a53e7cbf1) -
9
+ Prioritise the usage of agent.external_config_references instead of age.t.named_id, because the
10
+ OOTB agent migration will change agent.named_id to uuid
11
+
3
12
  ## 20.2.0
4
13
 
5
14
  ### Minor Changes
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "20.2.0");
60
+ headers.append('atl-client-version', "20.3.0");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -39,7 +39,7 @@ var cardContainerStyles = (0, _primitives.xcss)({
39
39
  position: 'relative'
40
40
  });
41
41
  var AgentProfileCard = function AgentProfileCard(_ref) {
42
- var _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
42
+ var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
43
43
  var agent = _ref.agent,
44
44
  isLoading = _ref.isLoading,
45
45
  isCreatedByViewingUser = _ref.isCreatedByViewingUser,
@@ -168,14 +168,14 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
168
168
  xcss: cardContainerStyles
169
169
  }, /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentBanner, {
170
170
  agentId: agent.id,
171
- agentNamedId: agent.named_id,
171
+ agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
172
172
  height: 96,
173
173
  agentIdentityAccountId: agent.identity_account_id
174
174
  }), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
175
175
  xcss: avatarStyles
176
176
  }, /*#__PURE__*/_react.default.createElement(_rovoAgentComponents.AgentAvatar, {
177
177
  agentId: agent.id,
178
- agentNamedId: agent.named_id,
178
+ agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
179
179
  agentIdentityAccountId: agent.identity_account_id,
180
180
  size: "xlarge",
181
181
  isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "20.2.0"
48
+ packageVersion: "20.3.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: Math.round((0, _performance.getPageTime)())
51
51
  })
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
67
67
  headers.append('X-ExperimentalApi', 'teams-beta');
68
68
  headers.append('X-ExperimentalApi', 'team-members-beta');
69
69
  headers.append('atl-client-name', "@atlaskit/profilecard");
70
- headers.append('atl-client-version', "20.2.0");
70
+ headers.append('atl-client-version', "20.3.0");
71
71
  return headers;
72
72
  };
73
73
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -38,7 +38,7 @@ const AgentProfileCard = ({
38
38
  resourceClient,
39
39
  addFlag
40
40
  }) => {
41
- var _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
41
+ var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
42
42
  const {
43
43
  onEditAgent,
44
44
  onCopyAgent,
@@ -121,14 +121,14 @@ const AgentProfileCard = ({
121
121
  xcss: cardContainerStyles
122
122
  }, /*#__PURE__*/React.createElement(AgentBanner, {
123
123
  agentId: agent.id,
124
- agentNamedId: agent.named_id,
124
+ agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
125
125
  height: 96,
126
126
  agentIdentityAccountId: agent.identity_account_id
127
127
  }), /*#__PURE__*/React.createElement(Box, {
128
128
  xcss: avatarStyles
129
129
  }, /*#__PURE__*/React.createElement(AgentAvatar, {
130
130
  agentId: agent.id,
131
- agentNamedId: agent.named_id,
131
+ agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
132
132
  agentIdentityAccountId: agent.identity_account_id,
133
133
  size: "xlarge",
134
134
  isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "20.2.0",
35
+ packageVersion: "20.3.0",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
48
48
  headers.append('X-ExperimentalApi', 'teams-beta');
49
49
  headers.append('X-ExperimentalApi', 'team-members-beta');
50
50
  headers.append('atl-client-name', "@atlaskit/profilecard");
51
- headers.append('atl-client-version', "20.2.0");
51
+ headers.append('atl-client-version', "20.3.0");
52
52
  return headers;
53
53
  };
54
54
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -29,7 +29,7 @@ var cardContainerStyles = xcss({
29
29
  position: 'relative'
30
30
  });
31
31
  var AgentProfileCard = function AgentProfileCard(_ref) {
32
- var _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
32
+ var _agent$external_confi, _agent$external_confi2, _agent$creatorInfo, _agent$creatorInfo2, _agent$creatorInfo3, _agent$creatorInfo4;
33
33
  var agent = _ref.agent,
34
34
  isLoading = _ref.isLoading,
35
35
  isCreatedByViewingUser = _ref.isCreatedByViewingUser,
@@ -158,14 +158,14 @@ var AgentProfileCard = function AgentProfileCard(_ref) {
158
158
  xcss: cardContainerStyles
159
159
  }, /*#__PURE__*/React.createElement(AgentBanner, {
160
160
  agentId: agent.id,
161
- agentNamedId: agent.named_id,
161
+ agentNamedId: (_agent$external_confi = agent.external_config_reference) !== null && _agent$external_confi !== void 0 ? _agent$external_confi : agent.named_id,
162
162
  height: 96,
163
163
  agentIdentityAccountId: agent.identity_account_id
164
164
  }), /*#__PURE__*/React.createElement(Box, {
165
165
  xcss: avatarStyles
166
166
  }, /*#__PURE__*/React.createElement(AgentAvatar, {
167
167
  agentId: agent.id,
168
- agentNamedId: agent.named_id,
168
+ agentNamedId: (_agent$external_confi2 = agent.external_config_reference) !== null && _agent$external_confi2 !== void 0 ? _agent$external_confi2 : agent.named_id,
169
169
  agentIdentityAccountId: agent.identity_account_id,
170
170
  size: "xlarge",
171
171
  isForgeAgent: agent.creator_type === 'FORGE' || agent.creator_type === 'THIRD_PARTY',
@@ -39,7 +39,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
39
39
  actionSubjectId: actionSubjectId,
40
40
  attributes: _objectSpread(_objectSpread({
41
41
  packageName: "@atlaskit/profilecard",
42
- packageVersion: "20.2.0"
42
+ packageVersion: "20.3.0"
43
43
  }, attributes), {}, {
44
44
  firedAt: Math.round(getPageTime())
45
45
  })
@@ -74,6 +74,7 @@ export interface RovoAgent {
74
74
  favourite_count: number;
75
75
  deactivated?: boolean;
76
76
  icon?: string | null;
77
+ external_config_reference?: string;
77
78
  }
78
79
  export interface RovoAgentCreatorInfo {
79
80
  type: 'CUSTOMER' | 'SYSTEM' | 'THIRD_PARTY' | 'FORGE';
@@ -74,6 +74,7 @@ export interface RovoAgent {
74
74
  favourite_count: number;
75
75
  deactivated?: boolean;
76
76
  icon?: string | null;
77
+ external_config_reference?: string;
77
78
  }
78
79
  export interface RovoAgentCreatorInfo {
79
80
  type: 'CUSTOMER' | 'SYSTEM' | 'THIRD_PARTY' | 'FORGE';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "20.2.0",
3
+ "version": "20.3.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/dropdown-menu": "^12.18.0",
58
58
  "@atlaskit/empty-state": "^7.11.0",
59
59
  "@atlaskit/focus-ring": "^1.6.0",
60
- "@atlaskit/give-kudos": "^2.1.1",
60
+ "@atlaskit/give-kudos": "^2.2.0",
61
61
  "@atlaskit/icon": "^22.19.0",
62
62
  "@atlaskit/lozenge": "^11.11.0",
63
63
  "@atlaskit/menu": "^2.12.0",